Commit edd8d786 authored by Robbie McElrath's avatar Robbie McElrath Committed by Commit Bot

[WebLayer] Move shell browser controls options to a separate menu

This CL moves the 3 menu items related to browser controls into their
own menu in the top left. A followup CL will be adding the ability to
toggle the top view, which would hide the menu with the checkbox used
to turn it back on. By creating this new menu, we'll always have the
ability to get the top controls back if they're hidden.

Bug: 1109035
Change-Id: I5def9c5d87afda38a258c7a2c730f32e1f6b941a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2330614Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#793695}
parent ce66a792
......@@ -21,8 +21,10 @@ android_assets("weblayer_shell_assets") {
android_resources("weblayer_shell_resources") {
sources = [
"shell_apk/res/layout/bottom_controls.xml",
"shell_apk/res/layout/main.xml",
"shell_apk/res/layout/shell_browser_controls.xml",
"shell_apk/res/menu/app_menu.xml",
"shell_apk/res/menu/controls_menu.xml",
"shell_apk/res/values/strings.xml",
"shell_apk/res/values/styles.xml",
]
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageButton
android:id="@+id/controls_menu_button"
android:layout_width="25dp"
android:layout_height="25dp"
android:scaleType="fitXY"
android:paddingLeft="5px"
android:paddingRight="5px"
android:src="@android:drawable/ic_menu_more"
android:background="@android:color/transparent" />
<TextView
android:id="@+id/version_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/controls_menu_button"
android:paddingTop="5px" />
<FrameLayout
android:id="@+id/weblayer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/controls_menu_button" />
</RelativeLayout>
......@@ -39,7 +39,7 @@
</ViewSwitcher>
<ImageButton
android:id="@+id/menu_button"
android:id="@+id/app_menu_button"
android:src="@android:drawable/ic_menu_more"
android:background="@android:color/transparent"
android:layout_width="25dp"
......
......@@ -12,19 +12,6 @@
android:title="Find in page" />
<item android:id="@+id/find_end_menu_id"
android:title="Clear find in page" />
<item android:id="@+id/toggle_bottom_view_id"
android:checkable="true"
android:title="Bottom view" />
<item android:title="Scrolling">
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/toggle_top_view_min_height_id"
android:checkable="true"
android:title="Set top view min height" />
<item android:id="@+id/toggle_top_view_pinned_to_top_id"
android:checkable="true"
android:title="Pin top view to content top" />
</menu>
</item>
<item android:id="@+id/site_settings_menu_id"
android:title="Site Settings" />
<item android:id="@+id/translate_menu_id"
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="HardcodedText">
<item android:id="@+id/toggle_bottom_view_id"
android:checkable="true"
android:title="Bottom view" />
<item android:id="@+id/toggle_top_view_min_height_id"
android:checkable="true"
android:title="Set top view min height" />
<item android:id="@+id/toggle_top_view_pinned_to_top_id"
android:checkable="true"
android:title="Pin top view to content top" />
</menu>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment