手机
当前位置:查字典教程网 >编程开发 >安卓软件开发 >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中path的arcTo方法

Android从服务器端获取数据的几种方法

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

android不同activity之间共享数据解决方法

android通用xml解析方法

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

android中ListView数据刷新时的同步方法

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

android中添加按钮事件的方法

精品推荐
分类导航