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
1
vote
1 answer

onBackPressed() is not working in ActivityGroup in android 4.0.3

I am working on TabActivity consist of 5 child activities. On pressing Back Button of TabActivity, it calls onBackPressed() method in android OS 2.3.4 but can't call the same method on android OS 4.0.3, So I am not able to finish my TabActivity on…
1
vote
1 answer

Android how to add many menus for different tabs

I have many tabs like this: TabHost th; TabSpec spec; th = (TabHost) findViewById(R.id.tabhost_template_two_tabs); th.setup(); // all tab spec =…
user user
  • 2,122
  • 6
  • 19
  • 24
1
vote
0 answers

How to keep tab's activities history while switching tabs

In my app I have TabActivity , and 3 Tabs in it. Every tab has some buttons, that changes current Tabs view. I mean when I'm clicking on the button, it changes the Activity in the current Tab, but when I'm going to second Tab and returning to first…
1
vote
1 answer

Android Custom ListView Issue

In my app, I want to do groups of each posts in same post category. Listview doesn't refresh of items counts. Forexample, ".Net" category has 3 posts. Listview has 15 rows. 12 rows are seem empty. How can I refresh listview rows count ? I tried…
1
vote
1 answer

how to put listener on tab in android

This is my code for tabs. Kindly tell me how to put listener on tab1 either through switch statement or by simple onclick listener. And this toast message is also not working public class TabsActivity extends Activity implements OnClickListener { …
1
vote
0 answers

How to close a child activity in a tab activity group android?

My parent class open a child activity correctly but when i tried to close this child activity with this.finish() or getCurrentActivity().finish() i get a force close error. I know using getParent().finish() will close the parent activity, so, this…
PIONA
  • 79
  • 1
  • 5
  • 12
1
vote
0 answers

Tab Bar on every Activity

I have a tab bar that shows 5 tabs. I want the tab bar to appear on every activity in my app. The only activity's the tab bar appears on is the 5 activities in the tabs. I am using TabActivity, which I know is deprecated, but is there any way I can…
BigT
  • 1,413
  • 5
  • 24
  • 52
1
vote
2 answers

adding android:tragetSdkVersion= "14" in maifest for application developed for 2.3.3 version, is it a good idea?

I want to add android:tragetSdkVersion= "14" in my manifest but I'm consufed as initially I developed my application for 2.3.3 version. So I used TabActivity for that. But TabActivity is deprecated in 4.0 version and according to the documentation,…
Rookie
  • 8,660
  • 17
  • 58
  • 91
1
vote
1 answer

Tabview in android..?

I am developing an app where i am using tabwidget with 2 tab views. When the app is visible on screen, in first tab some data needs to be displayed in listview which i gets it from database. If the data is empty in listview by default second tab…
1
vote
0 answers

Content of tabs does not change after initialisation, latest pressed tab remains

I use this code to create n tabs : TabHost tabs = (TabHost)findViewById(R.id.tabhost); tabs.setup(mLocalActivityManager); StateListDrawable[] drawables = new StateListDrawable[hotel.categoryArray.length]; for (int i = 0; i <…
1
vote
0 answers

Close Tab when it is selected again in android

I am learning and implementing the browser for my own knowledge. I have made tabs and I am able to launch the webpages in tabs. I want to close a tab when the currently focusing tab is clicked. has anybody tried to close a particular tab which has…
1
vote
2 answers

How do I pass dynamic URL to each Webview Activity in a multi-tab with 1 web view in each tab - Android App

My Application is a news App. composed of 5 Tabs or More (this will be a setting based on each user's requirement). When the application Start I create the 5 Tabs dynamically and create a webview as an intent for each Tab, I just need to pass the…
Shehabic
  • 6,787
  • 9
  • 52
  • 93
1
vote
2 answers

how to use different tabhosts for different layouts in android

I know how to write tab host,but here the scenario is little bit different I have a screen ,in that 2 tabs are there 1.ABC 2.XYZ when ever we click on the XYZ tab next page onwords we need to display 4 other tabs P,Q,R,S how to set tabhosts to meet…
0
votes
1 answer

Android ::Close all activity in Tabhost when changeConfig

I try simple Tab application from here I have simple problem, I run above application on an emulator as well as device, I have five activities (such as: A , B , C, D, E). I wanna go to A->B->C->D->E, after going E activity I change config using…
0
votes
1 answer

TabActivity and navigation inside Android

I have done TabActivity with this code: addTab(publication, "First", My_Files.class); addTab(shop, "Second", Others.class); private void addTab(String labelId, int drawableId, Class c) { TabHost tabHost = getTabHost(); // The activity…
Streetboy
  • 4,351
  • 12
  • 56
  • 101