I have a screen which contains multiple fragments. In that i want to display the common data in all fragments. so i am looking for something like expandable menu (not from left side) to display in all fragments.
Actually its not a menu with divider, it has to just display some textviews and buttons
so on top of the screen, the menu should be expandable/collapsed for each fragments. Is there is any api is available in android to implement this?
Thanks
mindus
If i am not wrong you want a list which could be expanded from edges and shown on all your fragments.
Option 1:
You could use SlidingDrawer but that does not support all
direction. For multiple direction, you could go with
MultiDirectionSlidingDrawer
Option 2
If you want a swiping type of menu, then you can also try
SlidingMenu which could be swipe from left and right.
Option 3
You can also try the new DrawerLayout which was added in latest support library. It support swiping from all edges.
Related
I want to show 4 images like a slide show with translate (right to left) animation.
So I used ViewPager with 4 Fragments, and thread for automatic navigation to the next Fragment.
Everything was fine except navigation from the last item to the first.
In that case ViewPager scroll all Fragments (from left to right) to the first one, and this is the problem.
I need something like infinite navigating (right to left).
So what alternatives of ViewPager for doing this there are?
check this out , you can achieve using this
https://github.com/antonyt/InfiniteViewPager
hope it helps :)
I want to have a grid view menu or pop up menu that drop or slid with a button.not a Drawer layout.something like giddylizer app this:
giddylizer app image
is there any library?any helpful links and suggest...
As a suggestion , you can achieve that design easily by
Add frame layout into your main layout
Create two tabs with two fragments
Add grid-view into fragments
done.
In google play, if you enter a screen that uses tabs, you can notice how you can scroll each tab but the panel that seen to contain the tabs also moves vertically to a certain extent. I can imagine that it accomplishes the movement of the tab panel with a TranslateAnimation and a layout animations. But what I can't understand is how it decouples the content of the tab from the tab panel.
To answer the decoupling of the tabs and content question; I have implemented this before using 2 sets of tabs. One is in the content as a list header, the other is layered on top of the list in a containing FrameLayout so it's 'floating'.
Using scroll callbacks you can change the visibility of the floating tabs to suit your needs. Once the list header tabs moves off the screen make the floating tabs visible, once they move fully back onto the screen hide the floating tabs.
Just ensure that every time you show/hide tabs that you copy the values for horizontal scroll position and selected tab from the currently visible tabs to the ones that are about to become visible. works a treat.
The best open-source project you can find for this Android-ObservableScrollView
I am developing an android application where I need to put a navigation drawer which would have more than 3 levels.
What I want to do: If I click one item of my list in the drawer, a whole new list comes up in the drawer. This new list should also do the same when items of this list are clicked. This could go on for many levels.
What I have done till now: I am keeping an expandable list which expands when I click on any item. This design doesn't allow adding more levels.
Application which have similar drawers: svpply (please have a look at this application, it has a similar drawer)
I am a newbie in android development, try to add details to your ideas.
Thanks!
Have a single drawer keeping a FrameLayout.
Make all your list as ListFragment
Make Fragment Transaction on FrameLayout when a item is clicked.
I have to show two tabs each containing ListFragment classes. On clicking any item of the list, it's details should open on the right panel on landscape views. This is much like the official Android fragments example.
What I want to achieve is that on the left side of the layout the list view should be in tabs, i.e. two list views within tabs. On clicking any item the details should open on the right. Till now, I can show tabs and details, but the details are not showing up on the right. They open as a new activity.
Tab Navigation can be an option, but due to some design restraints in my app, I can't use that. Please guide.
Please check this android blog http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html It has a complete tutorial of how to use fragments as a Master-Details View.
I came to a solution. I am explaining how I did it, in case someone needs it.
I wanted to make tabs on the left fragment. Due to design constraints, I could not use Tab Navigation, as I had to use List Navigation too.
So, I made a new fragment placed over the left fragment and inflated it with two buttons. On different button clicks, I used FragmentTransaction to add new fragment to the left fragment.
On button click listener I used fragmentTransaction.replace method.