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

Commit e48ade01 authored by Mill Chen's avatar Mill Chen
Browse files

[Expressive design] Fix theme issues

Bug: 405827971
Fix: 404997935
Test: manual test
Flag: EXEMPT bugfix
Change-Id: I53c1622b91aae70e92f0d4a1fbb78296d3bfd439
parent aa8beeae
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.settingslib.collapsingtoolbar;

import android.app.ActionBar;
import android.content.res.Resources;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
@@ -204,4 +205,16 @@ public class CollapsingToolbarAppCompatActivity extends AppCompatActivity {
        }
        return mToolbardelegate;
    }

    /** Returns the current theme and checks if needing to apply expressive theme. */
    @Override
    public Resources.Theme getTheme() {
        Resources.Theme theme = super.getTheme();
        if (SettingsThemeHelper.isExpressiveTheme(this)) {
            theme.applyStyle(
                    com.android.settingslib.widget.theme.R.style.Theme_SubSettingsBase_Expressive,
                    true);
        }
        return theme;
    }
}
+13 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.settingslib.collapsingtoolbar;

import android.app.ActionBar;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
@@ -204,4 +205,16 @@ public class CollapsingToolbarBaseActivity extends FragmentActivity {
        }
        return mToolbardelegate;
    }

    /** Returns the current theme and checks if needing to apply expressive theme. */
    @Override
    public Resources.Theme getTheme() {
        Resources.Theme theme = super.getTheme();
        if (SettingsThemeHelper.isExpressiveTheme(this)) {
            theme.applyStyle(
                    com.android.settingslib.widget.theme.R.style.Theme_SubSettingsBase_Expressive,
                    true);
        }
        return theme;
    }
}