Sliding Tabs like the new Google Play Store 5.0 - android

How can I implement a Sliding Tabs like in the new Google Play Store 5.0?
click for the image
I have seen so much examples, but all using a "addTab" that is deprecated or not run on android 2.x.
I need a example about this implementation.
My Idea is that in my APP the tabs will be created in according with the information that come of my Web Service. So my APP can have 3 tabs or 40 tabs.

Here is an barebones example in the documentation: http://developer.android.com/training/implementing-navigation/lateral.html#PagerTitleStrip
Also, here is the PagerTitleStrip documentation.

Related

Android material tabs w/ appcompat

I want to setup a 'tabbed' application. Looking through all the tutorials including the google docs here:
http://developer.android.com/training/implementing-navigation/lateral.html
However as I start to go through the docs I get all kinds of deprecated warnings:
actionBar.setSelectedNavigationItem(position);
I would really like to start off right and use any new non deprecated methods. Most examples of tab applications are years old. What am I missing? Am I searching for the wrong thing? Can someone point me in the right direction for developing a tabbed application.
What am I missing?
Action bar tabs were deprecated in Android 5.0, last fall.
Can someone point me in the right direction for developing a tabbed application.
Use TabLayout, though this is a very new addition to the Android Support libraries.
Or, use ViewPager with your favorite tabbed indicator, of which there are many.
Or, use FragmentTabHost.

How do you enable Actionbar folder affordances like new GMail app

I would like to create an Android application that uses the same ActionBar folder affordances that the new GMail application employs (the Three horizontal lines to the right of the GMail M).
and when pressed a folder menu list slides out from the right side of the screen
i have tried searching the google docs but have failed to find what i am looking for.
I had guess it was a slidingDrawer widget, however that has been deprecated in API 17.
It's called a DrawerLayout and is part of the official support library. The Android training section provides a good tutorial on it here. Here you can find an in-depth design documentation of how you should use it and how its navigation should work.
The three lines to the LEFT of the icon slide out the new Navigation Drawer pattern which was introduced by google at this years Google I/O.
http://developer.android.com/training/implementing-navigation/nav-drawer.html

Android - How can I locate the tab indicator between the two tab TextViews?

As far as I know, there are components ViewPager and ActionBar can support "tab navigation" mode but they don't have intermediate tab indicator between the tabs, just only positioning below a tab TextView.
How the Google Play app implemented this feature: POSITIONING linked with transition ?
You can achieve this by implementing android:actionBarTabStyle using ActionBarSherlock library.
Update:
I don't have idea exactly about this, but hope you know Android team has integrated the same pattern in I/O 2013 Android app and it will open sourced soon.
Update 2:
I just came across one library which can fulfill your requirement, check this: https://github.com/astuetz/PagerSlidingTabStrip

Android Tab Bar Controller (Fragment or Action Bar or TabHost)

I've been slowly porting my iOS App to Android so I can take my time and make sure that it functions correctly and I'm now at the part where I need to create a TabBarController like environment. I've been searching for days and have come across numerous examples but with each example there's a problem.
First, most examples refer to using a TabActivity, which when I just checked is deprecated and can't be used. The one's that don't use TabActivity either use Fragments (sometimes with an Action Bar) or a Tab Host. It looks like Fragments is the way to go, but then how to you support older devices (from the Android website over 50% of there users are still on API 10).
Basically what I need to set up is a Tabbed environment that will let each tab load a new Activity, and then each of those Activities will have their own navigation based hierarchy as well so I'm trying to see what is the best option to pursue and if anyone has seen some examples that can help.
I've found 4 tutorials so far that have fragments and different activities for each Tab, so I'm going to look into those now but just wanted to see if any other developers that have already come across and issue like this did to work with the compatibility issues with older devices.
You can use Fragments all the way down to API 4 using the Support Library. I'd use a single Activity with multiple Fragments in ActionBar tabs, though you might need to do it with TabHost to support lower APIs.

Navigation (pagination) inside articles like Google Current (Android)

I would like some help about an Android Application. I used the new Google Currents application and saw how the user can navigate inside an article. This is like the iOS' dots but with a bar instead of the dots.
Can you give me some clue about how google did it ? I'm not asking the code but the way to do it because I can't figure out how to begin.
You can try using a ViewPager with a ViewPagerIndicator like the one in Google Currents
More on
ViewPager
ViewPagerIndicator:
You are referring to the 'circles' ViewPagerIndicator like so:
For more information, try downloading the sample ViewPagerIndicator app from the play store

Categories

Resources