2012-01-01 9 views
0

アイコンは、tabbarItemsに表示されているアイコンよりもはるかに大きいと思われます。私はなぜそれほど小さくないのか分かりません。AndroidでTabBarItemsのアイコンが小さすぎます。

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))); 

答えて

1

理由は、(48×48のような)高密度画面上に(通常は24×24)、低密度のために設計されたアイコンを使用することができます。グッドラック-Lijapは

);それはあなたがあなたの問題を解決する助けている場合、この答えをしてください受け入れ http://developer.android.com/guide/practices/ui_guidelines/icon_design_tab.html :あなたは、このWebページのサイズやアイコンのデザインに関する詳細な情報を見つけることができます
関連する問題