I am pulling my hair out trying to figure out why the last SwitchCompat in my BottomSheetDialog is green instead of yellow (shown using the Layout Inspector).
The Layout Inspector says that the other two SwitchCompats that are yellow [that are in a fragment added to FrameLayout containerMultiFunctionButtonActions] don't have "style/Theme.Design.Light.BottomSheetDialog()".
Why would that be messing up my SwitchCompat?
The correctly colored SwitchCompats are not overriding any style/theme, nor are any elements between them and the FrameLayout containerMultiFunctionButtonActions, so to me I think that I have clearly and successfully set up the style/theme.
Here is my layout:
...
<TableRow>
<LinearLayout
android:id="@+id/groupMultiFunctionButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:layout_span="2"
android:orientation="vertical"
android:visibility="visible"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
>
<TextView
android:id="@+id/textMultiFunctionButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/multi_function_button"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/app_primary_text"
/>
</LinearLayout>
<FrameLayout
android:id="@+id/containerMultiFunctionButtonActions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="4dp"
android:layout_marginStart="4dp"
android:background="@color/pb_gray_light"
/>
</LinearLayout>
</TableRow>
<TableRow>
<android.support.v7.widget.SwitchCompat
android:id="@+id/switchLost"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_span="2"
android:text="Why am I green?!?!?!"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/pb_action_item_text"
/>
<!--
NOTE: textAppearance and textColor understandably have no effect on the switch color
-->
</TableRow>
...
Anything else needed to debug this?
Should I really post my styles/themes?
They are all over the place, but they seem to be working fine everywhere else except inside of this BottomSheetDialog.

