Я пытаюсь сделать круглую кнопку с изображением, также я хочу добавить их в фон. Я могу создать кнопку круга, но я понятия не имею, как добавить изображение и разделитель.круглая кнопка с изображением
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="4">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/round_button"
android:text="New Button"
android:id="@+id/button"
android:layout_weight="1" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/round_button"
android:text="New Button"
android:id="@+id/button2"
android:layout_weight="1" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/round_button"
android:text="New Button"
android:id="@+id/button3"
android:layout_weight="1" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/round_button"
android:text="New Button"
android:id="@+id/button4"
android:layout_weight="1" />
</LinearLayout>
Round_button.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false">
<shape android:shape="oval">
<solid android:color="#0dbe00"/>
</shape>
</item>
<item android:state_pressed="true">
<shape android:shape="oval">
<solid android:color="#c20586"/>
</shape>
</item>
</selector>
Что я хочу:
Что у меня есть:
Хороший ответ! Хороший ответ! –