Loading libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ android:clipChildren="false" android:clipToPadding="false" android:paddingBottom="@dimen/desktop_mode_handle_menu_pill_elevation" android:paddingRight="@dimen/desktop_mode_handle_menu_pill_elevation" android:paddingEnd="@dimen/desktop_mode_handle_menu_pill_elevation" android:orientation="vertical"> <LinearLayout Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt +20 −6 Original line number Diff line number Diff line Loading @@ -238,8 +238,12 @@ class HandleMenu( val taskBounds = taskInfo.getConfiguration().windowConfiguration.bounds updateGlobalMenuPosition(taskBounds, captionX, captionY) if (layoutResId == R.layout.desktop_mode_app_header) { // Align the handle menu to the left side of the caption. menuX = marginMenuStart // Align the handle menu to the start of the header. menuX = if (context.isRtl()) { taskBounds.width() - menuWidth - marginMenuStart } else { marginMenuStart } menuY = captionY + marginMenuTop } else { if (DesktopModeFlags.ENABLE_HANDLE_INPUT_FIX.isTrue()) { Loading @@ -261,11 +265,18 @@ class HandleMenu( val nonFreeformX = captionX + (captionWidth / 2) - (menuWidth / 2) when { taskInfo.isFreeform -> { if (context.isRtl()) { globalMenuPosition.set( /* x= */ taskBounds.right - menuWidth - marginMenuStart, /* y= */ taskBounds.top + captionY + marginMenuTop ) } else { globalMenuPosition.set( /* x= */ taskBounds.left + marginMenuStart, /* y= */ taskBounds.top + captionY + marginMenuTop ) } } taskInfo.isFullscreen -> { globalMenuPosition.set( /* x = */ nonFreeformX, Loading Loading @@ -430,6 +441,9 @@ class HandleMenu( return context.resources.getDimensionPixelSize(resourceId) } private fun Context.isRtl() = resources.configuration.layoutDirection == View.LAYOUT_DIRECTION_RTL fun close() { handleMenuView?.animateCloseMenu { handleMenuViewContainer?.releaseView() Loading Loading
libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ android:clipChildren="false" android:clipToPadding="false" android:paddingBottom="@dimen/desktop_mode_handle_menu_pill_elevation" android:paddingRight="@dimen/desktop_mode_handle_menu_pill_elevation" android:paddingEnd="@dimen/desktop_mode_handle_menu_pill_elevation" android:orientation="vertical"> <LinearLayout Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt +20 −6 Original line number Diff line number Diff line Loading @@ -238,8 +238,12 @@ class HandleMenu( val taskBounds = taskInfo.getConfiguration().windowConfiguration.bounds updateGlobalMenuPosition(taskBounds, captionX, captionY) if (layoutResId == R.layout.desktop_mode_app_header) { // Align the handle menu to the left side of the caption. menuX = marginMenuStart // Align the handle menu to the start of the header. menuX = if (context.isRtl()) { taskBounds.width() - menuWidth - marginMenuStart } else { marginMenuStart } menuY = captionY + marginMenuTop } else { if (DesktopModeFlags.ENABLE_HANDLE_INPUT_FIX.isTrue()) { Loading @@ -261,11 +265,18 @@ class HandleMenu( val nonFreeformX = captionX + (captionWidth / 2) - (menuWidth / 2) when { taskInfo.isFreeform -> { if (context.isRtl()) { globalMenuPosition.set( /* x= */ taskBounds.right - menuWidth - marginMenuStart, /* y= */ taskBounds.top + captionY + marginMenuTop ) } else { globalMenuPosition.set( /* x= */ taskBounds.left + marginMenuStart, /* y= */ taskBounds.top + captionY + marginMenuTop ) } } taskInfo.isFullscreen -> { globalMenuPosition.set( /* x = */ nonFreeformX, Loading Loading @@ -430,6 +441,9 @@ class HandleMenu( return context.resources.getDimensionPixelSize(resourceId) } private fun Context.isRtl() = resources.configuration.layoutDirection == View.LAYOUT_DIRECTION_RTL fun close() { handleMenuView?.animateCloseMenu { handleMenuViewContainer?.releaseView() Loading