如何改变Android tab 的高度和字体大小

 

 需要调整tab 的高度和字体大小, 

 

直接上代码,发扬分享至上的互联网精神。。。

 

  int count = tabWidget.getChildCount();
  for (int i = 0; i < count; i++) {
   View view = tabWidget.getChildTabViewAt(i);   
   view.getLayoutParams().height = 80; //tabWidget.getChildAt(i)
   final TextView tv = (TextView) view.findViewById(android.R.id.title);
   tv.setTextSize(28);
   tv.setTextColor(this.getResources().getColorStateList(
     android.R.color.white));
  }

 

posted on 2012-09-08 15:13  Code大蛇丸  阅读(279)  评论(0编辑  收藏  举报