4

I have seen a great user control component in an Android app. I do not know what is it. Here is a screenshot of this app:

image

I am interested in the user control components under the "thumb" label. What is it? I have googled already but found only the TabActivity which is already a deprecated feature.

What do I have to use instead to make it look like the above screen-shot?

I found this blog entry about tab-controls; is this the right way for making that tab-control?

I wanna use it under Android 2.2+.

JavaRunner
  • 2,455
  • 5
  • 38
  • 52
  • 2
    looks ok, there is also a similar official example for tabs with fragments [FragmentTabs](https://github.com/android/platform_development/blob/master/samples/ApiDemos/src/com/example/android/apis/app/FragmentTabs.java). Those tabs can be [customized](http://joshclemm.com/blog/?p=136) – zapl Aug 27 '12 at 23:29
  • Good example but so much useless source code. I don't understand, why Google community can't write simple example of using Tabs. The FragmentTabs.java includes ["LoaderThrottle.ThrottledLoaderListFragment.class"](https://github.com/android/platform_development/blob/master/samples/ApiDemos/src/com/example/android/apis/app/LoaderThrottle.java) which contains 512 lines. For what?? Simple tab android app needs to write 512 lines to start work with tabs?? – JavaRunner Aug 29 '12 at 04:31
  • By the way, the FragmenTabs example is based on ActionBar which comes in Android 3.0. But I need tabs in android 2.2 :( – JavaRunner Aug 29 '12 at 05:05
  • the `ThrottledLoaderListFragment` is just a sample fragment to have something to show inside the tabs. You can safely ignore the content. [This FragmentTabs](https://github.com/android/platform_development/blob/master/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabs.java) example uses fragments through the compatibility library (API level 4+) with tabs, no action bar & not deprecated – zapl Aug 29 '12 at 13:40
  • When I to to execute: "ActionBar bar = getActionBar();" in Android 2.2 project, I get an error: "ActionBar cannot be resolved to a type". When I try to execute that in Android 3.2 - it works fine... Do you happen to know why it works like this? – JavaRunner Aug 30 '12 at 02:12
  • Android 2.2 has no ActionBar, see http://developer.android.com/training/backward-compatible-ui/abstracting.html or http://stackoverflow.com/questions/7844517/different-between-actionbarsherlock-and-action-bar-compatibility – zapl Aug 30 '12 at 14:19

1 Answers1

2

are you looking for an iPhone like tab bar ? here are few examples on Android tab bar and few others Check if it helps you.. Iphone Like Tab bar in Android

Cheers

Srikanth Pai
  • 926
  • 3
  • 17
  • 30