I am making an android application and I was wondering how to achieve a coloured heading with an underline in android. The image below is what I want.
The code I have written so far:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".AddContact" >
<TextView
android:id="@+id/lbl_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/heading_name" />
<LinearLayout
android:layout_width="337dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="6" >
<EditText
android:id="@+id/edit_first_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_weight="5"
android:hint="@string/hint_firstname"
android:inputType="textCapSentences" />
<ImageButton
android:id="@+id/addimage"
android:layout_width="0dp"
android:layout_height="58dp"
android:layout_weight="1"
android:background="@drawable/ic_social_person" />
</LinearLayout>
<LinearLayout
android:layout_width="337dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="5" >
<EditText
android:id="@+id/edit_last_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_weight="4"
android:hint="@string/hint_lastname"
android:inputType="textCapSentences" />
</LinearLayout>
<TextView
android:id="@+id/lbl_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/heading_number" />
<LinearLayout
android:layout_width="337dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3" >
<EditText
android:id="@+id/edit_number"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_weight="2"
android:hint="@string/hint_number"
android:inputType="number" />
<Spinner
android:id="@+id/contact_number_spinner"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<TextView
android:id="@+id/lbl_email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/heading_email" />
<LinearLayout
android:layout_width="337dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3" >
<EditText
android:id="@+id/edit_email"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_weight="2"
android:hint="@string/hint_email"
android:inputType="textEmailAddress" />
<Spinner
android:id="@+id/contact_email_spinner"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<TextView
android:id="@+id/lbl_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/heading_address" />
<LinearLayout
android:layout_width="337dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3" >
<EditText
android:id="@+id/edit_address"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_weight="2"
android:hint="@string/hint_address"
android:inputType="textPostalAddress" />
<Spinner
android:id="@+id/contact_address_spinner"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<TextView
android:id="@+id/lbl_event"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/heading_event" />
<LinearLayout
android:layout_width="337dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3" >
<EditText
android:id="@+id/edit_date"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_weight="2"
android:hint="@string/hint_date"
android:inputType="date" />
<Spinner
android:id="@+id/contact_date_spinner"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
Any help would be appreciated