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

Commit f96fe81c authored by Edgar Wang's avatar Edgar Wang
Browse files

[Expressive design] Hide background of IllustrationPreference

This new requirement from UX and Animation team, we don't need to
show background the lottie and drawable should handle by them self

Fixes: 421797172
Fixes: 385768669
Test: visual
Flag: com.android.settingslib.widget.theme.flags.is_expressive_design_enabled
Change-Id: I235050cea0978015efca34a881789e7c1ebaf3c0
parent 13453c13
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -138,11 +138,14 @@ public class IllustrationPreference extends Preference implements GroupSectionDi
        ImageView backgroundViewTablet =
                (ImageView) holder.findViewById(R.id.background_view_tablet);

        boolean isExpressive = SettingsThemeHelper.isExpressiveTheme(getContext());
        if (backgroundView != null) {
            backgroundView.setVisibility(mIsTablet ? View.GONE : View.VISIBLE);
            backgroundView.setVisibility(
                    isExpressive || mIsTablet ? View.GONE : View.VISIBLE);
        }
        if (backgroundViewTablet != null) {
            backgroundViewTablet.setVisibility(mIsTablet ? View.VISIBLE : View.GONE);
            backgroundViewTablet.setVisibility(
                    isExpressive || !mIsTablet ? View.GONE : View.VISIBLE);
        }
        if (mIsTablet) {
            backgroundView = backgroundViewTablet;