I have:
<stroke android:width="1px" android:color="#A6ACB1"/>
I’d like to remove this border from the bottom (for example) of the element. Is it possible? (Eclipse suggests me only: color, width, dashWidth and dashGap).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As far as I understand it, there isn’t an easy way of doing it. but if you use layer-list with an item that has the border and then one that doesn’t with an offset from all the sides for which you want a border equal to the border width, you’d achieve that.
Let me make the xml for you representing the borderless bottom..
As you can see, I’m telling the second item to be inset of the first one by two dp’s on all sides except bottom (hence the no-border result on the bottom), there you go:
So essentially this isn’t a border per-se, it’s the shape from below (although you could add a border if you need dashed or dotted or whatever) being covered by a second item with would be the body of the button. All in the same drawable 🙂
This can be applied to any border you want to remove, by changing the values that the item is inset, for example, if I change the
rightin the Body item tobottom, the missing border would the right one since it’s the one without the inset