TabActivityを使用しているアプリケーションがありますが、ICSで正しく表示されません。私のや他のアプリケーションでタブがまだ機能しているので、ActionBarやFragmentsを解決策として本当に興味がありません。ここでタブアクティビティタブを表示しているAndroid ICSが間違っています
は、それはアンドロイドの他のすべてのバージョン(目的の外観) http://i44.tinypic.com/fb9jya.png
のように見え、ここではそれが間違ってICS、上のように見えるものは何かということです。ここ
http://i44.tinypic.com/35btjl2.png
変更する必要があるもの、私のtabactivityタブコードのですか?
intent = new Intent().setClass(this, HomeMenuGroup.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
spec = tabHost.newTabSpec("homeMenuGroup").setIndicator(li.inflate(R.layout.main_tabs_home, tabHost.getTabContentView(), false))
.setContent(intent);
tabHost.addTab(spec);
// Do the same for the other tabs
intent = new Intent().setClass(this, BuyTicketsGroup.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
spec = tabHost.newTabSpec("buyTicketsGroup").setIndicator(li.inflate(R.layout.main_tabs_buy, tabHost.getTabContentView(), false))
.setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, UseTicketsGroup.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
spec = tabHost.newTabSpec("useTicketsGroup").setIndicator(li.inflate(R.layout.main_tabs_use, tabHost.getTabContentView(), false))
.setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, MyAccountGroup.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
spec = tabHost.newTabSpec("myAccountGroup").setIndicator(li.inflate(R.layout.main_tabs_account, tabHost.getTabContentView(), false))
.setContent(intent);
tabHost.addTab(spec);
、ここであなたに決定的な答えを与えるために厳しいです私のタブボタンのレイアウトXMLの1 R.layout.main_tabs_account
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:background="@drawable/switcher_account"
android:layout_width="80dip"
android:layout_height="60dip"/>
</LinearLayout>
「main_tabs_content」を指摘してくれてありがとうございます。状態を持つ背景描画可能なテキストビューです。線のレイアウトを取り除いてテキストビューを画像ビューに変更するとどうなるのでしょうか – CQM
それはうまくいきました。返信をありがとう、私はあなたの推薦を読んだだけで、私が間違っているかもしれないと想像したことを解明しました。他の2.xデバイスでテストして、私がcompabitilityを保持していることを確認してください – CQM