In my relative layout, I have a circle View and a TextView. I would like to center the TextView exactly within the circle View. How do I do that? The code I have so far is below:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<View
android:id="@+id/firstCircle"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginLeft="24dp"
android:layout_marginTop="24dp"
android:background="@drawable/circle" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1"
android:id="@+id/number1" />
</RelativeLayout>
I want the final result to look like: