drawer

How to Disable drawer in fragment and back back to correct fragment

倖福魔咒の 提交于 2019-12-04 05:16:32
I have a main Activity with a Fragment layout. The drawer has 3 option: Fragment[1], Fragment[2], Fragment[3]. Inside Fragment[2] and Fragment[3] is one button. This button open other fragment. Fragment[4]. I want Fragment[4] without drawer but with a back button. This is the onClick code in Fragment[2] Fragment fragment = new InstalacionesEncontradasFragment(); Bundle bundle = new Bundle(); bundle.putSerializable("key", this.instalacionesConCategorias); fragment.setArguments(bundle); FragmentManager fragmentManager = getFragmentManager(); FragmentTransaction mFragmentTransaction =

How can I dismiss the Navigation Drawer to use the Back-home-icon button?

丶灬走出姿态 提交于 2019-12-04 04:39:40
I'm using the action bar with search bar too, and I need to use the ActionBar ico like a Back button: But I'm using the navigation drawer too... How can I dismiss/hide/disable the Navigation Drawer menu to use the back button? My ActionBar code: @Override public boolean onCreateOptionsMenu(Menu menu){ MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.main, menu); this.getSupportActionBar().setDisplayShowCustomEnabled(true); this.getSupportActionBar().setDisplayShowTitleEnabled(false); this.getSupportActionBar().setDisplayHomeAsUpEnabled(true); this.getSupportActionBar()

android - open navigation drawer by clicking the app icon?

旧城冷巷雨未停 提交于 2019-12-03 05:24:24
I use a navigation drawer in my app (the type of navigation that you open by sliding from the left side of the screen). Now, usually you can also open it by tapping the app icon, and when I looked it up, I found a whole bunch of code to add to your activity. And just for a simple button. I suppose thats not exactly what I am looking for? And if it really needs to be so much code for a single button, what is the best way to make the code more clear? Thank you, and sorry for being such an android newb. I ran into this issue also, assuming you already have an ActionBarDrawerToggle as @Kernald

Android: NavigationDrawer and ActionBarCompat

余生颓废 提交于 2019-12-03 05:17:38
问题 I started working with NavigationDrawer using ActionBarSherlock and got good results, but my company approving this Open Source is not likely to come anytime soon, so I'm working to switch to ActionBarCompat. ActionBarCompat was just officially released yesterday (July 24th, 2013). Has anyone gotten both to work well with each other? I'm hoping I can answer my own question, but seeing if anyone has gotten this to work. The race is on! :-) YouTube on ActionBarCompat's release: https://www

How can I use the Navigation Drawer without fragments?

[亡魂溺海] 提交于 2019-12-03 03:37:51
I'm trying to follow this tutorial on how to create a Navigation Drawer, but I don't want to use Fragments to show new content after the user select an item from the drawer list. What's the best aproach to get around this problem? I'm using API 10 which doesn't implements Fragments. First, API 10 has access to fragments via the same Android Support package that contains the DrawerLayout . This has been around for over two years, and you should not be trying to mess with new things like DrawerLayout if you are unfamiliar with what Android has had for the past two years. Second, there is nothing

Material Design Lite (MDL) Navigation Drawer on the right side

二次信任 提交于 2019-12-03 03:26:49
I am using Google Material Design Lite (MDL) for web and I am unable to put the navigation drawer on the right side. The documentation has none information about how to do that. Is that even possible? The default drawer always come from the left. <header class="custom-header mdl-layout__header mdl-layout__header--waterfall"> <div class="mdl-layout__drawer-button"> <i class="material-icons">menu</i> </div> <div class="mdl-layout__header-row"> <span class="mdl-layout-title">My App</span> </div> </header> <div class="mdl-layout__drawer"> drawer contents... </div> There isn't really a proper way

iOS: Sliding UIView on/off screen

ぃ、小莉子 提交于 2019-12-03 02:27:40
问题 I'm working on an app where having a "drawer" on the left-hand side would be very beneficial. I'm doing some initial testing to see how I would best accomplish this, and I'm having some very basic trouble. My Setup 1. I am using a single-view application template in Xcode 4. 2. To the xib's "main/border" view, I've added 2 UIViews (LeftPanel and RightPanel) and a UIButton (ShowHideButton). 3. I've colored the LeftPanel green and the RightPanel blue for easier visibility. 4. When the view is

What is the difference between the SlidingMenu library and the Android Navigation Drawer?

瘦欲@ 提交于 2019-12-02 22:35:01
The SlidingMenu library is an excellent third party library and I've already used it for a long time. Now I know Android provides a new navigation pattern using Navigation Drawer. It looks like the sliding menu. So is there anyone who already uses these two both? What is the difference and what are the pros and cons? Thanks a lot. SlidingMenu library is a third party api which uses a RelativeLayout inside. The main advantage is customization according to your requirement. Buy your layouts have to be based on a viewgroup, unfortunatly this negates the <merge> optimisations. Navigation Drawer is

iOS: Sliding UIView on/off screen

家住魔仙堡 提交于 2019-12-02 16:01:09
I'm working on an app where having a "drawer" on the left-hand side would be very beneficial. I'm doing some initial testing to see how I would best accomplish this, and I'm having some very basic trouble. My Setup 1. I am using a single-view application template in Xcode 4. 2. To the xib's "main/border" view, I've added 2 UIViews (LeftPanel and RightPanel) and a UIButton (ShowHideButton). 3. I've colored the LeftPanel green and the RightPanel blue for easier visibility. 4. When the view is loaded, both panels are visible and the UIButton has the text "Hide Panel". 5. Upon pressing the button,

How to close navigation drawer immediately after an item is pressed?

£可爱£侵袭症+ 提交于 2019-12-02 10:25:19
问题 I'm using navigation drawer working fine, but it closing slowly after an item is pressed. This happens if next activity has a extra code in oncreate method otherwise working properly.. So please help to solve this 回答1: I just managed to solve the problem you're experiencing. First of all i have to say that i'm working on Android Studio 1.1.0 generated NavigationDrawer project. This is the method onCreateView() of the class NavigationDrawerFragment @Override public View onCreateView