Questions tagged [android-tabactivity]

TabActivity is an Activity class that contains and runs multiple embedded activities or views.

The TabActivity is an Android Activity subclass that can be used to show content in the form of tabs(with either Views or other child Activities). With the introduction of Fragments the TabActivity is deprecated and shouldn't be used in new written code(in favor of the more robust Fragment framework).

260 questions
19
votes
1 answer

Creating tabs using Fragments now that TabActivity is deprecated

I am creating an application which has five tabs at the bottom of the screen, each of which opens a different Activity. My Tab Activity extends TabActivity which I have just read is deprecated and I should use Fragments instead. How do I change my…
sam
  • 2,469
  • 8
  • 37
  • 57
13
votes
2 answers

Badge on Android TabHost

I want to implement the functionality same as was there in iPhone I implemented the custom Tabhost same as in iPhone in the bottom bar. I can set two Icons for Normal/Selected state but I need the dynamic icon with number of notifications as given…
11
votes
3 answers

How to call tab Onclick and OnTabChange for same tab

In my project, I have two tabs and a button. For two tabs,I have two activities and button calling different activity. the thing is I am showing result of button on first tab. i.e tab0 is active on tab0Event and on button click event too. And am…
Romi
  • 4,833
  • 28
  • 81
  • 113
9
votes
5 answers

Android: TabActivity deprecated, use Fragments?

It appears that TabActivity is now deprecated, we need to use Fragments. I tried using a standard Activity but couldn't call getTabHost. So it appears i have to use Fragments. But i am a little confused how this would work. I understand that…
Martin
  • 23,844
  • 55
  • 201
  • 327
8
votes
3 answers

how to detecting a click on an already selected tab button

I am trying to get the Click event when clicking on currently selected tab of my TabActivity. I tried below code but when i click on one tab the other tabs are not working/clicking properly. setupTab(new TextView(this), "Map"); …
Kutbi
  • 1,154
  • 2
  • 18
  • 32
8
votes
1 answer

What does "deprecated" mean?

I am beginner for android and i am studying some tutorials on the internet. I was studying "tabactivity" but on android site tells me it is deprecated. What this means? It is not for use it anymore? Sorry for bad english thanks
Karlos Lopi
  • 91
  • 1
  • 2
8
votes
3 answers

How to correctly create a Tablayout now that the Tabactivity is deprecated?

Since the introduction of Fragments the TabActivity is deprecated. The Hello Views TabLayout Tutorial however still uses the TabActivity and the API-Documentation has no clear answer on how to create a Tab Layout with Fragments instead of a…
Janusz
  • 187,060
  • 113
  • 301
  • 369
7
votes
1 answer

How to create tabbed layout in Android 4.0?

Now that TabActivity is deprecated, what is the proper way to build a tabbed interface using fragments? Every tutorial I have seen takes a different approach. Some of them are supremely complicated pushing a mundane programming topic to the rocket…
RajV
  • 6,860
  • 8
  • 44
  • 62
7
votes
7 answers

Feature Custom Title: Cannot combine custom titles on API 11 and above

I have a project in which i setted: minSdkversion setted to 10 MainActivity is a TabActivity Code in onCreate method is…
6
votes
5 answers

How to make oval shape tabhost in android

I tried to make oval shape tabhost as expected below shape. I tried the below codes. public class AndroidTabLayoutActivity extends TabActivity { TabHost tabHost; @Override public void onCreate(Bundle savedInstanceState) { …
6
votes
0 answers

I want to open 2nd tab from 1st tab when I click on item in listview

I have 3 tabs. 1st tab contains 1st activity. 2nd tab contain 2nd activity. 1st activity contains list of items. When I click on item in list, I'm passing it's information via intent to 2nd activity in 2nd tab. Now I wanted to start 2nd tab…
kevz
  • 2,727
  • 14
  • 39
6
votes
2 answers

How to launch an activity with a specific tab?

I've gone through many examples, questions and tutorials but I've never seen an activity launch (launch a new intent) with a specific tab. I know that one can use .setCurrentTab to switch to a tab, but this can be done only from inside the parent…
Harsh
  • 487
  • 3
  • 9
  • 29
5
votes
1 answer

How to create custom api for tabhost and tabwidget?

I have created scrollable tab bar, using tabhost, tabwidget, and horizontalscrollbar which is layout_gravity is bottom. Now, i want to create custom API for that, so any one can use the api change the textsize, height, width etc..,according their…
5
votes
2 answers

Passing a data from Activity to Tabbed Layout Fragment?

I have two Activities. One is normal Activity which contains listview and second one is Tabbed Layout which it have two tabs. One is "Description" tab and another one is "Sample Code" tab. I have created two seperate fragments for each namely…
5
votes
3 answers

Restarting an activity in a single tab in a TabActivity?

I have a TabActivity. Each tab point to a sub activity. This works great. Is there any clever way to refresh one of the activity tabs? I just want to 'restart' the activity in tab #3 for example. Not sure of a good way to do this other than…
user291701
  • 38,411
  • 72
  • 187
  • 285
1
2 3
17 18