2012-01-01 48 views
0

我的图标应该比tabbarItems显示的大得多。我不明白为什么它显示如此之小。TabBarItems上的图标在Android上看起来太小。

main.xml中

<?xml version="1.0" encoding="utf-8"?> 
<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"> 
    <LinearLayout android:orientation="vertical" 
    android:layout_width="fill_parent" android:layout_height="fill_parent"> 
     <TabWidget android:id="@android:id/tabs" 
     android:layout_width="fill_parent" android:layout_height="wrap_content"/> 
     <FrameLayout android:id="@android:id/tabcontent" 
     android:layout_width="fill_parent" android:layout_height="fill_parent"> 
      <RelativeLayout android:id="@+id/emptylayout1" android:orientation="vertical" 
      android:layout_width="fill_parent" android:layout_height="fill_parent"/> 
      <TextView android:id="@+id/textview2" 
      android:layout_width="fill_parent" 
       android:layout_height="fill_parent" 
      android:text="Details Details Details Details"/> 
     </FrameLayout> 
    </LinearLayout> 
</TabHost> 

MainActivity

 host=getTabHost(); 

     host.addTab(host.newTabSpec("Offers") 
      .setIndicator("Offers", getResources().getDrawable(R.drawable.icon_light)) 
      .setContent(new Intent(this, Offer_Popup.class))); 

     host.addTab(host.newTabSpec("Account") 
      .setIndicator("Account", getResources().getDrawable(R.drawable.icon_wrench)) 
      .setContent(new Intent(this, Offer_Popup.class))); 

     host.addTab(host.newTabSpec("Settings") 
      .setIndicator("Settings", getResources().getDrawable(R.drawable.icon_user)) 
      .setContent(new Intent(this, Offer_Popup.class))); 

回答

相关问题