Android Drawer - Navigating to Multiple Fragments using Navigation.findNavController() - java

I do not know if I am doing this right.
I use a Navigation Drawer template in Android Studio and successfully browsing 3 menu option.
What I did is for all menu I added if else what the next fragment will be shown.
I feel like this kind of approach is kind of hard specially I need to add more menu.
Is their a better way for navigating fragments. Thanks in advance.
MainActivity.java
#Override
public boolean onNavigationItemSelected(MenuItem item) {
String title = getSupportActionBar().getTitle().toString();
switch (item.getItemId()) {
case R.id.nav_home:
if(title.equals(getString(R.string.title_status))) {
Navigation.findNavController(this, R.id.nav_host_fragment).navigate(R.id.action_status_to_home_fragment);
} else if(title.equals(getString(R.string.title_gallery))) {
Navigation.findNavController(this, R.id.nav_host_fragment).navigate(R.id.action_galley_to_home_fragment);
}
break;
case R.id.nav_status:
if(title.equals(getString(R.string.title_home))) {
Navigation.findNavController(this, R.id.nav_host_fragment).navigate(R.id.action_home_to_status_fragment);
} else if(title.equals(getString(R.string.title_gallery))) {
Navigation.findNavController(this, R.id.nav_host_fragment).navigate(R.id.action_galley_to_status_fragment);
}
break;
case R.id.nav_gallery:
if(title.equals(getString(R.string.title_home))) {
Navigation.findNavController(this, R.id.nav_host_fragment).navigate(R.id.action_home_to_gallery_fragment);
} else if(title.equals(getString(R.string.title_status))) {
Navigation.findNavController(this, R.id.nav_host_fragment).navigate(R.id.action_status_to_gallery_fragment);
}
break;
}
item.setChecked(true);
drawer.closeDrawers();
return true;
}
mobile_navigation.xml
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/mobile_navigation"
app:startDestination="#+id/nav_home">
<fragment
android:id="#+id/nav_home"
android:name="com.ddc.qvac.framents.HomeFragment"
android:label="#string/title_home"
tools:layout="#layout/fragment_home">
<action
android:id="#+id/action_home_to_status_fragment"
app:destination="#id/nav_status" />
<action
android:id="#+id/action_home_to_gallery_fragment"
app:destination="#id/nav_gallery" />
</fragment>
<fragment
android:id="#+id/nav_gallery"
android:name="com.ddc.qvac.framents.gallery.GalleryFragment"
android:label="#string/title_gallery"
tools:layout="#layout/fragment_gallery">
<action
android:id="#+id/action_galley_to_home_fragment"
app:destination="#id/nav_home" />
<action
android:id="#+id/action_galley_to_status_fragment"
app:destination="#id/nav_status" />
</fragment>
<fragment
android:id="#+id/nav_status"
android:name="com.ddc.qvac.framents.StatusFragment"
android:label="#string/title_status"
tools:layout="#layout/fragment_status">
<action
android:id="#+id/action_status_to_home_fragment"
app:destination="#id/nav_home" />
<action
android:id="#+id/action_status_to_gallery_fragment"
app:destination="#id/nav_gallery" />
</fragment>
</navigation>

use same id for:
id that defined in fragment tag in navigation xml file
id that defined in menu xml file
in your mobile_navigation.xml file you are using "#+id/nav_home" for home fragment. in your menu.xml file make id of home menu as "#+id/nav_home"
if both ids are same in menu file and navigation file, it will automatically navigate to the fragment. we don't need to do any boilerplate code.

Related

Unable to navigate to desired fragment using navigation component

I am using navigation component in my app. I am trying to navigate to the Fragment on click of an action bar icon, but it is not working.
Below is my code:
action_menu.xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:title=""
android:id="#+id/cart_notif"
android:icon="#drawable/ic_order"
app:showAsAction="always"
android:actionLayout="#layout/notification_badge"/>
</menu>
nav_host.xml
<fragment
android:id="#+id/cartFragment"
android:name="BottomFragments.CartFragment"
android:label="Cart"
tools:layout="#layout/fragment_cart">
<action
android:id="#+id/action_cartFragment_to_cakeFragment"
app:destination="#id/cakeFragment"
app:enterAnim="#anim/nav_default_enter_anim"
app:popUpTo="#id/cakeFragment"
app:popUpToInclusive="true" />
</fragment>
MainActivity.java
#Override
public boolean onOptionsItemSelected(#NonNull MenuItem item) {
if(item.getItemId() == R.id.cart_notif){
NavController navController = Navigation.findNavController(MainActivity.this,R.id.fragment);
navController.navigate(R.id.cartFragment);
}
return super.onOptionsItemSelected(item);
}
#Override
public boolean onSupportNavigateUp() {
navController.navigateUp();
return super.onSupportNavigateUp();
}
This approach is not working - how can I navigate?
here I can see you are using onOptionsItemSelected for navigating from one screen to another. Instead you should use onNavigationItemSelected method.
See this answer for more details.

Android crash onCreate() - Fragment cannot be cast to androidx.navigation.fragment.NavHostFragment

I decided to execute a Firebase Robo Test for my app and noticed that it always crashes after opening an external activity and then returning back to the app. I was able to duplicate the problem by enabling the "Don't keep activities" in the Developer options.
Crash: java.lang.ClassCastException: com.example.problemtesting.Fragments.Fragment_2 cannot be cast to androidx.navigation.fragment.NavHostFragment
It indicates that the problem is caused by this line of code: NavHostFragment navHostFragment = (NavHostFragment) getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
How to duplicate the problem:
Enable "Don't keep activities"
Open the app and then the app drawer
Select "Fragment 2"
Press on the Share button
Press on the Messages button (or any other external app)
Return to the app (Crash)
The app works fine if "Don't keep activities" is disabled.
MainActivity
public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
DrawerLayout drawer;
NavigationView navigationView;
FragmentManager fragmentManager;
AppBarConfiguration mAppBarConfiguration;
NavController navController;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
fragmentManager = getSupportFragmentManager();
drawer = findViewById(R.id.drawer_layout);
navigationView = findViewById(R.id.nav_view);
// Passing each menu ID as a set of Ids because each
// menu should be considered as top level destinations.
mAppBarConfiguration = new AppBarConfiguration.Builder(
R.id.nav_fragment_1, R.id.nav_fragment_2)
.setOpenableLayout(drawer)
.build();
NavHostFragment navHostFragment = (NavHostFragment) getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
if (navHostFragment != null)
navController = navHostFragment.getNavController();
else navController = Navigation.findNavController(this, R.id.nav_host_fragment);
NavigationUI.setupActionBarWithNavController(MainActivity.this, navController, mAppBarConfiguration);
NavigationUI.setupWithNavController(navigationView, navController);
setNavigationViewListener();
}
#Override
public boolean onSupportNavigateUp() {
return NavigationUI.navigateUp(navController, mAppBarConfiguration)
|| super.onSupportNavigateUp();
}
private void setNavigationViewListener() {
navigationView.setNavigationItemSelectedListener(MainActivity.this);
}
#Override
public boolean onNavigationItemSelected(#NonNull MenuItem menuItem) {
switch (menuItem.getItemId()) {
case R.id.nav_fragment_1: {
fragmentManager.beginTransaction()
.replace(R.id.nav_host_fragment, new Fragment_1())
.commitNow();
MainActivity.this.setTitle("Fragment 1");
break;
}
case R.id.nav_fragment_2: {
fragmentManager.beginTransaction()
.replace(R.id.nav_host_fragment, new Fragment_2())
.commitNow();
MainActivity.this.setTitle("Fragment 2");
break;
}
}
drawer.closeDrawers();
return true;
}
}
Fragment 1
public class Fragment_1 extends Fragment{
public View onCreateView(#NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
container.removeAllViews();
View root = inflater.inflate(R.layout.fragment_1, container, false);
return root;
}
}
Fragment 2
public class Fragment_2 extends Fragment {
public View onCreateView(#NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
container.removeAllViews();
View root = inflater.inflate(R.layout.fragment_2, container, false);
Button share = root.findViewById(R.id.share);
share.setOnClickListener(view -> {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, "Subject");
intent.putExtra(Intent.EXTRA_TEXT, "Message");
startActivity(Intent.createChooser(intent, "Title"));
});
return root;
}
}
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start"
>
<androidx.fragment.app.FragmentContainerView
android:id="#+id/nav_host_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:tag="my_fragment"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:defaultNavHost="true"
app:navGraph="#navigation/mobile_navigation"
/>
<com.google.android.material.navigation.NavigationView
android:id="#+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="#layout/nav_header_main"
app:menu="#menu/main_drawer"
/>
</androidx.drawerlayout.widget.DrawerLayout>
mobile_navigation.xml
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
app:startDestination="#+id/nav_fragment_1">
<fragment
android:id="#+id/nav_fragment_1"
android:name="com.example.problemtesting.Fragments.Fragment_1"
tools:layout="#layout/fragment_1"
/>
<fragment
android:id="#+id/nav_fragment_2"
android:name="com.example.problemtesting.Fragments.Fragment_2"
tools:layout="#layout/fragment_2"
/>
</navigation>
main_drawer.xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:showIn="navigation_view">
<group android:checkableBehavior="single">
<item
android:id="#+id/nav_fragment_1"
android:title="Fragment 1" />
<item
android:id="#+id/nav_fragment_2"
android:title="Fragment 2" />
</group>
</menu>
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.problemtesting">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name="com.example.problemtesting.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
It's a frustrating problem that I can't figure out. I have tried to remove the NavigationView.OnNavigationItemSelectedListener listener and it works fine, but I need that listener for other controls such as fragment switching animations and drawer layout transitions.
The problem is that your onNavigationItemSelected is doing a FragmentTransaction, replacing the entire NavHostFragment with a Fragment. This is always the wrong way to change fragments when using a NavHostFragment - you should always be navigating to a destination.
However, in your case, you are doing way more work than is actually necessary. Instead, you should:
Remove your OnNavigationItemSelectedListener code entirely. Navigation has already set one up for you when you call NavigationUI.setupWithNavController(navigationView, navController); That includes closing the drawer and using the correct cross fade animation as per the Material design spec.
As per the top app bar guide, you should not be manually setting the title of the acctivity, but instead add an android:label to each destination in your graph and the setupActionBarWithNavController call you've done will do that for you.

How to use navigation between fragments on Android Studio 4.0 with androidx [duplicate]

I've been trying to figure out how the default Navigation Drawer Activity template came with Android Studio navigates between different fragments. I understand that this menu is an implementation using AndroidX navigation component and navigation graph, but I just cannot understand how each menu item is mapped to its corresponding fragment. I don't see any listener or onNavigationItemSelected() etc. Can someone explain how the mapping between menuItem and corresponding fragment was achieved?
MainActivity.java:
public class MainActivity extends AppCompatActivity {
private AppBarConfiguration mAppBarConfiguration;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = findViewById(R.id.fab);
DrawerLayout drawer = findViewById(R.id.drawer_layout);
NavigationView navigationView = findViewById(R.id.nav_view);
// Passing each menu ID as a set of Ids because each
// menu should be considered as top level destinations.
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
mAppBarConfiguration = new AppBarConfiguration.Builder(
navController.getGraph())
.setDrawerLayout(drawer)
.build();
NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
NavigationUI.setupWithNavController(navigationView, navController);
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
#Override
public boolean onSupportNavigateUp() {
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
return NavigationUI.navigateUp(navController, mAppBarConfiguration)
|| super.onSupportNavigateUp();
}
}
menu.xml:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
>
<group android:checkableBehavior="single">
<item
android:id="#+id/nav_home"
android:icon="#drawable/ic_menu_camera"
android:title="#string/menu_home" />
<item
android:id="#+id/nav_gallery"
android:icon="#drawable/ic_menu_gallery"
android:title="#string/menu_gallery" />
<item
android:id="#+id/nav_slideshow"
android:icon="#drawable/ic_menu_slideshow"
android:title="#string/menu_slideshow" />
</group>
</menu>
nav_graph.xml
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/mobile_navigation"
app:startDestination="#+id/nav_home">
<fragment
android:id="#+id/nav_home"
android:name="com.buzzz.myapplication.ui.home.HomeFragment"
android:label="#string/menu_home"
tools:layout="#layout/fragment_home">
<action
android:id="#+id/action_HomeFragment_to_HomeSecondFragment"
app:destination="#id/nav_home_second" />
</fragment>
<fragment
android:id="#+id/nav_home_second"
android:name="com.buzzz.myapplication.ui.home.HomeSecondFragment"
android:label="#string/home_second"
tools:layout="#layout/fragment_home_second">
<action
android:id="#+id/action_HomeSecondFragment_to_HomeFragment"
app:destination="#id/nav_home" />
<argument
android:name="myArg"
app:argType="string" />
</fragment>
<fragment
android:id="#+id/nav_gallery"
android:name="com.buzzz.myapplication.ui.gallery.GalleryFragment"
android:label="#string/menu_gallery"
tools:layout="#layout/fragment_gallery" />
<fragment
android:id="#+id/nav_slideshow"
android:name="com.buzzz.myapplication.ui.slideshow.SlideshowFragment"
android:label="#string/menu_slideshow"
tools:layout="#layout/fragment_slideshow" />
</navigation>
Thank you very much.
As per the Update UI components with NavigationUI documentation, the setupWithNavController() methods hook up UI elements (such as your NavigationView) with the NavController.
Looking at the setupWithNavController() Javadoc:
Sets up a NavigationView for use with a NavController. This will call onNavDestinationSelected when a menu item is selected. The selected item in the NavigationView will automatically be updated when the destination changes.
So internally, this is setting up the appropriate listeners - both on the NavigationView to handle menu selections and on the NavController to update the selected item when the current destination changes.
Looking at the onNavDestinationSelected() Javadoc, it becomes clear how the menu items and navigation graph destinations are matched:
Importantly, it assumes the menu item id matches a valid action id or destination id to be navigated to.
So clicking on a menu item with android:id="#+id/nav_home" will navigate to the destination with android:id="#+id/nav_home".

My menu is hiding although I defined it

Here's my XML code:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="#+id/navigation_home"
android:icon="#drawable/ic_home_black_24dp"
android:title="#string/title_home" />
<item
android:id="#+id/navigation_dashboard"
android:icon="#drawable/ic_dashboard_black_24dp"
android:title="#string/title_dashboard" />
<item
android:id="#+id/navigation_notifications"
android:icon="#drawable/ic_notifications_black_24dp"
android:title="#string/title_notifications" />
</menu>
My Java code:
private BottomNavigationView.OnNavigationItemSelectedListener
mOnNavigationItemSelectedListener
= new BottomNavigationView.OnNavigationItemSelectedListener() {
#Override
public boolean onNavigationItemSelected(#NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.navigation_home:
// mTextMessage.setText(R.string.title_home);
return true;
case R.id.navigation_dashboard:
// mTextMessage.setText(R.string.title_dashboard);
return true;
case R.id.navigation_notifications:
// mTextMessage.setText(R.string.title_notifications);
return true;
}
return false;
}
};
When I run this code I can't show the menu.
I searched for examples but I saw that need to be correct code!
I can't understanding what is my problem??
You have to set the menu for your navigation view, you can do so in the NavigationView properties.
<android.support.design.widget.NavigationView
android:id="#+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="#layout/nav_header_main"
app:menu="#menu/activity_main_drawer" />
Don't forget to add the namespace:
xmlns:app="http://schemas.android.com/apk/res-auto"
Since it is a BottomNavigationView, you need to place it in the XML layout for your Activity. Adapted from here, you could use the following code:
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<android.support.design.widget.BottomNavigationView
android:id="#+id/navigation"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_alignParentBottom="true"
app:menu="#menu/my_navigation_items" />
where my_navigation_items points to the XML menu resource you included in your question. I have put layout_alignParentBottom="true", but this will only work if the parent is the top level View in the Activity. I would put the two xmlns required namespaces at the top of the document.

Android Design Navigation Drawer - How to add a switch in nav xml?

I am using the new Android Design Navigation Drawer. I want to add a switch in the drawer. Is there a away to implement this?
this is the menu xml:
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group
android:id="#+id/nav_view_menu_group_1"
android:checkableBehavior="single">
<item
android:id="#+id/nav_view_menu_item_myschedule"
android:icon="#drawable/ic_navview_my_schedule"
android:title="#string/navview_menu_item_myschedule"
android:titleCondensed="#string/navview_menu_item_myschedule" />
<item
android:id="#+id/nav_view_menu_item_iolive"
android:icon="#drawable/ic_navview_play_circle_fill"
android:title="#string/navview_menu_item_iolive"
android:titleCondensed="#string/navview_menu_item_iolive"
android:visible="false"/>
<item
android:id="#+id/nav_view_menu_item_explore"
android:icon="#drawable/ic_navview_explore"
android:title="#string/navview_menu_item_explore"
android:titleCondensed="#string/navview_menu_item_explore" />
<item
android:id="#+id/nav_view_menu_item_map"
android:icon="#drawable/ic_navview_map"
android:title="#string/navview_menu_item_map"
android:titleCondensed="#string/navview_menu_item_map"
android:visible="false"/>
</group>
</menu>
How can I change one <item> to be switch:
<Switch
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Switch"
android:id="#+id/switch1"
android:layout_gravity="center_horizontal" />
I am currently using the default layout:
<android.support.design.widget.NavigationView
android:id="#+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:menu="#menu/activity_main_drawer" />
Just Like this Image under Android Notification http://i.stack.imgur.com/M9nD7.png
I really Appreciate any feedback. Thank you.
One way I have found of doing this would be to use setActionView on the menuItem you want:
mNavigationView.getMenu().findItem(R.id.nav_connect)
.setActionView(new Switch(this));
// To set whether switch is on/off use:
((Switch) mNavigationView.getMenu().findItem(R.id.nav_connect).getActionView()).setChecked(true);
Probably want a click listener as well to change the state of the Switch:
mNavigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
#Override
public boolean onNavigationItemSelected(MenuItem menuItem) {
switch (menuItem.getItemId()) {
case R.id.nav_connect:
((Switch) menuItem.getActionView()).toggle();
return true;
}
}
}
I haven't tried, but you could probably use android:actionLayout="#layout/switch_layout" in xml and point to a custom layout you created.
Also could try using an ActionProvider which might offer a little more robustness. I haven't tried this method either though.
We can do it by the following way
#Override
public boolean onPrepareOptionsMenu(Menu menu) {
//Get a reference to your item by id
MenuItem item = menu.findItem(R.id.menu_pick_color);
//Here, you get access to the view of your item, in this case, the layout of the item has a FrameLayout as root view but you can change it to whatever you use
FrameLayout rootView = (FrameLayout)item.getActionView();
//Then you access to your control by finding it in the rootView
YourControlClass control = (YourControlClass) rootView.findViewById(R.id.control_id);
//And from here you can do whatever you want with your control
return true;
}
If you only want to check for the changes in the switch, you can set onCheckedChangeListener only for the switch like so
((Switch) navigationView.getMenu().findItem(R.id.darkModeSwitch).getActionView())
.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
#Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if(isChecked) {
Toast.makeText(MainActivity.this, "Checked", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(MainActivity.this, "Unchecked", Toast.LENGTH_SHORT).show();
}
}
});
If you want to be cool use lambda
((Switch) navigationView.getMenu().findItem(R.id.darkModeSwitch).getActionView())
.setOnCheckedChangeListener((buttonView, isChecked) -> {
if(isChecked) {
Toast.makeText(MainActivity.this, "Checked", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(MainActivity.this, "Unchecked", Toast.LENGTH_SHORT).show();
}
});

Categories