From eee8941e52042ff8a9be1b20f91c8c5045aa3b83 Mon Sep 17 00:00:00 2001 From: Seigo Nonaka Date: Fri, 29 Jan 2016 15:45:36 +0900 Subject: [PATCH] Introduce dimension of text edit related floating window. This is a follow up CL of I5a9bcbe29400d6193eb0532a5e711a78a12383cd. Floating toolbar and suggestion window has a same elevation and layout_margin. Introduce dimension value for elevation and layout_margin and refer them. Bug: 15347319 Change-Id: I6c635398241b60415437707285faeac76a1a4b6d --- core/res/res/layout/floating_popup_container.xml | 4 ++-- core/res/res/layout/text_edit_suggestion_container.xml | 4 ++-- .../res/layout/text_edit_suggestion_container_material.xml | 4 ++-- core/res/res/values/dimens_material.xml | 3 +++ 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/core/res/res/layout/floating_popup_container.xml b/core/res/res/layout/floating_popup_container.xml index dd161e38486ed..ca0373773577c 100644 --- a/core/res/res/layout/floating_popup_container.xml +++ b/core/res/res/layout/floating_popup_container.xml @@ -19,8 +19,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="0dp" - android:layout_margin="20dp" - android:elevation="2dp" + android:layout_margin="@android:dimen/text_edit_floating_toolbar_margin" + android:elevation="@android:dimen/text_edit_floating_toolbar_elevation" android:focusable="true" android:focusableInTouchMode="true" android:background="?attr/floatingToolbarPopupBackgroundDrawable"/> diff --git a/core/res/res/layout/text_edit_suggestion_container.xml b/core/res/res/layout/text_edit_suggestion_container.xml index 17e93d0a9eae7..b2589da8ea5b8 100644 --- a/core/res/res/layout/text_edit_suggestion_container.xml +++ b/core/res/res/layout/text_edit_suggestion_container.xml @@ -22,8 +22,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" - android:elevation="2dp" - android:layout_margin="20dp" + android:elevation="@android:dimen/text_edit_floating_toolbar_elevation" + android:layout_margin="@android:dimen/text_edit_floating_toolbar_margin" android:background="@drawable/text_edit_suggestions_window" android:dropDownSelector="@drawable/list_selector_background" android:divider="@null"> diff --git a/core/res/res/layout/text_edit_suggestion_container_material.xml b/core/res/res/layout/text_edit_suggestion_container_material.xml index 78268036c8278..20a80489239d9 100644 --- a/core/res/res/layout/text_edit_suggestion_container_material.xml +++ b/core/res/res/layout/text_edit_suggestion_container_material.xml @@ -24,8 +24,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?android:attr/floatingToolbarPopupBackgroundDrawable" - android:elevation="2dp" - android:layout_margin="20dp" + android:elevation="@android:dimen/text_edit_floating_toolbar_elevation" + android:layout_margin="@android:dimen/text_edit_floating_toolbar_margin" android:orientation="vertical" android:divider="?android:attr/listDivider" android:showDividers="middle"> diff --git a/core/res/res/values/dimens_material.xml b/core/res/res/values/dimens_material.xml index 96a81d1384576..2fe4f6652a875 100644 --- a/core/res/res/values/dimens_material.xml +++ b/core/res/res/values/dimens_material.xml @@ -82,6 +82,9 @@ 18sp 14sp + 2dp + 20dp + 16dp 16dp 8dp