activity_main.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/rl" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="16dp" tools:context=".MainActivity" android:background="#f0f7e7" > <!-- To get a circular shape, we need to apply the same value for width and height --> <Button android:id="@+id/btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Circular Shape" android:layout_centerInParent="true" android:background="@drawable/circle_shape" android:textColor="#fff" /> ...
Android, .NET C#, Flutter, and Many More Programming tutorials.