您的位置:首页 > 移动开发 > Android开发

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

2012-09-08 15:13 309 查看
需要调整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));
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: