How to draw a dot circle inside a square drawable in android? -
i want small dot inside square button , have tried till answered azizbekian:
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> <size android:width="100dp" android:height="100dp"/> <solid android:color="#38b0ef"/> </shape> </item> <item android:bottom="45dp" android:left="45dp" android:right="45dp" android:top="45dp"> <shape android:shape="oval"> <stroke android:width="1dp" android:color="#0c5069"/> <size android:width="20dp" android:height="20dp"/> <solid android:color="#0c5069"/> </shape> </item> </layer-list>
the first image have tried , second image want excluding text.
and code button have apply drawable there 7 such buttons in horizontal linearlayout weightsum:100 each button has weight 14
<button android:id="@+id/wed" android:layout_width="0dp" android:layout_height="35dp" android:layout_marginend="1dp" android:background="@drawable/my_button_dot" android:text="wed" android:textallcaps="true" android:textstyle="bold" android:textcolor="#ffffff" android:layout_weight="15"/>
the dot not appear in background when drawable applied button, maybe because of size of button , drawable tried adjust size of drawable, not understand , did not work, how can adjust such dot appears in button background.
Comments
Post a Comment