美文网首页
自定义控件 获取textSize的坑。。

自定义控件 获取textSize的坑。。

作者: Akashi | 来源:发表于2016-03-25 19:01 被阅读75次

    1. declare-styleable

    2. 获取文字大小

    3. 关键部分是这里,setTextSize要用下面这个带俩参数的,而不是直接setTextSize(textSize),不然字体会变得特别大。

    link: http://stackoverflow.com/questions/16596980/how-to-read-custom-dimension-attribute-from-java-code

    相关文章

      网友评论

          本文标题:自定义控件 获取textSize的坑。。

          本文链接:https://www.haomeiwen.com/subject/yrkdlttx.html