1 <?xml version="1.0" encoding="utf-8"?>
3 <!-- Copyright 2015 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
8 <!-- Overall layout and amount of padding is based on specs for
9 "Single-line item (icon with text)" from:
10 https://www.google.com/design/spec/components/lists.html#lists-specs.
13 - Left edge of the image is 16dp from the left edge of the screen
14 - Right edge of the text is 16dp from the right edge of the screen
15 - The height of the list item is 48dp
16 - Vertical text padding: top = 16dp, bottom = 20dp
18 TODO(lukasza): Temporary UI spec violation: The left edge of the text is
19 not exactly 72dp from the left edge of the screen. Instead of 72dp we
20 currently have 16dp (start padding) + 16dp (drawable padding) + *original*
21 image (aka drawable) width. Overriding image width to be exactly 40dp
22 would achieve 72dp text distance from screen edge, but scaling the image
26 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
27 android:drawablePadding="16dp"
28 android:drawableStart="@drawable/ic_host_online"
29 android:gravity="start|center_vertical"
30 android:id="@+id/host_label"
31 android:minHeight="48dp"
32 android:paddingStart="16dp"
33 android:paddingEnd="16dp"
34 android:paddingTop="16dp"
35 android:paddingBottom="20dp"
36 android:textColor="?android:attr/textColorPrimary"
37 style="?android:attr/textAppearanceMedium"/>