![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
自定义View
文章平均质量分 91
Che2n3JigW
这个作者很懒,什么都没留下…
展开
-
自定义View-圆角,边框,水波纹Button
效果图 场景 UI设计图上有很多类似圆角按钮,但是他们都各有一点不同。像五六种圆角大小和几种颜色相互搭配, 这时候如果用drawable创建shape会显得麻烦。下面用自定义View的封装这些按钮。 新建declare-styleable <declare-styleable name="MyButton"> <attr name="borderWidth" format="dimension" /> <attr name="bord原创 2020-08-25 17:38:08 · 197 阅读 · 0 评论 -
自定义View-补间动画TextView
新建anim资源文件 右键res文件夹 - New - Directory - 输入 - anim - 确定 效果图原创 2020-08-25 18:19:18 · 154 阅读 · 0 评论 -
自定义View-点击高亮TextView
效果图 在values下创建attrs.xml 自定义属性 <?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="MySelectorTextView"> <attr name="pressColor" format="color" /> <attr name="pressAlpha" format=原创 2020-08-25 17:40:23 · 209 阅读 · 0 评论