开发者

Problem with Intents and TabHost in Android

开发者 https://www.devze.com 2023-01-24 02:58 出处:网络
I have an Android App that uses a TabHost layout. Every tab calls the same Activity on which there is a ListView that loads data from a DB.

I have an Android App that uses a TabHost layout. Every tab calls the same Activity on which there is a ListView that loads data from a DB.

Everything runs fine but the problem is that when the user clicks a ListView item and I call an intent to load, the new activity goes "full screen" and hides the TabHost.

I call the new intent in this way:

Inte开发者_StackOverflow中文版nt i=new Intent(this, MyActivity.class);
startActivity(i);

I would like to maintain visibility of TabHost even if I change Activity, can anyone help me?


The activity in your TabHost needs to be an ActivityGroup.

http://united-coders.com/nico-heid/use-android-activitygroup-within-tabhost-to-show-different-activity

0

精彩评论

暂无评论...
验证码 换一张
取 消