other alternatives to sliding tabs - android

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!

Related

Creating swipeable intro in android

I'm looking for a a tutorial or a start for creating swipeable intros like this image for introducing and helping users in using the app, I know it is based on android swipeable views but all the links I found had tabs, and since these kinds of intros are very popular I though maybe there is a better and more forward way to do it.
Thanks very much
Try to use : Android-ViewPagerIndicator lib(https://github.com/JakeWharton/Android-ViewPagerIndicator)
You need to use a ViewPager and a library called ViewPagerIndicator for the small circle at the bottom.

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.

Navigation Tabs

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.

Is it possible to show tab host on overall application in android

Can I implement a tab host which will remain in overall application and works through out the application .
and
Also can i implement the tab host on the top and on the bottom of the same activity.
Any tutorial any help please....
Thanks
This is possible if you use Activity Group. But still it is deprecated and hence you cannot use it for newer versions of android. But still, you can go through what it is and try to implement it.
ActivityGroup Example
http://blog.henriklarsentoft.com/2010/07/android-tabactivity-nested-activities/
http://gamma-point.com/content/android-how-have-multiple-activities-under-single-tab-tabactivity
So now since Activity Groups are deprecated what is the alternate strategy we can make use of? Here is the solution for this problem.
Go for fragments or Views.
I have pasted the comment which I recieved from Commonsware regarding the ActivityGroup.
You never needed ActivityGroup to use tabs. You can put views in tabs, for example (github.com/commonsguy/cw-android/tree/master/Fancy/Tab). Going forward, tabs are in the action bar on Honeycomb, typically using fragments. You can achieve the same functionality on previous versions of Android using ActionBarSherlock.

Android Patterns

I'm want to improve the design of my app. Looking for some patterns, I've found http://www.androidpatterns.com.
For Action Bars pattern, I've found a perfect library (actionbarsherlock.com).
www.androidpatterns.com/uap_pattern/action-bar
i.stack.imgur.com/xODIL.png
But there is a problem my app uses TAbActivy and this actionbarsherlock does't(because this library uses FragmentActivity and its imcompatible with Tabs) work with this, yet.
Now, I wanna apply this patterns. I wanna change Tabs for nice (beaty) buttons.
androidpatterns.com/uap_pattern/segmented-control-2
androidpatterns.com/uap_pattern/slideable-top-navigation
androidpatterns.com/uap_pattern/segmented-control
Follow some actual screenshots of my app:
i.stack.imgur.com/lIfbg.png i.stack.imgur.com/4kMYe.png
To apply this patterns and use actionbarsherlock, what is the best way?
I've found it thow anddev.org/code-snippets-for-android-f33/iphone-tabs-for-android-t14678.html . But I dint like graphs and it load all contect once. It doesnt works like a TabActivity (opens activity separately).
i.stack.imgur.com/y0lEV.png

Categories

Resources