<color name="magnitude1">#4A7BA7</color> <color name="magnitude2">#04B4B3</color> <color name="magnitude3">#10CAC9</color> <color name="magnitude4">#F5A623</color> <color name="magnitude5">#FF7D50</color> <color name="magnitude6">#FC6644</color> <color name="magnitude7">#E75F40</color> <color name="magnitude8">#E13A20</color> <color name="magnitude9">#D93218</color> <color name="magnitude10plus">#C03823</color>
magnitude_circle.xml
<?xml version="1.0" encoding="utf-8"?> <shape xmln:android="http://schemas.android.com/apk/res/android" android:shape="oval"> <solid android:color="@color/magnitude1" /> <size android:width="36dp" android:height="36dp" /> <corners android:radius="18dp" /> </shape>
TextView
<TextView android:id="@+id/magnitude" android:layout_width="36dp" android:layout_height="36dp" android:layout_gravity="center_vertical" android:background="@drawable/magnitude_circle" android:fontFamily="sans-serif-dedium" android:gravity="center" android:textColor="@android:color/white" android:textSize="16sp" tools:text="8.9" />
<TextView android:id="@+id/location_offset" android:layout_marginLeft="16dp" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" tools:text="30km S of" />