Loading libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml +27 −6 Original line number Diff line number Diff line Loading @@ -164,12 +164,33 @@ android:src="@drawable/desktop_mode_ic_handle_menu_change_aspect_ratio" style="@style/DesktopModeHandleMenuActionButton"/> <LinearLayout android:id="@+id/handle_menu_restart_pill" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <com.android.wm.shell.windowdecor.HandleMenuActionButton android:id="@+id/handle_menu_restart_button" android:contentDescription="@string/handle_menu_restart_text" android:text="@string/handle_menu_restart_text" android:src="@drawable/desktop_mode_ic_handle_menu_restart" style="@style/DesktopModeHandleMenuActionButton"/> style="@style/DesktopModeHandleMenuActionButton" android:layout_width="0dp" android:layout_weight="1"/> <ImageView android:id="@+id/restart_menu_error_icon" android:contentDescription="@string/handle_menu_error_icon_text" android:layout_gravity="end|center_vertical" android:layout_width="20dp" android:layout_height="20dp" android:layout_marginEnd="16dp" android:src="@drawable/expand_menu_error" android:clickable="false" android:focusable="false" android:scaleType="centerCrop"/> </LinearLayout> </LinearLayout> <LinearLayout Loading libs/WindowManager/Shell/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -316,6 +316,8 @@ <string name="change_aspect_ratio_text">Change aspect ratio</string> <!-- Accessibility text for the handle menu restart button [CHAR LIMIT=NONE] --> <string name="handle_menu_restart_text">Optimize View</string> <!-- Accessibility text for the handle menu error icon [CHAR LIMIT=NONE] --> <string name="handle_menu_error_icon_text">Error Icon</string> <!-- Accessibility text for the handle menu close button [CHAR LIMIT=NONE] --> <string name="close_text">Close</string> <!-- Accessibility text for the handle menu close menu button [CHAR LIMIT=NONE] --> Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt +9 −1 Original line number Diff line number Diff line Loading @@ -573,7 +573,10 @@ class HandleMenu( .requireViewById<HandleMenuActionButton>(R.id.manage_windows_button) private val changeAspectRatioBtn = moreActionsPill .requireViewById<HandleMenuActionButton>(R.id.change_aspect_ratio_button) private val restartBtn = moreActionsPill // Restart Pill. private val restartPill = rootView.requireViewById<View>(R.id.handle_menu_restart_pill) private val restartBtn = restartPill .requireViewById<HandleMenuActionButton>(R.id.handle_menu_restart_button) // Open in Browser/App Pill. Loading Loading @@ -900,6 +903,11 @@ class HandleMenu( drawableInsets = DrawableInsets()) } } // The restart button is nested to show an error icon on the right. Update the // visibility of the parent view properly. restartPill.apply { isGone = !shouldShowRestartButton } } private fun bindOpenInAppOrBrowserPill(style: MenuStyle) { Loading Loading
libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml +27 −6 Original line number Diff line number Diff line Loading @@ -164,12 +164,33 @@ android:src="@drawable/desktop_mode_ic_handle_menu_change_aspect_ratio" style="@style/DesktopModeHandleMenuActionButton"/> <LinearLayout android:id="@+id/handle_menu_restart_pill" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <com.android.wm.shell.windowdecor.HandleMenuActionButton android:id="@+id/handle_menu_restart_button" android:contentDescription="@string/handle_menu_restart_text" android:text="@string/handle_menu_restart_text" android:src="@drawable/desktop_mode_ic_handle_menu_restart" style="@style/DesktopModeHandleMenuActionButton"/> style="@style/DesktopModeHandleMenuActionButton" android:layout_width="0dp" android:layout_weight="1"/> <ImageView android:id="@+id/restart_menu_error_icon" android:contentDescription="@string/handle_menu_error_icon_text" android:layout_gravity="end|center_vertical" android:layout_width="20dp" android:layout_height="20dp" android:layout_marginEnd="16dp" android:src="@drawable/expand_menu_error" android:clickable="false" android:focusable="false" android:scaleType="centerCrop"/> </LinearLayout> </LinearLayout> <LinearLayout Loading
libs/WindowManager/Shell/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -316,6 +316,8 @@ <string name="change_aspect_ratio_text">Change aspect ratio</string> <!-- Accessibility text for the handle menu restart button [CHAR LIMIT=NONE] --> <string name="handle_menu_restart_text">Optimize View</string> <!-- Accessibility text for the handle menu error icon [CHAR LIMIT=NONE] --> <string name="handle_menu_error_icon_text">Error Icon</string> <!-- Accessibility text for the handle menu close button [CHAR LIMIT=NONE] --> <string name="close_text">Close</string> <!-- Accessibility text for the handle menu close menu button [CHAR LIMIT=NONE] --> Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt +9 −1 Original line number Diff line number Diff line Loading @@ -573,7 +573,10 @@ class HandleMenu( .requireViewById<HandleMenuActionButton>(R.id.manage_windows_button) private val changeAspectRatioBtn = moreActionsPill .requireViewById<HandleMenuActionButton>(R.id.change_aspect_ratio_button) private val restartBtn = moreActionsPill // Restart Pill. private val restartPill = rootView.requireViewById<View>(R.id.handle_menu_restart_pill) private val restartBtn = restartPill .requireViewById<HandleMenuActionButton>(R.id.handle_menu_restart_button) // Open in Browser/App Pill. Loading Loading @@ -900,6 +903,11 @@ class HandleMenu( drawableInsets = DrawableInsets()) } } // The restart button is nested to show an error icon on the right. Update the // visibility of the parent view properly. restartPill.apply { isGone = !shouldShowRestartButton } } private fun bindOpenInAppOrBrowserPill(style: MenuStyle) { Loading