I'm trying to use a Toggle Button, supporting back to API 11. The problem is this standard Toggle Buttom seems to have a greyish background color, while I just want it to be white (like the background).
I've been trying:
android:background="@color/white"
android:background="@null"
but then I also lose the indicator light, which I want to keep. I've seen a few answers about changing the background color of the toggle button (creating own selector), but I seem to be losing the indicator light with those as well.
This is the relevant part of the layout:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/event_bottom_sheet_attenders"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@color/white"
android:drawableLeft="@drawable/state_list_people_person_bottom_sheet"
android:drawableStart="@drawable/state_list_people_person_bottom_sheet"
android:gravity="center"
android:padding="10dp"
android:text="Attenders"
android:textColor="@color/material_teal_500" />
<ToggleButton
android:id="@+id/event_bottom_sheet_toggle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:checked="true"
android:gravity="center"
android:padding="10dp"
android:textColor="@color/material_teal_500"
android:textOff="Not going"
android:textOn="Going" />
</LinearLayout>
How do I go about fixing this?
Thanks in advance.