Loading quickstep/res/layout/task_menu_with_arrow.xml +11 −5 Original line number Diff line number Diff line Loading @@ -23,6 +23,10 @@ android:orientation="vertical" android:visibility="invisible"> <ScrollView android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:id="@+id/menu_option_layout" android:layout_width="match_parent" Loading @@ -30,4 +34,6 @@ android:orientation="vertical" android:showDividers="middle" /> </ScrollView> </com.android.quickstep.views.TaskMenuViewWithArrow> No newline at end of file quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.java +2 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,8 @@ public class PortraitPagedViewHandler extends DefaultPagedViewHandler implements @Override public int getTaskMenuHeight(float taskInsetMargin, DeviceProfile deviceProfile, float taskMenuX, float taskMenuY) { return (int) (deviceProfile.availableHeightPx - taskInsetMargin - taskMenuY); return (int) (deviceProfile.heightPx - deviceProfile.getInsets().top - taskMenuY - deviceProfile.getOverviewActionsClaimedSpaceBelow()); } @Override Loading quickstep/src/com/android/quickstep/views/TaskMenuViewWithArrow.kt +19 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,25 @@ class TaskMenuViewWithArrow<T : BaseDraggingActivity> : ArrowPopup<T> { optionLayout = requireViewById(R.id.menu_option_layout) } override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { val maxMenuHeight: Int = calculateMaxHeight() val newHeightMeasureSpec = if (MeasureSpec.getSize(heightMeasureSpec) > maxMenuHeight) { MeasureSpec.makeMeasureSpec(maxMenuHeight, MeasureSpec.AT_MOST) } else heightMeasureSpec super.onMeasure(widthMeasureSpec, newHeightMeasureSpec) } private fun calculateMaxHeight(): Int { val taskInsetMargin = resources.getDimension(R.dimen.task_card_margin) return taskView.pagedOrientationHandler.getTaskMenuHeight( taskInsetMargin, mActivityContext.deviceProfile, translationX, translationY ) } private fun populateAndShowForTask( taskContainer: TaskIdAttributeContainer, alignedOptionIndex: Int Loading Loading
quickstep/res/layout/task_menu_with_arrow.xml +11 −5 Original line number Diff line number Diff line Loading @@ -23,6 +23,10 @@ android:orientation="vertical" android:visibility="invisible"> <ScrollView android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:id="@+id/menu_option_layout" android:layout_width="match_parent" Loading @@ -30,4 +34,6 @@ android:orientation="vertical" android:showDividers="middle" /> </ScrollView> </com.android.quickstep.views.TaskMenuViewWithArrow> No newline at end of file
quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.java +2 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,8 @@ public class PortraitPagedViewHandler extends DefaultPagedViewHandler implements @Override public int getTaskMenuHeight(float taskInsetMargin, DeviceProfile deviceProfile, float taskMenuX, float taskMenuY) { return (int) (deviceProfile.availableHeightPx - taskInsetMargin - taskMenuY); return (int) (deviceProfile.heightPx - deviceProfile.getInsets().top - taskMenuY - deviceProfile.getOverviewActionsClaimedSpaceBelow()); } @Override Loading
quickstep/src/com/android/quickstep/views/TaskMenuViewWithArrow.kt +19 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,25 @@ class TaskMenuViewWithArrow<T : BaseDraggingActivity> : ArrowPopup<T> { optionLayout = requireViewById(R.id.menu_option_layout) } override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { val maxMenuHeight: Int = calculateMaxHeight() val newHeightMeasureSpec = if (MeasureSpec.getSize(heightMeasureSpec) > maxMenuHeight) { MeasureSpec.makeMeasureSpec(maxMenuHeight, MeasureSpec.AT_MOST) } else heightMeasureSpec super.onMeasure(widthMeasureSpec, newHeightMeasureSpec) } private fun calculateMaxHeight(): Int { val taskInsetMargin = resources.getDimension(R.dimen.task_card_margin) return taskView.pagedOrientationHandler.getTaskMenuHeight( taskInsetMargin, mActivityContext.deviceProfile, translationX, translationY ) } private fun populateAndShowForTask( taskContainer: TaskIdAttributeContainer, alignedOptionIndex: Int Loading