I try to transscript my Android-Application to materialdesign.
I use a NavigationDrawer (with the default AndroidStudio NavigationDrawer-template) and replace the container with a RecyclerView - works all fine.
I definded an FloatingActionButton (FAB) - works.
Now my problem: With i click on the FAB, i want to show an dialog (or something like this) to add new items. As "designguide" for this i use the GoogleCalender-App - "New Event"-Screen here:
I dont want to show the NavigationDrawer when i show the "Add Item" screen so i cannot replace the Navigation Drawer container with an Fragment.
Has someone an idea how to handle this? Maybe an (fullscreen) FragmentDialog?
Related
In my android app, i am having NavigationDrawer. Now, i want that when i click on any navigation-item, then
1) left drawer should remain open
2) previous listitem should be replaced by item-click content
3) item click content should be loaded within navigation view.
I searched but found few links suggesting to use ExpandableListview. Is there any facility to expand or collapse content of navigation item?
Is it according to android design patterns? if its possible then please suggest that how can i achieve it.
Thank you.
Here is a screenshot of the toolbar. It has three navigation items to the left which looks just like a tab-layout. When you select the third tab, a menu item pops up from right side of the toolbar.
How can i achieve this look? Is this a tablayout inside a toolbar? Or a tablayout and a toolbar next to each other? I've tried some stuff but failed.
I would use TabBarView. Then, in the Fragment you want a MenuItem to show (like the last tab in Periscope), add setHasOptionsMenu(true) and have the MenuItem's visibility be app:showAsAction="always". Wally also uses this UI pattern.
How do I hide the ActionBar as a user scrolls down a View?
I just created a sample activity from Android Studio's default "Tabbed Activity" using navigation style "Action Bar Tabs (with ViewPager". From there, if a user swipes down one of the tabs, how can I implement that effect of hiding the ActionBar and then pulling it back down when the user scrolls up? (Just like Google Play app does).
EDIT:
One of the tabs has a RecyclerView with some Views inside. It scrolls vertically. So you can read this as: how to hide the ActionBar as I scroll down this RecyclerView?
EDIT 2:
Visually, I'm trying to achieve this:
try this
getSupportActionBar.hide(); // if it extends action bar activity
or
getActionBar.hide();
I have implemented Google's navigation drawer and I would like to add a custom animation when I click a menu item.
Ideally the menu would slide back as if closing, leaving a small sliver of the menu open. A dialog would open with an animation, originating from the space beside the selected menu item.
Something like this..
I tried to animate the left_drawer element on the x axis using ObjectAnimator, but this displaces the whole screen.
Can anyone help?
If you want it so the drawer is only peaking, try using drawerLayout.closeDrawers(true).
According to the source though, this closes all drawers (if you have more then one).
DrawLayout source
I have implement bottom bar as show below I achieved this using view flipper, its work perfect but when I select any one item to start new activity, its blink because of activity change.
I want to make this bottom-bar behave like as tab in which only tab change and it wont blink activity.
Design a seperate layout with the Bottom images and their behavior (like using selector etc to change state when you click on it ) and add that layout to your Activity XML using
<include> </include> tag