Я хочу иметь палитру цветов с закругленными кнопками для своего приложения, как показано ниже.
Я попробовал вот что. Создание множества закругленных кнопок с разными цветами фона. Это кажется немного неэффективным. Нажатие на кнопку выберет цвет. Есть лучший способ сделать это ?
//rounded.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ff0000" />
<corners android:bottomRightRadius="35dp"
android:bottomLeftRadius="35dp"
android:topRightRadius="35dp"
android:topLeftRadius="35dp"/>
</shape>
//In Layout
<Button
android:id="@+id/button2"
android:layout_width="70dp"
android:layout_height="70dp"
android:background="@drawable/roundedbutton"
android:text="Button" />
![enter image description here](https://i.stack.imgur.com/jmOsB.png)