navigation-drawer

Navigation drawer in multiple activities

て烟熏妆下的殇ゞ 提交于 2019-12-23 04:26:39
问题 I know this question has been asked multiple times. But my concern is different. Using Mr. Tamada Tutorial I've created a NavigaionActivity and multiple fragments to replace in FrameLayout . It's working fine. Now, after selecting any option in a fragment, another activity gets open. I want the same Navigation menu in that Activity. Navigation view -- fragments -- Activity (display navigation view here) What I tried: use the xml code of displaying Navigation view in that activity.

Setting icons to the menu items

自闭症网瘾萝莉.ら 提交于 2019-12-23 04:23:10
问题 I have a navigation drawer with several menu items. I'm trying to dynamically change the menu icon and text color of one of the menu items. Following code is in onCreate() of one of the activity classes which have the navigation drawer: NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view); navigationView.setNavigationItemSelectedListener(this); changeItemWiseTextProperties(navigationView.getMenu()); And here's the method definition: public void

Navigation Drawer Header is not hiding

南楼画角 提交于 2019-12-23 03:32:52
问题 I tried to create one simple app with Drawer Menu. I created a project with Android Studio and select Navigation Drawer Layout. I'm trying to hide navigation drawer header and put it on toolbar... I found the way to put on toolbar but I can't find hide RED part of header in picture. Can you help me please. Here is my layout page xml codes <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns

Navigation Drawer setOnItemClickListener not working

断了今生、忘了曾经 提交于 2019-12-23 02:38:28
问题 I want the navigation drawer to show up wenn clicking a button, therefore I use the following code. I handle click events inside the custom adapter, but the drawer does not close at any point in time when clicking any of the objects in my list. Any idea how to fix that? Another problem is that I can draw in the navigation drawer only from the bottom to the middle of the screen. How can I fix that? In my Activity mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); mDrawerList =

NavigationDrawer is not working

左心房为你撑大大i 提交于 2019-12-23 01:44:12
问题 I have read the documentation for NavigationDrawer and tried to create it in my own application. But there is a trouble: the ListView that should be used as menu just floats over the main content and I can't perform any actions with it (e.g. close by swipe). What is the problem? <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" >

NavigationDrawer is not working

為{幸葍}努か 提交于 2019-12-23 01:43:45
问题 I have read the documentation for NavigationDrawer and tried to create it in my own application. But there is a trouble: the ListView that should be used as menu just floats over the main content and I can't perform any actions with it (e.g. close by swipe). What is the problem? <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" >

How to create drawer navigation like this?

你离开我真会死。 提交于 2019-12-23 00:24:33
问题 Hi guys, I wanna create the drawer navigation. I have read some docs, but it didnt work, so I will show u the picture that I want my drawer layout to look like this. Hope you can spend some to help me :) 回答1: You must make an ExpandableListView in your NavigationDrawer ExpandableListView : here NavigationDrawer : here Example : <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent"

How to create drawer navigation like this?

北慕城南 提交于 2019-12-23 00:24:04
问题 Hi guys, I wanna create the drawer navigation. I have read some docs, but it didnt work, so I will show u the picture that I want my drawer layout to look like this. Hope you can spend some to help me :) 回答1: You must make an ExpandableListView in your NavigationDrawer ExpandableListView : here NavigationDrawer : here Example : <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent"

NavigationView and Translucent Status Bar

江枫思渺然 提交于 2019-12-22 17:09:08
问题 I followed all the tips on SO on how to achieve this and no success so far... I would like to have a Semi-transparent/transparent (not sure of the difference) status bar. UPDATE 25/03/16: I tried all kinds of Theme attributes without progress. Updated question with what I attempted for the v21 styles file and a Bounty . Does anyone have an idea? fitSystemWindows is set in both my DrawerLayout and NavigationView in the xml: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas

DrawerLayout inside ConstaintLayout - java.lang.IllegalArgumentException: DrawerLayout must be measured with MeasureSpec.EXACTLY

本小妞迷上赌 提交于 2019-12-22 16:52:28
问题 Here my xml layout file: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout 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:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v4.widget.DrawerLayout android:layout_width="0dp" android:layout_height="wrap_content" app:layout_constraintBottom_toBottomOf="parent" app