Android TabHost 文字及图片的设置

TabWidget tabWidget=myTabhost.getTabWidget();//设置字体颜色
for(int i=0;i<tabWidget.getChildCount();i++){

//设置显示文字
TextView tv=(TextView)tabWidget.getChildAt(i).findViewById(android.R.id.title);

//设置显示图片 ImageView iv=(ImageView)tabWidget.getChildAt(i).findViewById(android.R.id.icon);
iv.setPadding(0, 10, 0, 0);
tv.setPadding(0, -5, 0, 0);
tv.setTextColor(Color.BLACK);

}

更多相关文章

  1. android下载网络图片并缓存
  2. Android实现textview文字滚动显示(跑马灯效果)
  3. Android 通过Matrix来对图片进行缩放,旋转和平移
  4. android实现图片上传功能(springMvc)
  5. 举例说明android中Bitmap、ListView以及ImageView的综合使用---
  6. android 云标签,文字墙(文字随机排列效果)
  7. android 开发:保存图片到SD卡上
  8. android学习笔记17:文字设置

随机推荐

  1. android 获取硬件的ID
  2. Spinner2
  3. Android(安卓)ADT Bundle(Eclipse with AD
  4. MP3Player2.0版本
  5. OSC android app LayoutParams改进
  6. Android-乘法
  7. Android学习之SeekBar控件
  8. android myclass
  9. AESUtil工具类
  10. 让自己的应用具有被调出分享功能