android-tabhost

How to reference child activity from TabHost to call a public function?

做~自己de王妃 提交于 2020-01-10 07:18:46
问题 I have a TabHost with two child activities in it (in two tabs). I also implemented a public function in one of these activities that i would like to call from my parent (TabHost), to trigger some action within the tab. Is it possible to reference the activity itself from the TabHost to call a public function? Thanks here is my tabhost setup: res = getResources(); tabHost = getTabHost(); TabHost.TabSpec spec; Intent intent; intent = new Intent().setClass(this, home.class); spec = tabHost

How to reference child activity from TabHost to call a public function?

烂漫一生 提交于 2020-01-10 07:18:05
问题 I have a TabHost with two child activities in it (in two tabs). I also implemented a public function in one of these activities that i would like to call from my parent (TabHost), to trigger some action within the tab. Is it possible to reference the activity itself from the TabHost to call a public function? Thanks here is my tabhost setup: res = getResources(); tabHost = getTabHost(); TabHost.TabSpec spec; Intent intent; intent = new Intent().setClass(this, home.class); spec = tabHost

Android FragmentTabHost - Not fully baked yet?

余生长醉 提交于 2020-01-09 10:18:05
问题 I wanted to see if anyone has had success with customization of tabs using FragmentTabHost that comes with the new Android API level 17. I was excited to be able to nest a tabHost within my ViewPager SherlockFragments, but I'm having trouble doing simple things like moving the tabs to the bottom or changing the layout of the tabs. Has anyone seen a good example of using this functionality? This is the only example I could find in the Android docs, and theres just about nothing that describes

Android Performance Issue- TabHost - Timer - SetCurrentTab() - Google Maps Api V2

倖福魔咒の 提交于 2020-01-07 08:12:42
问题 As i said in title i 've got a performance issue on my Android application. I've got a public static tabhost and a timer and a Google Maps . Timer scheduled to work every 3 seconds. It 's updating something according to my WebService which is related to database. For example if my web service response equals to "1" then i'm switching tab 0 otherwise 1. In this case when i switch to google maps which is in tab 1 with this update everything is ok. When a second update came with a result of "0"

Android Performance Issue- TabHost - Timer - SetCurrentTab() - Google Maps Api V2

好久不见. 提交于 2020-01-07 08:12:08
问题 As i said in title i 've got a performance issue on my Android application. I've got a public static tabhost and a timer and a Google Maps . Timer scheduled to work every 3 seconds. It 's updating something according to my WebService which is related to database. For example if my web service response equals to "1" then i'm switching tab 0 otherwise 1. In this case when i switch to google maps which is in tab 1 with this update everything is ok. When a second update came with a result of "0"

The content of my tabs doesn't fill the whole space

不羁的心 提交于 2020-01-07 02:49:08
问题 In my activity I create 5 tabs dynamically. I'm trying to figure out why my loading animation doesn't fill the whole space. Right now it's only a small rectangle in the top of the tab content (see http://imageshack.us/photo/my-images/594/loadingwf.png/). Here is the code where I create the content of each tab : for (int i = 0; i < NewsCategory.values().length; i++) { View tabView = createTabView(tabHost.getContext(), NewsCategory.getValueAt(i).getName()); tabNewslist[i] = new Newslist(this,

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

Change the tabhost style android

落爺英雄遲暮 提交于 2020-01-06 08:14:19
问题 I want to change the default blue color of the tabhost to red. <style name="AppTheme" parent="android:Theme.Light.NoTitleBar"> <item name="android:tabWidgetStyle">@drawable/tab_indicator_holo</item> </style> tab_indicator_holo.xml <selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Non focused states --> <item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected_holo" /> <item android:state

Problem using tabs that contains listviews (Android)

邮差的信 提交于 2020-01-06 07:21:32
问题 I have tried to create one tabhost with two tabs. Each tab contains one listview. Here is the code for the java file package com.Bussruter; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import android.app.AlertDialog; import android.app.TabActivity; import android.content.ActivityNotFoundException; import android

Tab bar not showing when call new activity

只谈情不闲聊 提交于 2020-01-06 04:26:04
问题 My code View view = getLocalActivityManager().startActivity("main_jobs", new Intent(context,Job_Description.class) .putExtra("line", str_line).putExtra("limit",str_limit) .putExtra("limit",""+0) .putExtra("Alert", false) .putExtra("str_location", str_loc) .putExtra("str_Descrption",str_descjob) .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)) .getDecorView(); setContentView(view); I am using this code to open new activity with tab but tab bar not showing and not any error get please help me how we