Navigation Tabs - android

I am writing one application where i want to follow latest design guidlines for android. And now i want to use TABS as in 4.0 there is not recommended to use TabWidgets anymore and it is recommended to use Navigation Tabs i checked this http://developer.android.com/guide/topics/ui/actionbar.html - At navigation tabs
But i dont realy understand how i am able to do this. Dont know where to include this ActionBar.TabListener etc. Are there any more detailed tutorials for this or does anyone here have any detailed code.
Thank you!

Here is a good example of using Action Bar:
http://www.java2s.com/Code/Android/UI/Usingactionbartabsandhowtheyinteractwithotheractionbarfeatures.htm
Also some good examples here:
Actionbarsherlock + tabs + multi fragments?

Check this ActionBarSharelock and the same thing on Github.

Related

other alternatives to sliding tabs

seems that starting Lollipop the ActionBar "setNavigationMode" method is deprecated. i know that google now offers to use sliding tabs and view pager however I am unable to understand the code completely. is there any alternative that I can use? if there isnt then can someone suggest for a good tutorial on that?
I need to achieve two tabs when each one holds a fragment.
I plan on using the SlidingTabsLayout technique instead of the new ActionBarCompat or Toolbar. It seems you don’t like it when reading from your original post. However there is sample working code at SlidingTabsBasic.
If you download the zip file, you may have to import the project instead of opening it. When you import, find the build.gradle file of the project. So far it seems this is not much difference than the link you posted at Github https://gist.github.com/eluleci/199be9a0d1af42653b5b.
I predict when the new Toolbar is stable, I can integrate some of this code like the ViewPager and PageAdapter.
I am thinking of the same thing since I want to support the new Lollipop. There is a Stackoverflow link at Action bar navigation modes are deprecated in Android L
Let me know what you found or decided. Perhaps we can work together. Have fun!

Flickr-like Android ActionBar

I have been doing a small research on UI designs for Android for the last few weeks. My main concern right now is the action bar along with tabs. I believe the default android implementation takes to much room on the screen.
Recently I took a look at the Flickr app and I really like how they do this but I am not sure how to implement tabs this smoothly inside the action bar itself.
All help / ideas are appreciated.
Thanks in advance.
Screenshot of the action bar can be found here:
https://dl.dropboxusercontent.com/u/242865/Screenshot_2014-11-11-11-04-05.png
Check out this library on github.
It's an Android Library to help you create actionbar tabs like Capitaine train app by Cyril Mottier.
You have to set a customview in your actionbar and use something like ViewPagerIndicator
http://viewpagerindicator.com/
To setup a custom view in your actionbar just use setCustomView but remember to enable the display of custom view first.
Take a look at this
http://www.jfarrell.net/2013/10/customizing-action-bar-in-android.html

Android: Horizontal View Swiping and Switching Activities

I am new in Android Development. and going to create a new app. in which i need following type of navigation in Android 2.2 and above.
http://i.stack.imgur.com/wwG1Z.png
I saw a tutorial at http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html
But he is Only Swiping Pages. There are no Tabs like In Above image. And also he is updating some text view but i want to switch between activities or layouts.
I have tried many things. ActionBarSherlock it created many errors.
The thing I need is
developer.android.com/training/implementing-navigation/index.html
developer.android.com/shareables/training/EffectiveNavigation.zip
In Above file CollectionDemoActivity is the thing Which I actually looking for Android 2.2 and above.
If someone have project like this please share code.
This is a sample project for using ActionBarSherlock with a ViewPager to have tabs & swipe together. It works, I've used it.
You might want to check out Jake Wharton's other project, Viewpagerindicator. It provides the functionality that you are after. And here is a tutorial for using them together. There are also some excellent guides over at Styling Android.

Which is the best way to create custom tabs in Android 2.2

I would like to know which will be the best method to create custom tabs in Android 2.2. something like this.
I know about the TabHost but not satisfied with its UI. I would like to create my own tab UI in 2.2 like shown in the above pic. Please suggest me the best and easy method to do this.
Create a custom view for your tab complete with state lists drawables and more!
Best tutorial for you:
http://joshclemm.com/blog/?p=136
And this is a example code:
http://code.google.com/p/android-custom-tabs/
ActionBarSherlock has tab feature. You can download Demos Sample from here and look at Tab Navigation Sample. I think you can find it useful.

Fragment based Tabs without ActionBar

Google's FragmentTabs demo feels very hackish to me. Does anyone know a nice way to have fragment based tabs that do not rely on the ActionBar?
The ActionBar is not an option, because the tabs must appear somewhere else on the screen. Also, the ActionBar lacks in the support library.
Just wanted to check before I go on and build my own solution...
I used this implementation in my app and it works great. It does not require an ActionBar and uses Fragments with a ViewPager. I came across this if anyone is still interested...
SwipeyTabs
Also here is a blog post about it:
http://blog.peterkuterna.net/2011/09/viewpager-meets-swipey-tabs.html
TabActivity in the Android docs
has an example using fragments and the TabHost and TabWidget. Hope this helps.

Categories

Resources