Loading src/com/android/customization/picker/theme/ThemeOptionPreviewer.java +3 −4 Original line number Diff line number Diff line Loading @@ -128,8 +128,8 @@ class ThemeOptionPreviewer implements LifecycleObserver { public void onLayoutChange(View view, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { // Calculate the full preview card height and width. int fullPreviewCardHeight = getFullPreviewCardHeight(); int fullPreviewCardWidth = (int) (getFullPreviewCardHeight() / screenAspectRatio); final int fullPreviewCardHeight = getFullPreviewCardHeight(); final int fullPreviewCardWidth = (int) (fullPreviewCardHeight / screenAspectRatio); // Relayout the content view to match full preview card size. mContentView.measure( Loading @@ -139,8 +139,7 @@ class ThemeOptionPreviewer implements LifecycleObserver { // Scale the content view from full preview size to the container size. For full // preview, the scale value is 1. float scale = (float) previewContainer.getMeasuredHeight() / getFullPreviewCardHeight(); float scale = (float) previewContainer.getMeasuredHeight() / fullPreviewCardHeight; mContentView.setScaleX(scale); mContentView.setScaleY(scale); // The pivot point is centered by default, set to (0, 0). Loading Loading
src/com/android/customization/picker/theme/ThemeOptionPreviewer.java +3 −4 Original line number Diff line number Diff line Loading @@ -128,8 +128,8 @@ class ThemeOptionPreviewer implements LifecycleObserver { public void onLayoutChange(View view, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { // Calculate the full preview card height and width. int fullPreviewCardHeight = getFullPreviewCardHeight(); int fullPreviewCardWidth = (int) (getFullPreviewCardHeight() / screenAspectRatio); final int fullPreviewCardHeight = getFullPreviewCardHeight(); final int fullPreviewCardWidth = (int) (fullPreviewCardHeight / screenAspectRatio); // Relayout the content view to match full preview card size. mContentView.measure( Loading @@ -139,8 +139,7 @@ class ThemeOptionPreviewer implements LifecycleObserver { // Scale the content view from full preview size to the container size. For full // preview, the scale value is 1. float scale = (float) previewContainer.getMeasuredHeight() / getFullPreviewCardHeight(); float scale = (float) previewContainer.getMeasuredHeight() / fullPreviewCardHeight; mContentView.setScaleX(scale); mContentView.setScaleY(scale); // The pivot point is centered by default, set to (0, 0). Loading