Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube style sliding Tab Layout in Android App

The new Youtube app, and the newer version of JuiceDefender, contains a sliding tabbed layout similar to those seen in Windows 7 Phone. This is a UI feature I would like to include in an app I'm am designing but I cannot find any information or tutorials online. Has anyone seen a tutorial on this?

like image 397
Michael Allen Avatar asked Jan 04 '11 14:01

Michael Allen


2 Answers

I believe it's implemented as a HorizontalScrollView containing a TabWidget with custom, fixed-width, tab indicator views.

Now, getting the tab content views to be paged horizontally is less easy, and that requires something like adapting Workspace.java in the Launcher.git project in AOSP.

like image 91
Roman Nurik Avatar answered Oct 30 '22 03:10

Roman Nurik


I have found the answer to this question. The Sliding layout I described is a ViewPager, available from the Android Compatibility Package v4, which is available from the SDK installer.

A tutorial for this can be found here :http://mobile.tutsplus.com/tutorials/android/android-user-interface-design-horizontal-view-paging/


Edit

An improvement over the Android Compatibility package is the http://actionbarsherlock.com/ an improvement over the support package that adds more Jelly bean style stuff.

like image 38
Michael Allen Avatar answered Oct 30 '22 02:10

Michael Allen