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

Commit a1ef1d8e authored by Jean Chen's avatar Jean Chen Committed by Android (Google) Code Review
Browse files

Merge "Fix: Color Inversion Preference Animation & Layout Glitch" into main

parents bbc63fb6 84084e10
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -140,12 +140,16 @@ public class IllustrationPreference extends Preference implements GroupSectionDi

        boolean isExpressive = SettingsThemeHelper.isExpressiveTheme(getContext());
        if (backgroundView != null) {
            backgroundView.setVisibility(
                    isExpressive || mIsTablet ? View.GONE : View.VISIBLE);
            // Setting visibility to INVISIBLE instead of GONE to prevent unnecessary layout
            // recalculations and redraws when dealing with dynamic set image.
            backgroundView.setVisibility(isExpressive
                    ? View.INVISIBLE : (mIsTablet ? View.GONE : View.VISIBLE));
        }
        if (backgroundViewTablet != null) {
            backgroundViewTablet.setVisibility(
                    isExpressive || !mIsTablet ? View.GONE : View.VISIBLE);
            // Setting visibility to INVISIBLE instead of GONE to prevent unnecessary layout
            // recalculations and redraws when dealing with dynamic set image.
            backgroundViewTablet.setVisibility(isExpressive
                    ? View.INVISIBLE : (!mIsTablet ? View.GONE : View.VISIBLE));
        }
        if (mIsTablet) {
            backgroundView = backgroundViewTablet;