Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to Keep Tabhost when start other activity
    primarykey
    data
    text
    <p>I have a problem with TabHost...</p> <p>I have TabBarActivity class flow as :</p> <p>public class TabBarActivity extends TabActivity implements OnTabChangeListener{</p> <pre><code>/* * (non-Javadoc) * * @see android.app.ActivityGroup#onCreate(android.os.Bundle) */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.layout_tab); TabHost tabHost = (TabHost) findViewById(android.R.id.tabhost); TabSpec mTab1 = tabHost.newTabSpec("tab1"); TabSpec mTab2 = tabHost.newTabSpec("tab2"); mTab1.setIndicator("TAB1").setContent( new Intent(this, TAB1.class)); mTab2.setIndicator("TAB2").setContent( new Intent(this, TAB2.class)); /** Add tabSpec to the TabHost to display. */ tabHost.addTab(mTab1); tabHost.addTab(mTab2); } </code></pre> <p>And I have ListView ( such as Contact name ) inside TAB1.java class</p> <p>Assume : I have a screen layout with 2 tab on bottom ( TAB1, TAB2 ). When I click TAB1 , I have a contact name list and if I click on itemList. The detail screen of ItemList will open. And inside "DetailScreen" layout , i want to keep the (TAB1, TAB2) tabhost on bottom screen. </p> <p>Now,when I run a application and click itemList . I don't keep the tabhost ( TAB1, TAB2 ) in DetailScreen of each item list...</p> <p>How to keep it when I start Activity of item list ( such as : DetailScreen.java )</p> <p>Thanks you</p> <hr> <p>@ all : thanks for your feedback but it seem that you doesn't understand my problem.</p> <p>My problem : Detail my project : 1- I have some Class: + TabBarActivity.java ( source code flow as above , top page, it have 2 tab on bottom layout Tab1, Tab2.... Default forcus Tab1 when run application) + Tab1.java ( <strong>Important</strong> : in this class , I have listview ( such as youtube on phone) , when I click one item on List -> open the detail screen for each Item of List... OK ) + Tab2.java ( do something...)</p> <p>2 - When I run apps , you see <strong>2 Tab on bottom</strong> layout and default startActivity Tab1.java -> then show listview in this screen... And when click one item of List -> open detail screen of this item (StartActivity DetailItem.java) -> <strong>But 2 Tab on bottom will be disappear</strong>....</p> <p>I don't known why ????</p> <p>Please help me :((</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload