android TabHost 修改底部条颜色
来源:互联网 发布:mac怎么调系统字体大小 编辑:程序博客网 时间:2024/05/21 15:47
/** * 更新Tab标签的颜色,和字体的颜色 * * @param tabHost */ private void updateTab(final TabHost tabHost) { for (int i = 0; i < tabHost.getTabWidget().getChildCount(); i++) { TextView tv = (TextView) tabHost.getTabWidget().getChildAt(i).findViewById(android.R.id.title); tv.setTextSize(16); tv.setTypeface(Typeface.SERIF, 0); // 设置字体和风格 if (tabHost.getCurrentTab() == i) { //选中 tabHost.getTabWidget().getChildAt(tabHost.getCurrentTab()).getBackground().setColorFilter(Color.rgb(52, 147, 232), PorterDuff.Mode.SRC_IN); tv.setTextColor(this.getResources().getColorStateList(R.color.color_blue)); } else { //不选中 tv.setTextColor(this.getResources().getColorStateList(R.color.color_grey_3)); } } }
0 0
- android TabHost 修改底部条颜色
- android tabhost位于底部
- android之实现底部TabHost
- android 底部选项卡(TabHost)
- android之实现底部TabHost
- Android中自定义tabhost的TAB页面被选中时TAB底部的颜色
- 底部TabHost
- 底部TabHost
- android - 制作底部选项卡TabHost
- android tabhost去掉底部白线
- android tabhost去掉底部白线
- Android TabHost +Fragment 实现底部菜单栏
- Android之底部導航欄--RadioGroup、TabHost、TabActivity
- Android之底部導航欄--RadioGroup、TabHost、Fragment
- Android TabHost +Fragment 实现底部菜单栏 .
- Android之底部導航欄--RadioGroup、TabHost、Fragment
- Android之底部導航欄--RadioGroup、TabHost、Fragment
- Android开发Tabhost+RadioGroup实现底部菜单栏
- 网页数据采集难点
- oracle数据库锁表查询及解锁sql
- ajax解析json格式循环显示
- 11.22今天学了
- 在发送ajax请求时加时间戳或者随机数去除js缓存
- android TabHost 修改底部条颜色
- Android酷炫实用的开源框架(UI框架)
- ORACLE PL/SQL编程之六:把过程与函数说透
- ARM Linux 3.x的设备树(Device Tree)--宋宝华
- ISO 15765-2
- dialog.setCancelable与setCanceledOnTouchOutside的区别
- ThreadPoolExecutor 记
- Python做漂亮的图片
- Android系统版本与API等级对应关系表