내 seTabColor()에서 제목 텍스트의 색상을 회색으로 설정하고 있습니다. 누를 때 흰색으로 변경하고 싶습니다. 내가 어떻게 해?눌렀을 때 탭의 텍스트 색상을 변경하는 방법 (currentTab)?
public void setTabColor(TabHost tabHost) {
for(int i = 0; i<tabHost.getTabWidget().getChildCount(); i++) {
// tabHost.getTabWidget().getChildAt(i).setBackgroundResource(r[i]);
tabHost.getTabWidget().getChildAt(i).setBackgroundColor(Color.BLACK);
TextView t = (TextView) getTabWidget().getChildAt(i).findViewById(android.R.id.title);
t.setTextSize(9 * getResources().getDisplayMetrics().density);
// tabHost.getTabWidget().getChildAt(i).getLayoutParams().height = 58;
// tabHost.getTabWidget().getChildAt(i).().height = 58;
TextView tv = (TextView) tabHost.getTabWidget().getChildAt(i).findViewById(android.R.id.title);
tv.setTextColor(Color.GRAY);
}
내가 좋아하는 뭔가를 할 싶어 : tabHost.getTabWidget().getChildAt(tabHost.getCurrentTab())...
그러나 조건부 텍스트 색상을 변경하는 것을 사용하는 방법 임 확실하지.
이것은 탭의 배경 색상을 변경하기위한 것입니다. 탭의 텍스트보기 색상 만 변경하고 싶습니다. 내 탭에는 이미지와 텍스트보기가 있습니다. 탭의 텍스트보기 색상 만 변경하고 싶습니다. – Prabha1