android: layout_height = "40dp"
android: layout_width = "fill_parent"
android: layout_marginTop = "5dp"
android: text = "@ string / login_login_text"
android: layout_marginLeft = "30dp"
android: layout_marginRight = "30dp"
android: background = "@ drawable / login_loginbtn"
/>
android: layout_height = "40dp"
android: layout_width = "fill_parent"
android: layout_marginTop = "5dp"
android: text = "@ string / login_regist_text"
android: layout_marginLeft = "50dp"
android: layout_marginRight = "50dp"
android: background = "@ drawable / login_registbtn"
/>
These are two buttons XML file attribute settings, use the picture for .9. Png, and the results made me very depressed.

The question is:
1 Why the button above text missing? (I tried to put a button background to non .9. Png ordinary pictures, text is normal)
2 Why did not the second button rounded up. I know this is not enough because the width of the problem, but I use .9. Png ah, stretching the place is not rounded ah.
Attached:. .9 Png Figure (should be able to see it?):

Reply:
9.png is login_loginbtn?
Reply:
Almost yes.
login_loginbtn are two pictures, that is, at the click of the button and not two different pictures when clicked, using xml write ah.
Here is one 9.png posted a.
Reply:
Picture seems to be a problem
Black side did not draw well
Reply:
e, how should I paint it? Seek guidance!
Reply:

Reference to see it
Reply:
You can also achieve the same effect http://blog.xianqu.org/2012/04/android-borders-and-radius-corners/ over XML 9.png
Reply:
There padding 9patch default property settings, not much said, adding padding attributes like the button in.
Reply:
You're cut too .9 poked. . . Give you a quick way to the left top point one point, the right bottom painting full line, ctrl + s get
Reply:
I am a novice, do not laugh ah!
.9 Represents the right and below the text area, nothing to draw not on behalf of the entire text area are you?
Reply:
Positive solution! I added android: padding = "0dp" perfect solution to the problem, very grateful!
Reply:
Documentation is to say how much the right and below the text area is drawn on how much it
No comments:
Post a Comment