I have the following layout:
<!-- GROUPED BUTTONS -->
<LinearLayout
android:id="@+id/group_button_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="center"
android:layout_centerHorizontal="true">
<Button
android:id="@+id/group_button_week"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:background="@color/app_blue"
android:textSize="12sp"
android:text="Week"/>
<Button
android:id="@+id/group_button_month"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/app_blue"
android:textSize="12sp"
android:padding="0dp"
android:text="Month"/>
<Button
android:id="@+id/group_button_quarter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/app_blue"
android:background="@color/white"
android:textSize="12sp"
android:text="Quarter"/>
<Button
android:id="@+id/group_button_half_year"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/app_blue"
android:background="@color/white"
android:textSize="12sp"
android:text="Half Year"/>
</LinearLayout>
<!-- //GROUPED BUTTONS -->
I would like to change style (background and text color) to clicked button and all other buttons (except clicked one) set the default (unclicked) style.
How can i do it in the right way please?
Many thanks for any advice.