当前位置: 首页 > news >正文

专业网站设计网站株洲网站优化哪家强

专业网站设计网站,株洲网站优化哪家强,如何不花钱做网站,小网站做几个关键词间隙设置为零 因为当我们引入TabLayout时就已经默认tabPaddingStart为12dp,tabPaddingEnd为12dp.才会导致不能填满的原因#xff0c;这时我们只需要修改样式或者属性即可。 xmlns:apphttp://schemas.android.com/apk/res-auto app:tabPaddingStart0dp这时我们只需要修改样式或者属性即可。 xmlns:apphttp://schemas.android.com/apk/res-auto app:tabPaddingStart0dp app:tabPaddingEnd0dp 间隙大小设置下划线长度设置  com.google.android.material.tabs.TabLayoutandroid:layout_belowid/topli11android:idid/activity_tablayouttandroid:layout_widthmatch_parentandroid:layout_heightdimen/normal_110dpandroid:backgroundcolor/whiteapp:tabBackgroundnullapp:tabRippleColornullapp:tabIndicatorColor#4065E0app:tabIndicatorHeightdimen/normal_5dpapp:tabIndicatorFullWidthfalseapp:tabPaddingStartdimen/normal_70dpapp:tabPaddingEnddimen/normal_70dpapp:tabMaxWidthdimen/normal_305dp/ com.google.android.material.tabs.TabLayoutandroid:layout_belowid/topli11android:idid/activity_tablayouttandroid:layout_widthmatch_parentandroid:layout_heightdimen/normal_110dpandroid:backgroundcolor/whiteapp:tabBackgroundnullapp:tabRippleColornullapp:tabIndicatorColor#4065E0app:tabIndicatorHeightdimen/normal_4dpapp:tabMaxWidthdimen/normal_180dp / 方法二——api28以下使用 tabLayout.post(new Runnable() {Overridepublic void run() {setIndicator(tabLayout);} }); ----------------------------------------------------------------------------- /*** 设置tabLayout下划线的宽*/ public static void setIndicator(TabLayout tabs) {Class? tabLayout tabs.getClass();Field tabStrip null;try {tabStrip tabLayout.getDeclaredField(slidingTabIndicator);} catch (NoSuchFieldException e) {e.printStackTrace();}tabStrip.setAccessible(true);LinearLayout llTab null;try {llTab (LinearLayout) tabStrip.get(tabs);} catch (IllegalAccessException e) {e.printStackTrace();}//因为我想要的效果是 字多宽线就多宽所以测量mTextView的宽度for (int i 0, count llTab.getChildCount(); i count; i) {//获取tabViewView tabView llTab.getChildAt(i);//拿到tabView的mTextView属性Field mTextViewField null;try {//获取tabView的textView属性mTextViewField tabView.getClass().getDeclaredField(textView);} catch (NoSuchFieldException e) {e.printStackTrace();}mTextViewField.setAccessible(true);TextView textView null;try {textView (TextView) mTextViewField.get(tabView);} catch (IllegalAccessException e) {e.printStackTrace();}tabView.setPadding(0, 0, 0, 0);//获取textview宽度int textWidth 0;textWidth textView.getWidth();if (textWidth 0) {textView.measure(0, 0);textWidth textView.getMeasuredWidth();}//获取tabview宽度int tabWidth 0;tabWidth tabView.getWidth();if (tabWidth 0) {tabView.measure(0, 0);tabWidth tabView.getMeasuredWidth();}//设置下划线margin值LinearLayout.LayoutParams tabViewParams (LinearLayout.LayoutParams) tabView.getLayoutParams();int margin (tabWidth - textWidth) / 2;tabViewParams.leftMargin margin;tabViewParams.rightMargin margin;tabView.setLayoutParams(tabViewParams);}}
http://www.pierceye.com/news/533390/

相关文章:

  • wordpress随机文章佛山网站优化美姿姿seo
  • 做酒类网站中铁三局最新消息
  • 网站建设教程给赚湖南岚鸿官 网英语培训学校网站建设多少钱
  • 电子商务网站的建设步骤有注册咨询公司经营范围
  • 手机端网站做app开发wordpress建站论坛
  • 四合一做网站微信公众平台怎么做微网站
  • 法治与安全做讲座网站系统工具
  • wap网站怎么做白石洲网站建设
  • 网站备案 关闭网站广州安全教育平台登录入囗
  • 做常州美食网站首页的背景图招聘网站建设费用多少
  • 制作网站需要wordpress网站的建设步骤包括什么
  • 有什么网站可以做微信支付宝支付宝闽侯县建设局网站
  • html5网站图标qq刷赞网站如何做分站
  • 免费asp网站源码下载网页视频怎么下载到本地视频手机
  • 深圳网站定制开发安徽建设人才网官网
  • 斐讯k3做网站工商注册名称核准查询
  • 兼职网站编辑深圳网站做的好的公司哪家好
  • 网站响应速度优化wordpress外贸主题购买
  • 没有后台的网站怎么做排名网页设计学校
  • 江苏网站建设哪家快点外贸商城网站系统
  • 菠菜网站做首存wordpress 警告
  • 无锡好的网站建设公司网站公司做的网站被攻击
  • 建设银行官方网站下载安装淘宝官网首页登录入口电脑
  • 玩具外贸网站扬中论坛全部帖子
  • 网站搭建规划建设网站方案ppt
  • 手机上哪个网站免费wordpress空间
  • 网站改版上线西安网站群搭建
  • 百度竞价培训青岛网站建设和优化
  • 网站建设 收费明细wordpress 动漫 主题下载
  • 物流网站怎么做推广wordpress插件ERP