Commit 748df134 authored by Friedrich Horschig's avatar Friedrich Horschig Committed by Commit Bot

[Android] Fix duplicate id and apply accessory design

This CL replaces the duplicated @+id/keyboard_accessory used for the
bottom sheet with @+id/keyboard_accessory_sheet.

Furthermore, it adds some spacing, colors and dimensions that bring the
whole appearance of the keyboard accessory and its bottom sheet closer
to the intended outcome.

Bug: 828832, 811747
Change-Id: I7e949b8e0f3f5825344f672a933e7b3e6bcd685a
Reviewed-on: https://chromium-review.googlesource.com/1090921Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Friedrich Horschig <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567183}
parent c8375fab
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2015 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. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="#DDD"/>
</shape>
</item>
<item android:top="1dp">
<shape>
<solid android:color="#FFF"/>
</shape>
</item>
</layer-list>
......@@ -5,9 +5,10 @@
<org.chromium.chrome.browser.autofill.keyboard_accessory.KeyboardAccessoryView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/keyboard_accessory"
android:layout_gravity="start|bottom"
android:background="@drawable/keyboard_accessory_background"
android:background="@color/modern_light_grey"
android:contentDescription="@string/autofill_keyboard_accessory_content_description"
android:fillViewport="true"
android:scrollbars="none"
......@@ -20,6 +21,7 @@
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
app:tabIndicatorHeight="0dp"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
......
......@@ -5,9 +5,11 @@
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@drawable/keyboard_accessory_background"
android:id="@+id/keyboard_accessory_sheet"
android:background="@android:color/white"
android:fillViewport="true"
android:layout_gravity="start|bottom"
android:paddingTop="@dimen/keyboard_accessory_height"
android:layout_gravity="start|top"
android:layout_height="@dimen/keyboard_accessory_sheet_height"
android:layout_width="match_parent"
android:visibility="gone"/>
\ No newline at end of file
......@@ -33,10 +33,10 @@
android:layout="@layout/keyboard_accessory"
android:layout_height="@dimen/keyboard_accessory_height"
android:layout_width="match_parent"
android:layout_gravity="start|bottom"/>
android:layout_gravity="start|top"/>
<ViewStub
android:id="@+id/keyboard_accessory_sheet_stub"
android:inflatedId="@+id/keyboard_accessory"
android:inflatedId="@+id/keyboard_accessory_sheet"
android:layout="@layout/keyboard_accessory_sheet"
android:layout_height="@dimen/keyboard_accessory_sheet_height"
android:layout_width="match_parent"
......
......@@ -5,7 +5,6 @@
<android.support.v7.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@drawable/keyboard_accessory_background"
android:fillViewport="true"
android:layout_height="match_parent"
android:layout_width="match_parent"/>
\ No newline at end of file
......@@ -5,7 +5,11 @@
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/google_grey_300"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:fillViewport="true"
android:layout_height="wrap_content"
android:layout_height="48dp"
android:textAppearance="@style/BlackHint1"
android:layout_width="match_parent"/>
\ No newline at end of file
......@@ -5,7 +5,11 @@
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@drawable/keyboard_accessory_background"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="52dp"
android:paddingEnd="16dp"
android:fillViewport="true"
android:layout_height="wrap_content"
android:layout_height="48dp"
android:textAppearance="@style/BlackTitle1"
android:layout_width="match_parent"/>
\ No newline at end of file
......@@ -123,12 +123,12 @@
<dimen name="overlay_panel_bar_height">56dp</dimen>
<!-- Autofill keyboard accessory dimensions -->
<dimen name="keyboard_accessory_action_height">28dp</dimen>
<dimen name="keyboard_accessory_half_padding">2dp</dimen>
<dimen name="keyboard_accessory_height">36dp</dimen>
<dimen name="keyboard_accessory_padding">4dp</dimen>
<dimen name="keyboard_accessory_sheet_height">200dp</dimen>
<dimen name="keyboard_accessory_text_size">6sp</dimen>
<dimen name="keyboard_accessory_action_height">36dp</dimen>
<dimen name="keyboard_accessory_half_padding">6dp</dimen>
<dimen name="keyboard_accessory_height">48dp</dimen>
<dimen name="keyboard_accessory_padding">6dp</dimen>
<dimen name="keyboard_accessory_sheet_height">330dp</dimen>
<dimen name="keyboard_accessory_text_size">14sp</dimen>
<!-- Password generation popup dimensions -->
<dimen name="password_generation_divider_height">1dp</dimen>
......
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