navigation-drawer

Android, DrawerLayout + Fragments + CollapsingToolbarLayout

怎甘沉沦 提交于 2019-11-29 03:41:56
问题 Is it possible to have a CoordinatorLayout / CollapsingToolbarLayout in the fragments shown in the main container of a DrawerLayout? An answer to another question suggests that each fragment could have its own Toolbar. But this doesn't work well with the ActionBarDrawerToggle as it requires a Toolbar to link to the open/close drawer behaviour. Has anybody achieved this, or do you have pointers about this? Thanks. EDIT : I've been focusing some efforts in putting a single Toolbar in the

How to implement Expandable android navigation drawer with subitems?

…衆ロ難τιáo~ 提交于 2019-11-29 02:56:31
问题 How to implement android navigation drawer like this? TopLevelView1 ~ TopLevelView4 can select and no children TopVevelView5 can collaspe My question is that if my group structure like this for example All Stared Category ----mp3 ----txt ----doc ----pdf when I select all then show all file. when I select stared then show stared file only. when I select mp3 then show only mp3 files. and Category can expand and collapse. 回答1: For navigation: Alternative 1: Sliding Menu, which I would definitely

Navigation Drawer rendering error in ADT Layout Editor

扶醉桌前 提交于 2019-11-29 02:52:11
<FrameLayout android:id="@+id/content_frame" android:layout_width="match_parent" android:layout_height="match_parent" /> <ListView android:id="@+id/left_drawer" android:layout_width="240dp" android:layout_height="match_parent" android:layout_gravity="start" android:background="#111" android:choiceMode="singleChoice" android:divider="@android:color/transparent" android:dividerHeight="0dp" /> Adding that to the layout xml as per Create a Navigation Drawer documentation produces Exception raised during rendering: DrawerLayout must be measured with MeasureSpec.EXACTLY. Exception details are logged

navigation drawer google maps v2 , map blocking drawer

与世无争的帅哥 提交于 2019-11-29 02:51:21
问题 I have this problem when opening drawer on gingerbread and behind is google map v2. Map that should be on screen behind gets on top of everything. Now I could bypass this by hiding map when drawer opens and show it when closes but I'm looking for more elegant solution if someone came up with any? 回答1: There is a bug with google maps api v2 and black space. Maybe you have got similar problem. For solutions look here: https://github.com/jfeinstein10/SlidingMenu/issues/228 and here: https:/

How to create mini-drawer menu in Android?

て烟熏妆下的殇ゞ 提交于 2019-11-29 02:48:28
问题 I am looking to create a mini-drawer menu like in google example: I have tried to create a layout that always stays there on ParentLeft, and the menu to overflow it when it opens, but it does not look natural. Does anyone know how do I do it? Update I have tried another way. To listen to menu sliding, and to catch when it is closed enough, then I can set menu size, and keep icons visible, but text to be gone. @Override public void onDrawerSlide(float v, int i) { Log.d("onDrawerSlide", "v=" +

Touch anywhere to slide open menu for navigation drawer

一世执手 提交于 2019-11-29 02:40:20
问题 For Sliding menu by jfeinstein10 (https://github.com/jfeinstein10/SlidingMenu), I can slide anywhere in the app to slide open the menu. For Google newly introduced navigation drawer http://developer.android.com/design/patterns/navigation-drawer.html#side-nav, is there any way I can have similar behaviour? So far, from documentation, I saw it only limit to slide from edge or touching the app icon. The user can bring the navigation drawer onto the screen by swiping from the left edge of the

ActionBarDrawerToggle No Suitable Constructor Drawable

可紊 提交于 2019-11-29 02:39:11
I have simple code to create simple navigation drawer, but when i declare parameter for ActionBarDrawerToggle it's say that drawable icon cannot be applied... Gradle Massages Build Error:(36, 26) error: no suitable constructor found for ActionBarDrawerToggle(MainActivity,DrawerLayout,int,int,int) constructor ActionBarDrawerToggle.ActionBarDrawerToggle(Activity,DrawerLayout,Toolbar,int,int) is not applicable (argument mismatch; int cannot be converted to Toolbar) constructor ActionBarDrawerToggle. <T>ActionBarDrawerToggle(Activity,Toolbar,DrawerLayout,T,int,int) is not applicable (cannot infer

Clicking hamburger icon on Toolbar does not open Navigation Drawer

拟墨画扇 提交于 2019-11-29 02:12:49
问题 I have a simple android.support.v7.widget.Toolbar and all I am trying to do is to open a NavigationDrawer by pressing the "hamburger" icon in the top left corner. The "hamburger" button is visible, and when I start to pull from the left I see the animation on the button but pressing the button does not open/close the NavigationDrawer as I expect. I have followed the [Google Documentation][1] and still am not able to figure this out. Sorry for any confusion, below is the simplified code I am

Different toolbar for fragments and Navigation Drawer

╄→尐↘猪︶ㄣ 提交于 2019-11-29 01:57:50
Please, explain to me... I have Navigation Drawer in my Activity and it syncs with Toolbar (like ActionBar ). Activity has few fragments and in different fragments I need to use different AppBar modes (parallax in one, simple in another). So, I think that I should set CoordinatorLayout in each frament with AppBar and content. But how I can replace last toolbar on new to save synchronization with Drawer? Or it's wrong way and I need make it some else? If you are using DrawerLayout and NavigationView for your navigation drawer, best solution according to me would be to use individual

ExpandableListView and the NavigationDrawer

时光怂恿深爱的人放手 提交于 2019-11-29 01:36:25
问题 I am having a pretty strange issue. My logic is simple, my app uses a NavigationDrawer for main application navigation, and due to the complexity of the options available, I want to use an ExpandableListViev to nest some navigation items. The issue? Simple too: The list of items loads on the drawer; however, they don't expand to show the children. The Question Is there any reason it wouldn't expand? Should I use a different UI widget for this? Some Notes : I added the same code on a different