Answer the question
In order to leave comments, you need to log in
How to make a completely round button?
I have a ListView and the list item has a round button!
I made it round like this:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<size
android:height="@dimen/task_list_parent_indicator"
android:width="@dimen/task_list_parent_indicator"
/>
<solid
android:color="@color/colorPrimaryDark"
/>
<corners
android:radius="@dimen/tool_bar_button_radius"
/>
<stroke
android:width="0.1dp"
android:color="@color/colorAccent"
/>
</shape>
</item>
</selector>
Answer the question
In order to leave comments, you need to log in
You already have a selector , you just need to add a similar item to it with the state_pressed="true" state. There, write how you want the pressed button to look.
To be fair, it's better to use android:shape="oval" instead of a rectangle with rounded corners. Style the height, width and background of the button. Will be ok.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question