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
相关文章推荐
- Android之自定义背景Button按钮、自定义形状Button的全攻略、设置字体颜色
- Android代码中设置图片,文本自定义颜色,Linearlayout等控件设置背景
- android 自定义Dialog背景透明及显示位置设置
- Android-5.0中自定义SeekBar的滑块颜色后,发现有白色背景-解决方案
- android 自定义Dialog背景透明及显示位置设置的方法
- TabLayout和ViewPager搭配使用中如何设置Tab背景颜色(无须自定义TabLayout)
- android中设置ListView的选中的Item的背景颜色
- Android---Tablayout自定义Tab的背景和字体的颜色变化
- Android—TextView 背景颜色与背景图片设置
- android 自定义Dialog背景透明及显示位置设置
- 自定义背景颜色的设置
- Android 布局自定义Shap圆形ImageView,可以单独设置背景与图片
- Android 几种设置更改控件背景颜色
- Android GradientDrawable类的详解,设置activity的背景颜色渐变效果
- (转)Android 自定义 spinner (背景、字体颜色)
- Android 设置应用的底部导航栏(虚拟按键)背景颜色
- android中设置ListView的选中的Item的背景颜色(松开后的背景颜色)
- 【Android】安卓开发实战之自定义分隔线条的长度、宽度、颜色
- 安卓自定义圆角Button,继承Button类实现在xml设置圆角半径和背景颜色和点击背景颜色
- Android中设置ListView的选中的Item的背景颜色