Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskMenuView.java +2 −1 Original line number Diff line number Diff line Loading @@ -239,7 +239,8 @@ public class TaskMenuView extends AbstractFloatingView { setLayoutParams(params); setScaleX(taskView.getScaleX()); setScaleY(taskView.getScaleY()); mOptionLayout.setOrientation(orientationHandler.getTaskMenuLayoutOrientation()); mOptionLayout.setOrientation(orientationHandler .getTaskMenuLayoutOrientation(mOptionLayout)); setPosition(sTempRect.left - insets.left, sTempRect.top - insets.top, taskView.getPagedOrientationHandler()); } Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java +2 −4 Original line number Diff line number Diff line Loading @@ -448,14 +448,12 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { } public void setOrientationState(RecentsOrientedState orientationState) { int iconRotation = orientationState.getTouchRotation(); PagedOrientationHandler orientationHandler = orientationState.getOrientationHandler(); boolean isRtl = orientationHandler.getRecentsRtlSetting(getResources()); LayoutParams snapshotParams = (LayoutParams) mSnapshotView.getLayoutParams(); int thumbnailPadding = (int) getResources().getDimension(R.dimen.task_thumbnail_top_margin); LayoutParams iconParams = (LayoutParams) mIconView.getLayoutParams(); int rotation = orientationState.getTouchRotationDegrees(); switch (iconRotation) { switch (orientationHandler.getRotation()) { case Surface.ROTATION_90: iconParams.gravity = (isRtl ? END : START) | CENTER_VERTICAL; iconParams.rightMargin = -thumbnailPadding; Loading @@ -480,7 +478,7 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { break; } mIconView.setLayoutParams(iconParams); mIconView.setRotation(rotation); mIconView.setRotation(orientationHandler.getDegreesRotated()); if (mMenuView != null) { mMenuView.onRotationChanged(); Loading src/com/android/launcher3/touch/HomeRotatedPageHandler.java +6 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.launcher3.touch; import android.graphics.RectF; import android.view.Surface; import android.widget.LinearLayout; public class HomeRotatedPageHandler extends PortraitPagedViewHandler { @Override Loading Loading @@ -46,4 +47,9 @@ public class HomeRotatedPageHandler extends PortraitPagedViewHandler { } } // TODO (b/149609488) handle 180 case as well } @Override public int getTaskMenuLayoutOrientation(LinearLayout taskMenuLayout) { return taskMenuLayout.getOrientation(); } } src/com/android/launcher3/touch/LandscapePagedViewHandler.java +6 −1 Original line number Diff line number Diff line Loading @@ -176,6 +176,11 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler { return 90; } @Override public int getRotation() { return Surface.ROTATION_90; } @Override public void offsetTaskRect(RectF rect, float value, int displayRotation, int launcherRotation) { if (displayRotation == Surface.ROTATION_0) { Loading Loading @@ -246,7 +251,7 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler { } @Override public int getTaskMenuLayoutOrientation() { public int getTaskMenuLayoutOrientation(LinearLayout taskMenuLayout) { return LinearLayout.HORIZONTAL; } Loading src/com/android/launcher3/touch/PagedOrientationHandler.java +2 −1 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ public interface PagedOrientationHandler { void setMaxScroll(AccessibilityEvent event, int maxScroll); boolean getRecentsRtlSetting(Resources resources); float getDegreesRotated(); int getRotation(); void offsetTaskRect(RectF rect, float value, int delta, int launcherRotation); int getPrimaryValue(int x, int y); int getSecondaryValue(int x, int y); Loading @@ -95,7 +96,7 @@ public interface PagedOrientationHandler { float getTaskMenuX(float x, View thumbnailView); float getTaskMenuY(float y, View thumbnailView); int getTaskMenuWidth(View view); int getTaskMenuLayoutOrientation(); int getTaskMenuLayoutOrientation(LinearLayout taskMenuLayout); void setLayoutParamsForTaskMenuOptionItem(LinearLayout.LayoutParams lp); /** Loading Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskMenuView.java +2 −1 Original line number Diff line number Diff line Loading @@ -239,7 +239,8 @@ public class TaskMenuView extends AbstractFloatingView { setLayoutParams(params); setScaleX(taskView.getScaleX()); setScaleY(taskView.getScaleY()); mOptionLayout.setOrientation(orientationHandler.getTaskMenuLayoutOrientation()); mOptionLayout.setOrientation(orientationHandler .getTaskMenuLayoutOrientation(mOptionLayout)); setPosition(sTempRect.left - insets.left, sTempRect.top - insets.top, taskView.getPagedOrientationHandler()); } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java +2 −4 Original line number Diff line number Diff line Loading @@ -448,14 +448,12 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { } public void setOrientationState(RecentsOrientedState orientationState) { int iconRotation = orientationState.getTouchRotation(); PagedOrientationHandler orientationHandler = orientationState.getOrientationHandler(); boolean isRtl = orientationHandler.getRecentsRtlSetting(getResources()); LayoutParams snapshotParams = (LayoutParams) mSnapshotView.getLayoutParams(); int thumbnailPadding = (int) getResources().getDimension(R.dimen.task_thumbnail_top_margin); LayoutParams iconParams = (LayoutParams) mIconView.getLayoutParams(); int rotation = orientationState.getTouchRotationDegrees(); switch (iconRotation) { switch (orientationHandler.getRotation()) { case Surface.ROTATION_90: iconParams.gravity = (isRtl ? END : START) | CENTER_VERTICAL; iconParams.rightMargin = -thumbnailPadding; Loading @@ -480,7 +478,7 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { break; } mIconView.setLayoutParams(iconParams); mIconView.setRotation(rotation); mIconView.setRotation(orientationHandler.getDegreesRotated()); if (mMenuView != null) { mMenuView.onRotationChanged(); Loading
src/com/android/launcher3/touch/HomeRotatedPageHandler.java +6 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.launcher3.touch; import android.graphics.RectF; import android.view.Surface; import android.widget.LinearLayout; public class HomeRotatedPageHandler extends PortraitPagedViewHandler { @Override Loading Loading @@ -46,4 +47,9 @@ public class HomeRotatedPageHandler extends PortraitPagedViewHandler { } } // TODO (b/149609488) handle 180 case as well } @Override public int getTaskMenuLayoutOrientation(LinearLayout taskMenuLayout) { return taskMenuLayout.getOrientation(); } }
src/com/android/launcher3/touch/LandscapePagedViewHandler.java +6 −1 Original line number Diff line number Diff line Loading @@ -176,6 +176,11 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler { return 90; } @Override public int getRotation() { return Surface.ROTATION_90; } @Override public void offsetTaskRect(RectF rect, float value, int displayRotation, int launcherRotation) { if (displayRotation == Surface.ROTATION_0) { Loading Loading @@ -246,7 +251,7 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler { } @Override public int getTaskMenuLayoutOrientation() { public int getTaskMenuLayoutOrientation(LinearLayout taskMenuLayout) { return LinearLayout.HORIZONTAL; } Loading
src/com/android/launcher3/touch/PagedOrientationHandler.java +2 −1 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ public interface PagedOrientationHandler { void setMaxScroll(AccessibilityEvent event, int maxScroll); boolean getRecentsRtlSetting(Resources resources); float getDegreesRotated(); int getRotation(); void offsetTaskRect(RectF rect, float value, int delta, int launcherRotation); int getPrimaryValue(int x, int y); int getSecondaryValue(int x, int y); Loading @@ -95,7 +96,7 @@ public interface PagedOrientationHandler { float getTaskMenuX(float x, View thumbnailView); float getTaskMenuY(float y, View thumbnailView); int getTaskMenuWidth(View view); int getTaskMenuLayoutOrientation(); int getTaskMenuLayoutOrientation(LinearLayout taskMenuLayout); void setLayoutParamsForTaskMenuOptionItem(LinearLayout.LayoutParams lp); /** Loading