Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7e09234 authored by Yuchen's avatar Yuchen
Browse files

[Expressive design] Update MainSwitch in SettingsActivity.

Bug: 349681531
Flag: EXEMPT migration
Test: visual
Change-Id: I0dc55e2ced5ba4ce808e0b29a9b3b60549972637
parent 49d8ff96
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -28,6 +28,13 @@
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

    <com.android.settings.widget.SettingsMainSwitchBar
        android:id="@+id/expressive_switch_bar"
        android:visibility="gone"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="16dip"/>

    <FrameLayout
        android:id="@+id/main_content"
        android:layout_width="match_parent"
+4 −1
Original line number Diff line number Diff line
@@ -311,7 +311,10 @@ public class SettingsActivity extends SettingsBaseActivity
        }

        setContentView(R.layout.settings_main_prefs);
        mMainSwitch = findViewById(R.id.switch_bar);

        mMainSwitch = SettingsThemeHelper.isExpressiveTheme(this)
                ? findViewById(R.id.expressive_switch_bar)
                : findViewById(R.id.switch_bar);
        if (mMainSwitch != null) {
            mMainSwitch.setMetricsCategory(lookupMetricsCategory());
            mMainSwitch.setTranslationZ(findViewById(R.id.main_content).getTranslationZ() + 1);