& lt; ? The XML version="1.0" encoding="utf-8"?>Android: layout_width="match_parent"
Android: layout_height="match_parent"
Android: padding="15 dp" & gt;Android: layout_width="match_parent"
Android: layout_height="wrap_content"
The android: id="@ + id/btn_2"
Android: text="button" 1
Android: textSize="20 sp"
Android: textColor="# 4 fd2d6"
Android: background="@ drawable/bg_btn1"
Android: layout_below="@ id/btn_1"
Android: layout_marginTop="10 dp"
/>
What is the blue background
CodePudding user response:
Blue?? Isn't this purple? Only from the point of view of layout file no problem, should not change the backgroundCodePudding user response:
Don't quite understand what you said is how to change, the code to dynamically change or XML inside change?XML to stick down your bg_btn1
At the same time, set the color with shape
Bg_btn1. XML below
<? The XML version="1.0" encoding="utf-8"?>
Android: color="# FFFFFF"/& gt;
Don't know under the baidu label attribute
CodePudding user response:
This code is bg_btn1
<? The XML version="1.0" encoding="utf-8"?>Android: shape="rectangle" & gt; Android: width="1 dp"
Android: color="# 000000"/& gt;Android: the radius="5 dp/& gt;"
Another problem is the direct write android: background="# 000000" there is no way to change the background color
CodePudding user response:
Android: color="# 000000"/& gt;
Stroke stroke stroke stroke stroke
Solid solid solid solid solid