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

Commit 5b0725c4 authored by chihhangchuang's avatar chihhangchuang
Browse files

Fix the auto-generated parameter in ThemeOptionPreviewer

Test: Manually
Bug: 146475648
Change-Id: Ic1baa215460ec3add6c160c0d23cbea18459846d
parent 247d7e02
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -109,8 +109,8 @@ class ThemeOptionPreviewer implements LifecycleObserver {
                ScreenSizeCalculator.getInstance().getScreenAspectRatio(mContext);
                ScreenSizeCalculator.getInstance().getScreenAspectRatio(mContext);
        previewContainer.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
        previewContainer.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
            @Override
            @Override
            public void onLayoutChange(View view, int i, int i1, int i2, int i3, int i4, int i5,
            public void onLayoutChange(View view, int left, int top, int right, int bottom,
                                       int i6, int i7) {
                                       int oldLeft, int oldTop, int oldRight, int oldBottom) {
                // Calculate the full preview card height and width.
                // Calculate the full preview card height and width.
                int fullPreviewCardHeight = getFullPreviewCardHeight();
                int fullPreviewCardHeight = getFullPreviewCardHeight();
                int fullPreviewCardWidth = (int) (getFullPreviewCardHeight() / screenAspectRatio);
                int fullPreviewCardWidth = (int) (getFullPreviewCardHeight() / screenAspectRatio);
@@ -131,7 +131,7 @@ class ThemeOptionPreviewer implements LifecycleObserver {
                mContentView.setPivotX(0f);
                mContentView.setPivotX(0f);
                mContentView.setPivotY(0f);
                mContentView.setPivotY(0f);


                // Ensure there's only one content view in the container.
                // Ensure there will be only one content view in the container.
                previewContainer.removeAllViews();
                previewContainer.removeAllViews();
                // Finally, add the content view to the container.
                // Finally, add the content view to the container.
                previewContainer.addView(
                previewContainer.addView(