我有一个 TabActivity 有两个选项卡显示两个列表。我使用 tabHost.getTabWidget().getChildCount() 动态更改选项卡指示器。但是在启动应用程序时 getChildCount 返回 1 而不是 2。
请帮我..
我在这里附上我的代码..
@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() );
}