diff options
Diffstat (limited to 'chromium/weblayer/browser/java/res/layout')
6 files changed, 146 insertions, 5 deletions
diff --git a/chromium/weblayer/browser/java/res/layout/site_settings_layout.xml b/chromium/weblayer/browser/java/res/layout/site_settings_layout.xml index 7bb3c0b82f1..c9cf58e79f1 100644 --- a/chromium/weblayer/browser/java/res/layout/site_settings_layout.xml +++ b/chromium/weblayer/browser/java/res/layout/site_settings_layout.xml @@ -3,9 +3,14 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> -<FrameLayout +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent" - android:id="@+id/site_settings_container"> -</FrameLayout> + android:layout_height="match_parent"> + <FrameLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/site_settings_container"> + </FrameLayout> + <include layout="@layout/settings_action_bar_shadow" /> +</RelativeLayout> diff --git a/chromium/weblayer/browser/java/res/layout/weblayer_infobar_translate_compact_content.xml b/chromium/weblayer/browser/java/res/layout/weblayer_infobar_translate_compact_content.xml new file mode 100644 index 00000000000..82149b5b142 --- /dev/null +++ b/chromium/weblayer/browser/java/res/layout/weblayer_infobar_translate_compact_content.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2017 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. --> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/weblayer_translate_infobar_content" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:orientation="horizontal"> + <!-- TODO(huayinz): Change app:tabIndicatorColor to some common color reference --> + <org.chromium.weblayer_private.TranslateTabLayout + android:id="@+id/weblayer_translate_infobar_tabs" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:requiresFadingEdge="horizontal" + android:fadingEdgeLength="@dimen/weblayer_infobar_translate_fade_edge_length" + app:tabIndicator="@drawable/weblayer_tab_indicator" + app:tabIndicatorFullWidth="false" + app:tabIndicatorHeight="3dp" + app:tabSelectedTextColor="@color/weblayer_tab_layout_selected_tab_color" + app:tabGravity="fill" + app:tabMode="scrollable" /> + + <org.chromium.ui.widget.ChromeImageButton + android:id="@+id/weblayer_translate_infobar_menu_button" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:minHeight="@dimen/min_touch_target_size" + android:minWidth="@dimen/min_touch_target_size" + android:scaleType="center" + android:background="?attr/selectableItemBackground" + android:contentDescription="@string/accessibility_toolbar_btn_menu" + android:src="@drawable/ic_more_vert_24dp" + app:tint="@color/default_icon_color_tint_list" /> +</LinearLayout> diff --git a/chromium/weblayer/browser/java/res/layout/weblayer_infobar_translate_tab_content.xml b/chromium/weblayer/browser/java/res/layout/weblayer_infobar_translate_tab_content.xml new file mode 100644 index 00000000000..3be8f467c43 --- /dev/null +++ b/chromium/weblayer/browser/java/res/layout/weblayer_infobar_translate_tab_content.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2017 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. --> + +<org.chromium.weblayer_private.TranslateTabContent + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/weblayer_translate_tabcontent" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + <!-- Add both the textView and progressBar to the tab, and only keep one of them visible. + This way the width of the Tab will always be fixed no matter which one is visible. --> + <TextView + android:id="@+id/weblayer_translate_infobar_tab_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:textAppearance="@style/TextAppearance.Design.Tab" + android:visibility="visible" + android:singleLine="true" /> + <ProgressBar + android:id="@+id/weblayer_translate_infobar_tab_progressbar" + android:layout_width="@dimen/infobar_small_icon_size" + android:layout_height="@dimen/infobar_small_icon_size" + android:layout_gravity="center" + android:indeterminate="true" + android:visibility="invisible" /> +</org.chromium.weblayer_private.TranslateTabContent> diff --git a/chromium/weblayer/browser/java/res/layout/weblayer_translate_menu_item.xml b/chromium/weblayer/browser/java/res/layout/weblayer_translate_menu_item.xml new file mode 100644 index 00000000000..a7948450da3 --- /dev/null +++ b/chromium/weblayer/browser/java/res/layout/weblayer_translate_menu_item.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2017 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. --> + +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + style="@style/WebLayerAppMenuItem" + android:layout_width="match_parent" + android:layout_height="wrap_content" > + + <TextView + android:id="@+id/weblayer_menu_item_text" + android:textAppearance="?android:attr/textAppearanceLargePopupMenu" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="start" + android:gravity="center_vertical" + android:paddingTop="13dp" + android:paddingBottom="13dp" /> + +</FrameLayout> diff --git a/chromium/weblayer/browser/java/res/layout/weblayer_translate_menu_item_checked.xml b/chromium/weblayer/browser/java/res/layout/weblayer_translate_menu_item_checked.xml new file mode 100644 index 00000000000..a4bd2cf4692 --- /dev/null +++ b/chromium/weblayer/browser/java/res/layout/weblayer_translate_menu_item_checked.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2017 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. --> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <LinearLayout + style="@style/WebLayerAppMenuItem" + android:layout_width="match_parent" + android:layout_height="wrap_content" > + + <TextView + android:id="@+id/weblayer_menu_item_text" + android:textAppearance="?android:attr/textAppearanceLargePopupMenu" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_gravity="start" + android:gravity="center_vertical" + android:paddingTop="13dp" + android:paddingBottom="13dp" + android:paddingEnd="16dp" /> + <org.chromium.ui.widget.ChromeImageView + android:id="@+id/weblayer_menu_item_icon" + android:src="@drawable/ic_check_googblue_24dp" + android:layout_width="24dp" + android:layout_height="match_parent" + android:layout_gravity="end" + android:gravity="center_vertical" + app:tint="@color/default_icon_color_tint_list" /> + + </LinearLayout> + + <View + android:id="@+id/weblayer_menu_item_divider" + android:layout_width="match_parent" + android:layout_height="1dp" + android:background="@color/divider_line_bg_color" + android:visibility="gone" /> + +</LinearLayout> + diff --git a/chromium/weblayer/browser/java/res/layout/weblayer_url_bar.xml b/chromium/weblayer/browser/java/res/layout/weblayer_url_bar.xml index 1e8828d7f25..e5f2b57b80e 100644 --- a/chromium/weblayer/browser/java/res/layout/weblayer_url_bar.xml +++ b/chromium/weblayer/browser/java/res/layout/weblayer_url_bar.xml @@ -24,7 +24,7 @@ android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center_vertical" - android:maxLines="1" + android:singleLine="true" android:paddingEnd="@dimen/url_text_edge_padding" android:paddingStart="@dimen/url_text_edge_padding" android:ellipsize="start" |