Android Question Button with rounded corners

Brian Dean

Well-Known Member
Licensed User
Longtime User
Some time ago, in the Designer, I managed to define a button with rounded edges. I did it as follows ...

Drawable.jpg

I have forgotten how I did this, and I have spent over an hour using the forum search without finding an answer. The best I can do is to select a Statelist Drawable and ignore two of the three options. I am getting desperate. Can anybody help me?
 

Brian Dean

Well-Known Member
Licensed User
Longtime User
Something is indeed strange in that screenshot.
That's good - maybe I am not going senile after all. Whatever I did it was repeatable because I used the same effect in more then one application. I prefer rounded buttons to square ones, so I would very much like to be able to repeat this effect, if I could only remember how.

In case it helps I am attaching one of the .bal files as an example.
 

Attachments

  • buttons.bal
    3.5 KB · Views: 183
Upvote 0

teddybear

Well-Known Member
Licensed User
That's good - maybe I am not going senile after all. Whatever I did it was repeatable because I used the same effect in more then one application. I prefer rounded buttons to square ones, so I would very much like to be able to repeat this effect, if I could only remember how.

In case it helps I am attaching one of the .bal files as an example.
It's interesting, the button in the bal file is indeed like that
 
Upvote 0

Brian Dean

Well-Known Member
Licensed User
Longtime User
Create a new button. You should be able to change the drawable.
That might be true, but I don't know how to change the drawable (except between Default and Statelist). I am managing to design my layout now by using cut and paste to copy the buttons that I have previously set up with rounded borders.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
If you are concerned about having the design properties readily available in the designer, why not consider a SwiftButton instead of a regular button and benefit from even more properties.
1675365440872.png
 
Upvote 0

Brian Dean

Well-Known Member
Licensed User
Longtime User
... why not consider a SwiftButton
When you made that suggestion yesterday I thought that I was the only person too dumb to know how to replace the two standard drawable types provided in the Designer with one that did what I wanted. Now it appears that I might be the only person who has ever managed to achieve it. Unfortunately I am still too dumb to remember how to do it again.

So this time I will follow your suggestion and try using a SwiftButton. Thank you for your patience.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
I'm really curious how you did that, perhaps it was from some mysterious place(just kidding), but it can be copied to designer of other project, I have saved it in my toolbox, so now I have three drawable options of the button view .:cool:
 
Last edited:
Upvote 0
Top