tabactivity

TabActivity that create an intent onClick button but the tabhost of activity receiver disappear

﹥>﹥吖頭↗ 提交于 2020-01-06 13:52:51
问题 I have 2 activity: A, B. The first is an TabActivity and the second an Activity. Inside A i have a clickable button that make an intent to call the other activity. public class A extends TabActivity implements OnClickListener { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tabHost = getTabHost(); tabHost.addTab(tabHost.newTabSpec("a").setContent(R.id.a).setIndicator("a")); b = new Intent(this,B.class); tabHost.addTab

Android TabHost is there a way to get TabView by ID

主宰稳场 提交于 2020-01-02 10:35:33
问题 I'm making some an advanced TabActivity but I need to get every TabView thats in the TabHost . With tabHost.getCurrentTabView() I can get the current TabView but is there a way to get a TabView by its ID? I managed to make a workaround by doing a for loop in the onCreate() method where I go to every tab and put all the View objects in an Array. private View[] tabs; for(int i = 0; i < getTabWidget().getTabCount(); i++) { tabHost.setCurrentTab(i); tabs[i] = tabHost.getCurrentTabView(); } 回答1:

ListActivity inside TabActivity

怎甘沉沦 提交于 2019-12-25 02:22:46
问题 Please help to solve this problem. I use implementation of OnGestureListener in TabActivity with overriding of method onFling for switching between tabs. But that doesn't work when one of my tabs is ListActivity. Thanks 回答1: Try adding the listener to ListView or yours ListActivity too. 来源: https://stackoverflow.com/questions/5116837/listactivity-inside-tabactivity

Android: Landscape Child Activity in a Portrait Tab Activity

∥☆過路亽.° 提交于 2019-12-24 07:27:18
问题 I have a tab activity that has three child activities, A, B and C. Child activities A and B are to follow the orientation of the tab activity. i.e. if the tab activity is in portrait so should A and B, if the tag activity is landscape so should A and B. Child activity C should always be in landscape orientation regardless of the tab activity orientation (preferably following android:screenOrientation="sensorLandscape"). Is this possible? I have tried using android:screenOrientation=

Android: Landscape Child Activity in a Portrait Tab Activity

…衆ロ難τιáo~ 提交于 2019-12-24 07:27:02
问题 I have a tab activity that has three child activities, A, B and C. Child activities A and B are to follow the orientation of the tab activity. i.e. if the tab activity is in portrait so should A and B, if the tag activity is landscape so should A and B. Child activity C should always be in landscape orientation regardless of the tab activity orientation (preferably following android:screenOrientation="sensorLandscape"). Is this possible? I have tried using android:screenOrientation=

How to setResult() for a TabActivity which contains activity for tabs

拈花ヽ惹草 提交于 2019-12-22 18:50:16
问题 My TabActivity contains two tabs which calls two two different activities . I want to setResult() for the TabActivity when either one of the child finishes. Is there any method to find out when my activity inside tab finishes ? Thank you -Eby 回答1: I found another way ` @Override public void finishFromChild(Activity child) { setResult(REFRESH); super.finishFromChild(child); } ` finsihFromChild will let us know when the child activity is finishing!! @pentium10 thank you very much for your

Intent to open a specific tab of tabbed activity

断了今生、忘了曾经 提交于 2019-12-21 23:33:56
问题 I have a tabbed activity with 5 tabs. Each tab has only one Imageview. On a previous page I have 5 buttons and I want to create an interface such that each button starts the tabbed activity but the first tab which is visible is specific to that button. eg. gallery apps open a specific tab corresponding to the thumnail of the photo and are also left/right swappable. 回答1: You can pass the tab id you want to open as an extra to the Intent you are creating. Then in the tabbed Activity , assuming

Android 2.1 NullPointerException with TabWidgets

孤人 提交于 2019-12-19 03:43:34
问题 I have an issue I have not been able to figure out and it is only happening on devices running <2.1. It works fine on android 2.2. I have ansynchronous task that displays a loading dialog while it loads all the tabs. Here is the code for the TabActivity: public class OppTabsView extends TabActivity { Dialog dialog; String errorText; boolean save; final int OPP_SAVE = 0; public static boolean edited; public void onCreate(Bundle icicle) { try { super.onCreate(icicle); new DoInBackground()

Android. How to change Activity within a Tab

一笑奈何 提交于 2019-12-17 17:31:51
问题 Following situation: I have TabActivity with e.g. three tabs, TabA, TabB, TabC. There are a button in activity (Act_C_1) of TabC. So if the user clicks on that button, another activity (Act_C_2) should occur in TabC. I thank you in advance for any suggestions / or ideas. Mur UPD: Here is my code TabActivity with three Activities: public class TabScreen extends TabActivity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.tab_menu);

Android Facebook api 3.0 error: Cannot call LoginActivity with a null calling package

拜拜、爱过 提交于 2019-12-17 09:39:54
问题 I am trying to integrate an android app with the the new facebook 3.0 api, but I get this exception: java.lang.RuntimeException: Unable to resume activity {dk.imu.konnekt/com.facebook.LoginActivity}: com.facebook.FacebookException: Cannot call LoginActivity with a null calling package. This can occur if the launchMode of the caller is singleInstance. I have search for this error but no one else seems to have had any troble with it. I guess it is because I am using a TabHost and