How do I remove the selected tab indicator from the TabWidget?

后端 未结 17 1314
猫巷女王i
猫巷女王i 2020-12-09 02:19

Here\'s what I\'d like to remove :

\"enter

How do I replace the indicator show

17条回答
  •  长情又很酷
    2020-12-09 02:57

    I looked for a long time to remove the ugly holo menu bar tried everything. accidentally used this code for another reason and it thank god removed it.

        for (int i = 0; i < tabHost.getTabWidget().getChildCount(); i++) {          
            tabHost.getTabWidget().getChildAt(i).setBackgroundColor(Color.parseColor("#FF0000")); // unselected
            TextView tv = (TextView)tabhost.getTabWidget().getChildAt(i).findViewById(android.R.id.title); //Unselected Tabs
            tv.setTextColor(Color.parseColor("#ffffff"));
        }
    

    Source: Android tabhost change text color style

提交回复
热议问题