How do i implement these tabs, the same as in Google plus profile page?
I think I can't use ActionBar tabs as they are clinged to ActionBar. I want the tabs to be below an image like in this image. Also i want these tabs to be fixed. I want three tabs and all three tabs should be visible on screen - as the android fixed tabs plus swipe layout which uses Action Bar tabs though.
Have a look at Jake Wharton's excellent Android ViewPagerIndicator library.
This sample gives you what you are after.
i have been looking for something like that, but the closest solution i have found is this:
Google+ profile like scrolling Effect
Hope it helps.
Related
I have chosen action bar with navigation tabs for fulfilling my app requirement.
If I set three tabs in navigation mode, window width is good enough to show all the tabs. When I add more than 3, say 5, tabs are visible and I can access it by scrolling horizontally. Even though, tabs are visible only on scrolling to right and user may not aware that more tabs are available.
Is it possible to add arrow images in Navigation TabView if more tabs were available? I believe navigation tabs are shown in stack view of actionbar. Is there some way to add custom view in stacked layout of actionbar?
possibly unrelated (and feel free to comment as such so that I delete the answer) but have you considered using swipe views instead of ActionBar tabs?
http://developer.android.com/training/implementing-navigation/lateral.html
They're really easy to use and you can customize them very easily to do what you want and to include any sort of layout you deem applicable to your app. Have a look at
http://viewpagerindicator.com/
for ideas on what's possible.
As I am new to android, I want to implement swipe tabs (fixed tabs).
My requirement is to implement two tabs in the tab with Google map and other tab with list view.
above mentioned image manner i want to implement
Thanks in Advance....
Check out the Android Material Design Working With Tabs
I absolutely agree with this post. this was the one i have used
I've set up a ViewPager in my App with tabs, but I need to position the tabs underneath a button so the layout would be
TitleBar
Button to search activities on a day
Tabs of each day there are activities
Is that kind of layout possible to do using Tabs or will I need a different approach to solve this?
The way the activity is running is theres a main activity, and the layout is just the button and a FrameLayout, and the the list (where the ViewPager is) is set up in a fragment and the fragment is loaded into the FrameLayout. I don't know if this is the best method for this so if not please add your recommendations of a better method I could use.
EDIT: If I could get it so all the tabs were at the bottom of the screen this would also be fine.
Is that kind of layout possible to do using Tabs
Not with action bar tabs. Not only can you not control where the tabs go, you cannot even control if there will be tabs versus a drop-down list.
will I need a different approach to solve this?
You are welcome to use some other tab solution (ViewPager with a tabbed indicator, FragmentTabHost, etc.) where you have more control.
Note that your proposed design does not adhere to Android design aesthetics. Most apps would not have "Button to search activities on a day", but instead a search action bar item, or perhaps a SearchView in the action bar.
If I could get it so all the tabs were at the bottom of the screen this would also be fine.
This is completely against the Android design guidelines. Don't use bottom tab bars on Android.
I would like to use the component tabs Android but within a layout. In fact, I would like the tabs is not sticking to my action bar in order to display information between.
Here is an example image of what I would get:
You can add tabs inside a FragmentTabHost
Here is a tutorial implementing this
http://www.betteropts.com/fragmenttabhost-tutorial-using-fragment-as-tab-content-and-keep-navigation-history-for-each-tab/
I'm using Android sherlock fragment tabs for creating a layout for swiping the tabs.
Now what I want to do is put the tabs below a relative layout , but the tabs headers are appearing at the top while it's content is appearing where it should be.
You may use standalone tabs widget like https://github.com/JakeWharton/Android-ViewPagerIndicator
or move existing tabs using technique (really hack) described at http://kriomant.blogspot.ru/2013/08/navigation-drawer-tabs-overlap.html
But in case of hack current tab indicator will still be drawn at the bottom. I didn't investigate whether it is possible to move it.