手机
当前位置:查字典教程网 >编程开发 >安卓软件开发 >android中TabHost的图标(48×48)和文字叠加解决方法
android中TabHost的图标(48×48)和文字叠加解决方法
摘要:开发过程中,有时候图标稍微大点,比如48×48的时候,文字就会和图标叠加起来,解决方法如下:复制代码代码如下:TabWidgettw=tab...

开发过程中,有时候图标稍微大点,比如48×48的时候,文字就会和图标叠加起来,解决方法如下:

复制代码 代码如下:

TabWidget tw = tabHost.getTabWidget();

for (int i = 0; i < tw.getChildCount(); i++)

{

TextView tv=(TextView)tw.getChildAt(i).findViewById(android.R.id.title);

ImageView iv=(ImageView)tw.getChildAt(i).findViewById(android.R.id.icon);

iv.setPadding(0, -8, 0, 0);

tv.setPadding(0, 0, 0, -2);

tv.setTextSize(12); }

【android中TabHost的图标(48×48)和文字叠加解决方法】相关文章:

android apk反编译到java源码的实现方法

Android ListView数据绑定显示的三种解决方法

android开发基础教程—三种方式实现xml文件解析

Android编程实现图标拖动效果的方法

android TextView设置中文字体加粗实现方法

Android加载图片内存溢出问题解决方法

Android实现多线程断点下载的方法

android中添加按钮事件的方法

android计时器,时间计算器的实现方法

Android中3种图片压缩处理方法

精品推荐
分类导航