Android - What is the standard way to implement the tab now? - android

I'm a newbie of Android. I have searched for hours but I see many different approaches and many is deprecated.
I know this question is silly, but I really need someone's help.
What is the standard way that most developers do when they want to implement the tab, please give some informations.
Thanks.

The Android Design Support Library adds TabLayout, providing a tab implementation that matches the material design guidelines for tabs. A complete walkthrough of how to implement Tabs and ViewPager can be found in this video.

Related

Which one to use with tabhost: FragmentActivity or TabActivity?

I'm beginner in android development. When searching the web I have found that it is possible to make tabs by having the separate activities for each tab or have fragments instead. I would like to know more about theory so, my question is where it will be appropriate to use fragments and where activities? I'm curious because there might be some considerable differences for example in memory, performance or UI. Hope that I'm clear and will appreciate any help.
After reading articles on developer site, particularly page below, I have found that TabActivity is deprecated. They advice to use FragmentActivity and with the help of v4 support library it can be implemented in older version of android.
https://developer.android.com/reference/android/app/TabActivity.html

Is it better to create Navigation Tab using FragmentTabHost or SlidingTabLayout?

Tutorial found in Android Developer can't be used together with Toolbar and Android 5.0. The alternative solution is to use SlidingTabLayout. But currently, I found FragmentTabHost.
Which method is better? What is the pros and cons for each of them? What method should I use? I've googled it and found nothing regarding the comparison between them.
Having same question. After looking at it, it's depending on your requirement.
If it does not need sliding the FragmentTabHost is enough.

Introduction screens in Google Apps

I just bought a new phone and I noticed, opening for the first time Gmail and other G apps, some quite cool introduction screens.
I was wondering how this is implemented..
It doesn't look like just a simple ViewPager with fragments.
Could someone please give me an help?
I can't find any information online but those about ShowcaseView which is not what I'm looking for.
I developed a library which does exactly that: https://github.com/rubengees/introduction
And yes, it is done with a ViewPager with Fragments, but with a fairly complex layout.
Another library I have found also does it with a Viewpager: https://github.com/PaoloRotolo/AppIntro

Split screen concept for tablet in android

I am developing an application for tablet which has Split screen functionality,as we see an Gmail Application. My Left layout is fixed and my right one will change as per the buttons clicked on it.
I googled a lot for the solution,I found that we need to use Fragments for performing these.
Can anyone help me in solving these things.
Thanks
You could have explored d.android.com but now I would suggest you to refer it whenever you are facing problems/issues or looking for basic help.
Now, As you want to provide split functionality kind of UI in Android, check: Building a Flexible UI and I would suggest you to learn and explore Fragments.
Yes, you got that right. Fragments is the solution here. Using Fragments is easy and it's lifecycle is similar to that of an Activity. First get an overview of what a Fragment is here. Go over some of the tutorials about the use of Fragments : here and here.
this is a working example of what you want to achieve, good luck!
https://github.com/Jachu5/Android-UIprojects/tree/master/FragmentSplitedScreen

Horizontal view switching like in the official Google plus app

Anyone have a code sample of horizontal view switching like in the official Google plus app. Im mean were you switch between Nearby - Circles - Incomming in the Stream view.
What you're talking about is ViewPager.
It requires this Android compatibility library.
I recommend looking into Jake Wharton's library and then taking a look at Mark Allison's examples of styling it.
Maybe this can help you http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html
You can also use a ActionBar Sherlock Library for this

Categories

Resources