2 つのリストを表示する 2 つのタブを持つ TabActivity があります。tabHost.getTabWidget().getChildCount() を使用して、タブ インジケーターを動的に変更しました。ただし、アプリケーションの起動中、getChildCount は 2 ではなく 1 を返します。
私を助けてください..
ここにコードを添付しています..
@Override
public void onTabChanged( String arg0 )
{
if ( LIST1_TAB_TAG == tabHost.getCurrentTabTag() )
{
ImageView iv = (ImageView)tabHost.getTabWidget().getChildAt(0).findViewById(android.R.id.icon);
iv.setImageDrawable(res.getDrawable(R.drawable.rupees));
Log.v( "check", "onTabChanged :: ChildCount == " + tabHost.getTabWidget().getChildCount() );
}