zoukankan      html  css  js  c++  java
  • Android textAppearance的属性设置及TextView属性详解

    android:textAppearance

    "引——没有拼命的干劲,怎能有精彩的结果!"

    xml布局里面设置文字的外观:

    如“android:textAppearance=“?android:attr/textAppearanceLargeInverse”这里引用的是系统自带的一个外观,

    ?表示系统是否有这种外观,否则使用默认的外观。

    可设置的值如下:

    textAppearanceButton/  

     

    textAppearanceInverse/  

     

    textAppearanceLarge/  

     

    textAppearanceLargeInverse/ 

     

    textAppearanceMedium/    

     

    textAppearanceSmallInverse/ 

     

    textAppearanceMediumInverse/ 
     
    textAppearanceSmall/  
     
    代码中加下划线
    textView.getPaint().setFlags(Paint. UNDERLINE_TEXT_FLAG ); //下划线
    textView.getPaint().setAntiAlias(true);//抗锯齿
     
    android:linksClickable设置链接是否点击连接,即使设置了autoLink。
    android:marqueeRepeatLimit在ellipsize指定marquee的情况下,设置重复滚动的次数,当设置为 marquee_forever时表示无限次。
    android:ems设置TextView的宽度为N个字符的宽度。这里测试为一个汉字字符宽度
    android:maxEms设置TextView的宽度为最长为N个字符的宽度。与ems同时使用时覆盖ems选项。
    android:minEms设置TextView的宽度为最短为N个字符的宽度。与ems同时使用时覆盖ems选项。
    android:maxLength限制显示的文本长度,超出部分不显示。
    android:lines设置文本的行数,设置两行就显示两行,即使第二行没有数据。
    android:maxLines设置文本的最大显示行数,与width或者layout_width结合使用,超出部分自动换行,超出行数将不显示。
    android:minLines设置文本的最小行数,与lines类似。
    android:lineSpacingExtra设置行间距。
    android:lineSpacingMultiplier设置行间距的倍数。如”1.2”
     
     
  • 相关阅读:
    让程序的性能提升10倍
    以正确的姿势实现一棵JavaScript菜单树
    利用php数组函数进行函数式编程
    yum安装下的nginx,如何添加模块,和添加第三方模块
    前端面试题 vue
    前端常用面试题目及答案-HTML&CSS篇
    使用after伪类,配合IE的zoom或者overflow清除浮动
    函数式编程
    在CentOS 7上安装Node.js
    node中__dirname、__filename、process.cwd()、process.chdir()表示的路径
  • 原文地址:https://www.cnblogs.com/Lt-Java13/p/4402436.html
Copyright © 2011-2022 走看看