I want to create the stepper as shown in above image. Below is the code what I have tried. text below the circles should be at the center of circle. color of each line should be changed as next activity is navigated. and also color of each circle should be also changed when navigated to next activity.
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_title"
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal"
android:visibility="visible">
<View
android:id="@+id/circle_one"
android:layout_width="15dp"
android:layout_height="15dp"
android:background="@drawable/ic_gray_hollow_circle" />
<View
android:id="@+id/line_one"
android:layout_width="76dp"
android:layout_height="15dp"
android:layout_toEndOf="@+id/circle_one"
android:background="@drawable/ic_gray_line" />
<View
android:id="@+id/circle_two"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_toEndOf="@+id/line_one"
android:background="@drawable/ic_gray_hollow_circle" />
<View
android:id="@+id/line_two"
android:layout_width="76dp"
android:layout_height="15dp"
android:layout_toEndOf="@+id/circle_two"
android:background="@drawable/ic_gray_line" />
<View
android:id="@+id/circle_three"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_toEndOf="@+id/line_two"
android:background="@drawable/ic_gray_hollow_circle" />
<View
android:id="@+id/line_three"
android:layout_width="76dp"
android:layout_height="15dp"
android:layout_toEndOf="@+id/circle_three"
android:background="@drawable/ic_gray_line" />
<View
android:id="@+id/circle_four"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_toEndOf="@+id/line_three"
android:background="@drawable/ic_gray_hollow_circle" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/circle_one"
android:text="Pay"
android:textColor="#dbdbdb" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/circle_two"
android:layout_toEndOf="@id/line_one"
android:text="Amount"
android:textColor="#dbdbdb" />
</RelativeLayout>
Any help will be appreciated.