Index: ui/android/java/res/layout/autofill_keyboard_accessory_item.xml |
diff --git a/ui/android/java/res/layout/autofill_keyboard_accessory_item.xml b/ui/android/java/res/layout/autofill_keyboard_accessory_item.xml |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c3dc183944bd19354f7a2a0a0d63fe4918ae999c |
--- /dev/null |
+++ b/ui/android/java/res/layout/autofill_keyboard_accessory_item.xml |
@@ -0,0 +1,62 @@ |
+<?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. --> |
+ |
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
aurimas (slooooooooow)
2015/07/28 00:10:28
Is this framelayout only needed for the margin?
please use gerrit instead
2015/07/28 21:07:46
Yes, this is the white 8dp margin all around the t
|
+ xmlns:tools="http://schemas.android.com/tools" |
+ android:layout_height="48dp" |
+ android:layout_width="wrap_content" |
+ android:orientation="vertical" |
+ android:paddingBottom="@dimen/keyboard_accessory_padding" |
+ android:paddingEnd="@dimen/keyboard_accessory_half_padding" |
+ android:paddingStart="@dimen/keyboard_accessory_half_padding" |
aurimas (slooooooooow)
2015/07/28 00:10:28
Why is half of the padding here and the other half
please use gerrit instead
2015/07/28 21:07:46
This is 4dp (half padding), so that the distance b
|
+ android:paddingTop="@dimen/keyboard_accessory_padding"> |
+ |
+ <LinearLayout |
+ android:background="@drawable/autofill_chip_shape" |
aurimas (slooooooooow)
2015/07/28 00:10:28
Can we rename the drawable to simply autofill_chip
please use gerrit instead
2015/07/28 21:07:46
Done.
|
+ android:layout_height="@dimen/keyboard_accessory_chip_height" |
+ android:layout_width="wrap_content" |
+ android:paddingEnd="@dimen/keyboard_accessory_half_padding" |
+ android:paddingStart="@dimen/keyboard_accessory_half_padding"> |
+ |
+ <ImageView android:id="@+id/autofill_keyboard_accessory_item_icon" |
+ android:gravity="center_vertical|center_horizontal" |
+ android:layout_height="match_parent" |
+ android:layout_width="wrap_content" |
+ android:minWidth="@dimen/keyboard_accessory_chip_height" |
+ android:visibility="gone" |
+ tools:ignore="ContentDescription" /> |
+ |
+ <TextView android:id="@+id/autofill_keyboard_accessory_item_name" |
+ android:requiresFadingEdge="horizontal" |
+ android:fadingEdgeLength="@dimen/keyboard_accessory_fading_edge_length" |
+ android:ellipsize="none" |
+ android:fontFamily="sans-serif-medium" |
aurimas (slooooooooow)
2015/07/28 00:10:28
This will not work for pre API v21. -medium was in
please use gerrit instead
2015/07/28 21:07:46
The font falls back to regular on pre-L devices. U
|
+ android:gravity="center_vertical|start" |
+ android:layout_height="match_parent" |
+ android:layout_width="wrap_content" |
+ android:paddingEnd="@dimen/keyboard_accessory_half_padding" |
+ android:paddingStart="@dimen/keyboard_accessory_half_padding" |
+ android:singleLine="true" |
+ android:textColor="#DE000000" |
aurimas (slooooooooow)
2015/07/28 00:10:28
Em, why do we need alpha for the text color? The b
please use gerrit instead
2015/07/28 21:07:46
Done.
|
+ android:textSize="@dimen/keyboard_accessory_text_size" |
+ android:visibility="gone" /> |
+ |
+ <TextView android:id="@+id/autofill_keyboard_accessory_item_label" |
+ android:requiresFadingEdge="horizontal" |
+ android:fadingEdgeLength="@dimen/keyboard_accessory_fading_edge_length" |
+ android:ellipsize="none" |
+ android:fontFamily="sans-serif-regular" |
aurimas (slooooooooow)
2015/07/28 00:10:28
No need to specify this, it is the default
please use gerrit instead
2015/07/28 21:07:46
Done.
|
+ android:gravity="center_vertical|start" |
+ android:layout_height="match_parent" |
+ android:layout_width="wrap_content" |
+ android:paddingEnd="@dimen/keyboard_accessory_half_padding" |
+ android:singleLine="true" |
+ android:textColor="#8C000000" |
+ android:textSize="@dimen/keyboard_accessory_text_size" |
+ android:visibility="gone" /> |
+ |
+ </LinearLayout> |
+ |
+</FrameLayout> |