Michael Allen
Michael Allen

Reputation: 5828

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?

Upvotes: 6

Views: 3817

Answers (3)

Michael Allen
Michael Allen

Reputation: 5828

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.

Upvotes: 1

Roman Nurik
Roman Nurik

Reputation: 29745

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.

Upvotes: 2

Keith
Keith

Reputation: 21

I haven't seen a tutorial like this, but you won't be able to do something like this with just the native widgets as they are. You're really looking at implementing your own custom widgets and views, or at the very least wrapping the included widgets with your own code. Maybe a future api will have such features built in, but at this point you're forced to do everything yourself if you want such an interface.

Upvotes: 0

Related Questions