Chromium Code Reviews| Index: ui/android/java/res/layout/dropdown_item_left_icon.xml |
| diff --git a/ui/android/java/res/layout/dropdown_item_left_icon.xml b/ui/android/java/res/layout/dropdown_item_left_icon.xml |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..224d878c34ec350db386b44c190aabeacdeab1c7 |
| --- /dev/null |
| +++ b/ui/android/java/res/layout/dropdown_item_left_icon.xml |
| @@ -0,0 +1,58 @@ |
| +<?xml version="1.0" encoding="utf-8"?> |
| +<!-- Copyright 2016 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" |
| + android:layout_width="match_parent" |
| + android:layout_height="wrap_content" |
| + android:gravity="center_vertical" |
| + android:orientation="horizontal" > |
| + |
| + <!-- These layout params are overwritten in DropdownAdapter.java --> |
| + |
| + <ImageView |
|
Ted C
2016/11/28 18:29:11
instead of creating a different xml file, just add
lshang
2016/11/30 10:35:43
That's a good idea! Done!
|
| + android:id="@+id/dropdown_icon" |
| + android:layout_width="wrap_content" |
| + android:layout_height="wrap_content" |
| + android:layout_margin="8dp" |
| + android:contentDescription="@null" /> |
| + |
| + <LinearLayout |
| + android:id="@+id/dropdown_label_wrapper" |
| + android:layout_width="0dp" |
| + android:layout_height="0dp" |
| + android:layout_weight="1" |
| + android:gravity="center_vertical" |
| + android:orientation="vertical" > |
| + |
| + <TextView |
| + android:id="@+id/dropdown_label" |
| + android:layout_width="wrap_content" |
| + android:layout_height="wrap_content" |
| + android:layout_marginEnd="@dimen/dropdown_item_label_margin" |
| + android:layout_marginStart="@dimen/dropdown_item_label_margin" |
| + android:ellipsize="end" |
| + android:includeFontPadding="false" |
| + android:singleLine="true" |
| + android:textAlignment="viewStart" |
| + android:textColor="@drawable/dropdown_label_color" |
| + android:textSize="@dimen/dropdown_item_label_font_size" /> |
| + |
| + <TextView |
| + android:id="@+id/dropdown_sublabel" |
| + android:layout_width="wrap_content" |
| + android:layout_height="wrap_content" |
| + android:layout_marginEnd="@dimen/dropdown_item_sublabel_margin" |
| + android:layout_marginStart="@dimen/dropdown_item_sublabel_margin" |
| + android:ellipsize="end" |
| + android:includeFontPadding="false" |
| + android:singleLine="true" |
| + android:textAlignment="viewStart" |
| + android:textColor="#646464" |
| + android:textSize="14sp" /> |
| + </LinearLayout> |
| + |
| +</LinearLayout> |