簡體   English   中英

如何更改通過片段實現的TabView底部的顏色

[英]How can I change the color of at the bottom of a tabview implemented with fragments

我想更改tabview底部的顏色(默認情況下為藍色,但我想將其更改為紅色)。

我已經貼了我的應用程序的圖像: 這是圖像

順便說一句,我沒有在應用程序中使用android支持

public static void setTabColor(TabHost tabhost) {
    for(int i=0;i<tabhost.getTabWidget().getChildCount();i++)

   {tabhost.getTabWidget().getChildAt(i).setBackgroundResource(R.color.white);}   tabhost.getTabWidget().getChildAt(tabhost.getCurrentTab()).setBackgroundResource(R.color.tab_selected);}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM