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
2
votes
1 answer

How to detect whether onResume() is called from onCreate(), from application wake up or from switch activities?

I am a little bit confused about how android's lifecycle works and how to detect the source of function call such like onResume. Let me state this problem this way. I have an app which contains 5 activities, they will be navigated using a tab…
2
votes
1 answer

Android crash occur when touch on different tab 2 times

I think my title is no good enough to explain when my android will crash. I got 3 tab widgets on my application. It means I got 3 activity (accountMainThread.java, TodayExpenseList.java and settingThread) adapt to each of the tab widget. Here's my…
edisonthk
  • 1,403
  • 16
  • 35
2
votes
1 answer

Open alertDialog inside a Tabview which is inside another tabview

I have a tab view inside that tab view, another tab view inside that tab view`, and a alert box. When I try to open it my application gets force closed. But that same AlertDialog is working fine on first tab view.
2
votes
2 answers

Moving to previous activity in activity group in android

I'm developing an android application which contains a tabhost having 4 tabs. All 4 tabs navigate to same class Activity1 which extends activitygroup. From Activity1 i'm again navigating to another activity Activity2 using following code, Intent…
akh
  • 2,478
  • 3
  • 23
  • 23
2
votes
0 answers

TabGroupActivity + Prevent reload of an activity onBackPressed

This is the code of my TabGroupActivity. Here On any of the particular tab Tab B-> then It will launch Its child activity Class C -> then on click of any button It will again calls the child activty Class D Now from class D whenever I pressed back…
Kanika
  • 10,648
  • 18
  • 61
  • 81
2
votes
0 answers

How to write (deprecated) TabActivity to fragments with "tabs"?

So I have an Android app that is running in a TabActivity that separates 6 different activities through its tabs. Since TabActivity is deprecated since HoneyComb, and as far I as read I've to use fragments. Have I to transform all that 6Activities…
Luis Neves
  • 1,067
  • 2
  • 10
  • 21
2
votes
2 answers

Intent of a tab does not stop after switching to another tab in Android

I am having two tabs to show two different TV channels, but when I switch between tabs, their activity(intent) keep running, and they mix up. how can I make sure one channel stops playing before the new one starts? Here is the code for Activity…
Nima K
  • 995
  • 1
  • 8
  • 15
2
votes
2 answers

how to add the data of all the tabs into database using a single button click in android

There is five EditText widget placed in first tab, five EditText widget placed in second tab and five EditText widget placed in third tab. Now i want to add the data of all the tabs into database by clicking on a single button. The button is not…
Ankit Dhadse
  • 1,566
  • 1
  • 15
  • 19
2
votes
1 answer

Tabbed activities not working

I have been trying to add three different activities each to a different tab ... One activity is starting the bluetooth discovery and selection of a bluetooth device for pairing up and second one will be a bluetooth based mousepad i was following…
2
votes
1 answer

Tabs at bottom of page programmatically

I have researched a lot that how can I align the tabs at the bottom of page using this code but I didn't find any content, I am using the code as: public class MainActivity extends TabActivity { /** Called when the activity is first created.…
Kanika
  • 10,648
  • 18
  • 61
  • 81
2
votes
3 answers

Refresh Tab Activity on Android

I need to refresh my Activity once i click my Tab activity back. Currently its just displaying the previous content. I need to refresh my activity, so new contents can be loaded once its back. Here is my Code for adding the TabActivity. Please help.…
dhiku
  • 1,818
  • 2
  • 22
  • 38
2
votes
2 answers

How to use the OnTabChanged method in android?

TabHost tabHost = getTabHost(); // The activity TabHost TabHost.TabSpec spec; // Resusable TabSpec for each tab Intent intent; // Reusable Intent for each tab // Create an Intent to launch an Activity for the tab (to be…
Chetna
  • 165
  • 1
  • 6
  • 15
2
votes
3 answers

adding views to tab Vs adding activities to tab android

I am designing tabs in my app. I am confused whether to use activities for tab or just use views which one is the better way for tablayout I am confused .. I am bit new to tabs and still learning tab layout in android, so my question can be a…
nishi
  • 1,245
  • 3
  • 13
  • 22
2
votes
3 answers

How to startActivity for Result from Activity under Group Activity Under Tabs?

I am developing an app in which I am using multiple Activity Under Tab Activity .I am Using this Tutorial. I want to get the Result from next Activity. How can i do it. I am not able to find it. I have read two or three Example such as this and…
Nitin
  • 1,966
  • 4
  • 22
  • 53
1
vote
4 answers

Getting error on TabHost

I have this code: public void onResume() { super.onResume(); tabHost=getTabHost(); tabHost.addTab(tabHost.newTabSpec("tab1").setIndicator("All").setContent(new Intent(this, AllTest.class) …
Navdroid
  • 4,453
  • 7
  • 29
  • 47