title: Tabs don't display on Kindle Fire
body: <p>I have an Android app that uses tabs for its start menu.  The tabs don't display when I port the app to a Kindle Fire.  Here's the code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView
  
      xmlns:android="http://schemas.android.com/apk/res/android" 
      android:layout_height="wrap_content"
      android:layout_width="fill_parent"
      android:isScrollContainer="true" &gt;
  
  &lt;LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical" &gt;
  
      &lt;TabHost
          android:id="@+id/tabhost"
          android:layout_width="match_parent"
          android:layout_height="match_parent" &gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical" &gt;
  
              &lt;TabWidget
                  android:id="@android:id/tabs"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content" &gt;
              &lt;/TabWidget&gt;
  
              &lt;FrameLayout
                  android:id="@android:id/tabcontent"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent" &gt;
  
                  &lt;LinearLayout
                      android:id="@+id/Beginning"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:orientation="vertical" &gt;
                  &lt;/LinearLayout&gt;
  
                  &lt;LinearLayout
                      android:id="@+id/Intermediate"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:orientation="vertical" &gt;
                  &lt;/LinearLayout&gt;
  
                  &lt;LinearLayout
                      android:id="@+id/Advanced"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:orientation="vertical" &gt;
                  &lt;/LinearLayout&gt;
              &lt;/FrameLayout&gt;
          &lt;/LinearLayout&gt;
      &lt;/TabHost&gt;
  &lt;/LinearLayout&gt;
  
  &lt;/ScrollView&gt;
  package com.myproject.project;
  
  import java.io.File;
  import java.io.FileOutputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.OutputStream;
  
  import android.app.Activity;
  import android.app.Dialog;
  import android.content.Intent;
  import android.content.res.AssetManager;
  import android.database.Cursor;
  import android.graphics.Color;
  import android.graphics.Typeface;
  import android.os.Bundle;
  import android.os.Environment;
  import android.view.Gravity;
  import android.view.View;
  import android.widget.Button;
  import android.widget.LinearLayout;
  import android.widget.TabHost;
  import android.widget.TabHost.TabSpec;
  import android.widget.TextView;
  import android.widget.Toast;
  
  public class TabsTestActivity extends Activity {
  /** Called when the activity is first created. */
  
  public static final String KEY_ROWID = "_id";
  public static final String KEY_NAME = "name";
  public static final String KEY_LEVEL = "level";
  public static final String KEY_CHART = "charted";
  public String extStorageDirectory = Environment
          .getExternalStorageDirectory().toString();
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      PopulateDatabase();
  
      CopyVideoFiles();
  
      TabHost tabhost = (TabHost) findViewById(R.id.tabhost);
      tabhost.setup();
  
      TabSpec spec_beg = tabhost.newTabSpec("Beginning");
      spec_beg.setContent(R.id.Beginning);
      TextView txtTabInfo = new TextView(this);
      txtTabInfo.setText("JUST STARTING");
      Typeface font = Typeface.createFromAsset(getAssets(), "danielbd.ttf");
      txtTabInfo.setTypeface(font);
      txtTabInfo.setGravity(Gravity.CENTER);
      txtTabInfo.setHeight(50);
      txtTabInfo.setBackgroundColor(Color.parseColor("#CCDE8A"));
      txtTabInfo.setTextColor(Color.parseColor("#262405"));
      spec_beg.setIndicator(txtTabInfo);
  
      TabSpec spec_int = tabhost.newTabSpec("Intermediate");
      spec_int.setContent(R.id.Intermediate);
      txtTabInfo = new TextView(this);
      txtTabInfo.setText("GETTING THERE");
      txtTabInfo.setTypeface(font);
      txtTabInfo.setGravity(Gravity.CENTER);
      txtTabInfo.setHeight(50);
      txtTabInfo.setBackgroundColor(Color.parseColor("#CCDE8A"));
      txtTabInfo.setTextColor(Color.parseColor("#262405"));
      spec_int.setIndicator(txtTabInfo);
  
      TabSpec spec_adv = tabhost.newTabSpec("Advanced");
      spec_adv.setContent(R.id.Advanced);
      txtTabInfo = new TextView(this);
      txtTabInfo.setText("REALLY GOOD");
      txtTabInfo.setTypeface(font);
      txtTabInfo.setGravity(Gravity.CENTER);
      txtTabInfo.setHeight(50);
      txtTabInfo.setBackgroundColor(Color.parseColor("#CCDE8A"));
      txtTabInfo.setTextColor(Color.parseColor("#262405"));
      spec_adv.setIndicator(txtTabInfo);
  
      // get data from database, create buttons and name them
      SQLData myTable = new SQLData(this);
      myTable.open();
      Cursor c = myTable.getallData();
  
      int iRow = c.getColumnIndex(KEY_ROWID);
      int iName = c.getColumnIndex(KEY_NAME);
      int iLevel = c.getColumnIndex(KEY_LEVEL);
  
      // create the buttons
      for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) {
          final String RowNum = c.getString(iRow);
          String Name = c.getString(iName);
          final String Level = c.getString(iLevel);
          Button button = new Button(this);
          button.setText(Name);
          button.setHeight(20);
          button.setTextColor(Color.BLACK);
          button.setBackgroundColor(Color.parseColor("#A89E0A"));
          button.setHighlightColor(Color.WHITE);
          button.setTypeface(font);
          button.setOnClickListener(new Button.OnClickListener() {
  
              public void onClick(View v) {
                  Intent choice = new Intent(getApplicationContext
  
  (),
  
                          com.myproject.project.myclass.class);
                  Bundle dataBundle = new Bundle();
                  dataBundle.putString("RowID", RowNum);
                  dataBundle.putString("Level", Level);
                  choice.putExtras(dataBundle);
                  try {
                      startActivity(choice);
                  } catch (Exception e) {
                      Dialog d = new Dialog(getApplicationContext());
                      d.setTitle("TabsTestActivity line 131");
                      TextView tv = new TextView(getApplicationContext());
                      tv.setText(e.toString());
                      d.setContentView(tv);
                      d.show();
                  } finally {
  
                  }
              }
          });
  
          LinearLayout lbeg = (LinearLayout) findViewById(R.id.Beginning);
          LinearLayout lint = (LinearLayout) findViewById(R.id.Intermediate);
          LinearLayout ladv = (LinearLayout) findViewById(R.id.Advanced);
  
          if (Level.equals("Beginning"))
              lbeg.addView(button);
          else if (Level.equals("Intermediate"))
              lint.addView(button);
          else if (Level.equals("Advanced"))
              ladv.addView(button);
      }
  
      tabhost.addTab(spec_beg);
      tabhost.addTab(spec_int);
      tabhost.addTab(spec_adv);
  
      myTable.close();
  
  }}
  </code></pre>
  
  <p>Does anyone know why? The tabs and their contents show up fine in the emulator and on my Android phone.  Thanks!</p>