title: Layout display Issue using Android TabHost
body: <p><img src="https://i.stack.imgur.com/7KFIP.png" alt="enter image description here"></p>
  
  <p>I am working on an application where i have to use android tabhost. I am facing a problem using it, as layout of my activity does not show up properly under the tab. The layout of the activity shows up only in the upper half of the emulator screen and bottom half remain black, while when i saw its xml in design view it depicts the required design.</p>
  
  <p>xml is added below as myscreen.xml:</p>
  
  
  
  <pre><code>&lt;LinearLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   android:background="@color/gray"
   android:orientation="vertical"&gt;
   &lt;LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:layout_gravity="center_vertical"
      android:orientation="vertical"
      android:gravity="center"&gt;
      &lt;ImageView
          android:id="@+id/button_twitter"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/twitter_login_unpressed" /&gt;
      &lt;ImageView
          android:id="@+id/button_separator"
          android:layout_width="wrap_content"
          android:layout_height="30px"
          android:background="@color/gray" /&gt;
      &lt;ImageView
          android:id="@+id/button_facebook"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/facebook_login_unpressed" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>and the relevant activity just contains the following code in onCreate:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
  
      Log.e("Now", "onCreate");
      super.onCreate(savedInstanceState);
      setContentView(R.layout.myscreen); 
  </code></pre>
  
  <p>}</p>
  
  <p>i am unable to figure out why the whole layout under the tab is not shown properly, and tabActivity just has and intent to this activity, there is nothing complex in there...It contains the following code:</p>
  
  <p>public class InfoTabActivity extends TabActivity {</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.infotablayout);
      Resources res = getResources();
      TabHost tabHost = getTabHost(); 
      TabHost.TabSpec spec;
      Intent intent;
  
      intent = new Intent().setClass(this, myActivity.class);
      spec = tabHost.newTabSpec("settings").setIndicator("", res.getDrawable(R.drawable.today_unpressed)).setContent(intent);
      tabHost.addTab(spec);
  
  
  
      tabHost.setCurrentTab(0);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>What can possibly be the problem? Any help is appreciated.</p>
  
  <p>infotablayout.xml contains this code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
       &lt;TabHost
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@android:id/tabhost"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
      &lt;LinearLayout
          android:orientation="vertical"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:padding="5dp"&gt;
          &lt;TabWidget
              android:id="@android:id/tabs"
              android:layout_width="fill_parent"
              android:layout_height="45px" /&gt;
          &lt;FrameLayout
              android:id="@android:id/tabcontent"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:padding="5dp" /&gt;
      &lt;/LinearLayout&gt;
  &lt;/TabHost&gt;
  </code></pre>