TabLayout Android, customize background color?

If you mean to change background color of tabs,then here is the code: for(int i=0;iWHITE); //unselected tab } for selected tab tabhost.getTabWidget(). GetChildAt(tabhost.getCurrentTab()). SetBackgroundColor(Color.

GRAY); // selected tab You can put above lines into a method (say setTabColors()) and call it: tabHost. SetOnTabChangedListener(new OnTabChangeListener() { @Override public void onTabChanged(String arg0) { setTabColors(tabHost); } }).

If you mean to change background color of tabs,then here is the code: for(int i=0;iWHITE); //unselected tab } for selected tab, tabhost.getTabWidget(). GetChildAt(tabhost.getCurrentTab()). SetBackgroundColor(Color.

GRAY); // selected tab You can put above lines into a method (say setTabColors()) and call it: tabHost. SetOnTabChangedListener(new OnTabChangeListener() { @Override public void onTabChanged(String arg0) { setTabColors(tabHost); } }).

You can access the attributes of each tab by doing so. TabHost.getTabWidget(). GetChildTabViewAt(index) .

FindViewById(android.R.id. Background); And then use this attribute to change to background color.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions