나는 TabActivity를 사용하는 응용 프로그램을 가지고 있지만 ICS에서 잘못 렌더링되고 있습니다. 탭이 다른 용도로도 여전히 작동하기 때문에 ActionBar 또는 Fragments에 대한 솔루션에 관심이 없습니다. 여기안드로이드 ICS 표시 tabactivity 탭이 잘못됨
은 안드로이드의 다른 모든 버전 (원하는 모양) 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 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'에 대해 알려 주셔서 감사합니다. 상태가있는 배경 drawable이있는 textview입니다. 선형 레이아웃을 제거하고 텍스트 뷰를 이미지 뷰 – CQM
으로 변경하면 어떻게되는지 알 수 있습니다. 답장을 보내 주셔서 감사합니다. 나는 당신의 추천을 읽었을 때 그것을 해시했고 내가 상상 한 것이 잘못되었을 수도 있습니다. 다른 2.x 장치에서 테스트하여 방금 compabitility를 유지했는지 확인합니다. – CQM