您的位置:首页 > 移动开发 > Android开发

Android改自定义背景颜色+分隔线设置

2018-01-18 16:07 323 查看

Android改自定义背景颜色

主题为:APP.Compat.Light.NoActionBar

原背景为白色

设置背景 为那种灰白色

style.xml中

<item name="android:windowBackground">@color/theBackGround</item>


color中自定义一个颜色

<color name="theBackGround">#F0F0F0</color>


分隔线设置

1 LinearLayout可以加

android:showDividers="end/beginning/middle"


2 也可以用一个1dp的ImageView加

<ImageView
android:id="@+id/dividerimage4"
android:layout_below="@id/prl_2"
android:background="#F0F0F0"
android:layout_width="match_parent"
android:layout_height="1dp"
/>


3 RecyclerView可以直接设置一个自定义的分隔线

参考:http://blog.csdn.net/weixin_37577039/article/details/78581423
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: