![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Layout
石皮山
这个作者很懒,什么都没留下…
展开
-
Android开发:不同布局的混合搭配使用
以一种布局方式打天下,难以在界面设计布置上比较棘手,而充分利用各种样式,可以提供界面各控件位置布置的便利性。下面就是以ConstraintLayout和LinearLayout混合搭配使用为样例,如下: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout原创 2018-11-07 17:46:01 · 1851 阅读 · 0 评论 -
Android开发:布局分区域设置不同背景色
在一个大布局里,有时候需要通过设置不同的背景色来分割不同的功能区,这需要设置子布局的颜色。layout设置举例如下: <?xml version="1.0" encoding="utf-8"?> <!--约束布局--> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas....原创 2019-04-01 14:20:33 · 4059 阅读 · 0 评论 -
Android开发:设置圆形Button
在drawable中创建layer-list,可命名文件如:button_circle_shape.xml(在操作中后缀.xml不用填)。以下案例中还添加了selector,当按钮被点击时,按钮边框由黑色变为红色,未处于点击状态时为黑色。在布局中可以这样引用:android:background="@drawable/button_circle_shape" <layer-list xmln...原创 2019-05-11 17:49:55 · 16521 阅读 · 0 评论