navigation-drawer

React native BottomTabNavigator with DrawerNavigator, how to keep bottom navigator visible all the time

你说的曾经没有我的故事 提交于 2020-07-05 12:28:13
问题 I have gone through various posts on SO and github about react navigation, but most of them are a combination of react native stack navigator with drawer navigator. I couldn't find anything that could help fix my problem. What i am trying to do is i have a bottom tab bar with five screens which load nicely with correct data, i want to add a drawer navigator to provide more screens and have different data. I have managed to build the drawer navigator on top of the tab navigator but when the

Why is dispatch() causing redirect to initialRouteName in react-navigation?

倾然丶 夕夏残阳落幕 提交于 2020-06-29 04:30:32
问题 I'm having a problem where every dispatch causes the navigator to redirect to my initialRouteName . Because of my componentDidUpdate methods, I eventually land on the correct screen, but only in some cases. I have used ReactNavigation several times before without any problems. The only thing that stands out is that <NavigationContainer onStateChange is getting called once for all dispatch'd action, not just those under the navigator reducer. Is that normal? root.js import 'react-native

How to add a group to navigation drawer programmatically

喜你入骨 提交于 2020-06-27 08:15:26
问题 I have a navigation drawer in my android app. I can add groups and items to it by mean of XML, however, I need to add new groups to it programmatically. For example, I have this XML: <group android:checkableBehavior="single"> <item android:id="@+id/nav_camara" android:icon="@android:drawable/ic_menu_camera" android:title="Import" /> <item android:id="@+id/nav_gallery" android:icon="@android:drawable/ic_menu_gallery" android:title="Gallery" /> <item android:id="@+id/nav_slideshow" android:icon

How to add a group to navigation drawer programmatically

点点圈 提交于 2020-06-27 08:15:20
问题 I have a navigation drawer in my android app. I can add groups and items to it by mean of XML, however, I need to add new groups to it programmatically. For example, I have this XML: <group android:checkableBehavior="single"> <item android:id="@+id/nav_camara" android:icon="@android:drawable/ic_menu_camera" android:title="Import" /> <item android:id="@+id/nav_gallery" android:icon="@android:drawable/ic_menu_gallery" android:title="Gallery" /> <item android:id="@+id/nav_slideshow" android:icon

Clicking on item of Navigation Drawer doesn’t open fragments

Deadly 提交于 2020-06-16 07:25:11
问题 I want to use the default Navigation Drawer Activity of Android Studio (v. 3.5). After creating this default activity (New Project --> Navigation Drawer Activity) I started this templet. If I click on one of the icons of the navigation menu (e.g. “Gallery”) the current fragment of the NavHost doesn’t change. As I understand the following section: https://developer.android.com/guide/navigation/navigation-ui#Tie-navdrawer the NavController should navigate to the chosen destination if the id of

Can I listen to when the Navigation drawer is opened or closed (e.g: listener like button onclick)?

让人想犯罪 __ 提交于 2020-06-08 07:10:11
问题 I want to call some methods when Navigation Drawer is opened & closed. How can I listen to it (like button's onclick listener) ? I know we can check ( mDrawer.isDrawerOpen(Gravity.LEFT) ) or ( (mDrawer.isDrawerClose(Gravity.LEFT)) ). Thanks in Advance. 回答1: Yeah there are four abstract methods that you can use as listeners public abstract void onDrawerClosed (View drawerView) public abstract void onDrawerOpened (View drawerView) public abstract void onDrawerSlide (View drawerView, float

NavigationDrawer with Activities vs. NavigationDrawer with Fragments

半世苍凉 提交于 2020-06-07 09:28:46
问题 Take for example the app I'm currently working on: - it has an navigationDrawer with multiple items; there are two items which interest me for now, i'll call them X and Y. both X and Y, when clicked on, display a fragment containing a list of x-elements or y-elements selecting and x or y list element displays a new fragment in which I display info about the select item; the view fragments are different for x and y elements in the view fragment I can choose to edit the specific element which

How to add a navigation drawer?

谁都会走 提交于 2020-05-23 07:22:26
问题 In the following activity, i have a fragment and an image on it. The Fragment is just a darker Action Bar that has a picture on it. I'm trying to have a left slide menu as a fragment so i could have it on every activity. MainActivity; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.Button; import android.widget.TextView; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super

Navigation drawer stuck when offline data loading

痴心易碎 提交于 2020-05-18 20:54:51
问题 I am developing news app user can download video and image. So I developed navigation drawer with different fragment with material design. But I am facing some problem in it when I click gallery (where I show the downloaded video and images) it stuck for some time and then open fragment. it happened only in specific fragment but not all. see Video here. Here is my code: MainActivity.java public class MainActivity extends AppCompatActivity implements FragmentDrawer.FragmentDrawerListener {

Navigation drawer stuck when offline data loading

余生颓废 提交于 2020-05-18 20:54:01
问题 I am developing news app user can download video and image. So I developed navigation drawer with different fragment with material design. But I am facing some problem in it when I click gallery (where I show the downloaded video and images) it stuck for some time and then open fragment. it happened only in specific fragment but not all. see Video here. Here is my code: MainActivity.java public class MainActivity extends AppCompatActivity implements FragmentDrawer.FragmentDrawerListener {