Skip to content

Commit 4eb37f8

Browse files
adampAndroid (Google) Code Review
authored andcommitted
Merge "Bug 5214224 - List item metrics"
2 parents 858c396 + 7c8375d commit 4eb37f8

14 files changed

+52
-33
lines changed

api/current.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,8 @@ package android {
644644
field public static final int listPreferredItemHeight = 16842829; // 0x101004d
645645
field public static final int listPreferredItemHeightLarge = 16843668; // 0x1010394
646646
field public static final int listPreferredItemHeightSmall = 16843669; // 0x1010395
647+
field public static final int listPreferredItemPaddingLeft = 16843697; // 0x10103b1
648+
field public static final int listPreferredItemPaddingRight = 16843698; // 0x10103b2
647649
field public static final int listSelector = 16843003; // 0x10100fb
648650
field public static final int listSeparatorTextViewStyle = 16843272; // 0x1010208
649651
field public static final int listViewStyle = 16842868; // 0x1010074

core/res/res/layout/activity_list_item.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
android:layout_width="wrap_content"
3434
android:layout_height="wrap_content"
3535
android:layout_gravity="center_horizontal"
36-
android:paddingLeft="6dip" />
36+
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft" />
3737
</LinearLayout>
3838

core/res/res/layout/activity_list_item_2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
android:layout_width="match_parent"
1919
android:layout_height="wrap_content"
2020
android:minHeight="?android:attr/listPreferredItemHeight"
21-
android:textAppearance="?android:attr/textAppearanceMedium"
21+
android:textAppearance="?android:attr/textAppearanceListItemSmall"
2222
android:gravity="center_vertical"
2323
android:drawablePadding="14dip"
2424
android:paddingLeft="16dip"

core/res/res/layout/resolve_list_item.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
android:minHeight="?android:attr/listPreferredItemHeight"
2424
android:layout_height="wrap_content"
2525
android:layout_width="match_parent"
26-
android:paddingLeft="10dip"
27-
android:paddingRight="15dip">
26+
android:paddingLeft="16dip"
27+
android:paddingRight="16dip">
2828

2929
<!-- Activity icon when presenting dialog -->
3030
<ImageView android:id="@+id/icon"
@@ -39,18 +39,18 @@
3939
android:layout_height="wrap_content" >
4040
<!-- Activity name -->
4141
<TextView android:id="@android:id/text1"
42-
android:textAppearance="?android:attr/textAppearanceLarge"
42+
android:textAppearance="?android:attr/textAppearanceListItemSmall"
4343
android:layout_width="wrap_content"
4444
android:layout_height="wrap_content"
4545
android:maxLines="2"
46-
android:paddingLeft="10dip" />
46+
android:paddingLeft="16dip" />
4747
<!-- Extended activity info to distinguish between duplicate activity names -->
4848
<TextView android:id="@android:id/text2"
49-
android:textAppearance="?android:attr/textAppearanceMedium"
49+
android:textAppearance="?android:attr/textAppearanceSmall"
5050
android:layout_width="wrap_content"
5151
android:layout_height="wrap_content"
5252
android:maxLines="2"
53-
android:paddingLeft="10dip" />
53+
android:paddingLeft="16dip" />
5454
</LinearLayout>
5555
</LinearLayout>
5656

core/res/res/layout/simple_list_item_1.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
android:id="@android:id/text1"
1919
android:layout_width="match_parent"
2020
android:layout_height="wrap_content"
21-
android:textAppearance="?android:attr/textAppearanceListItem"
21+
android:textAppearance="?android:attr/textAppearanceListItemSmall"
2222
android:gravity="center_vertical"
23-
android:paddingLeft="8dip"
24-
android:paddingRight="8dip"
25-
android:minHeight="?android:attr/listPreferredItemHeight"
23+
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
24+
android:paddingRight="?android:attr/listPreferredItemPaddingRight"
25+
android:minHeight="?android:attr/listPreferredItemHeightSmall"
2626
/>

core/res/res/layout/simple_list_item_2.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@
2424
<TextView android:id="@android:id/text1"
2525
android:layout_width="match_parent"
2626
android:layout_height="wrap_content"
27-
android:layout_marginLeft="8dip"
28-
android:layout_marginTop="8dip"
27+
android:layout_marginLeft="?android:attr/listPreferredItemPaddingLeft"
28+
android:layout_marginTop="8dip"
2929
android:textAppearance="?android:attr/textAppearanceListItem"
3030
/>
3131

3232
<TextView android:id="@android:id/text2"
3333
android:layout_width="match_parent"
3434
android:layout_height="wrap_content"
3535
android:layout_below="@android:id/text1"
36-
android:layout_alignLeft="@android:id/text1"
36+
android:layout_alignLeft="@android:id/text1"
3737
android:textAppearance="?android:attr/textAppearanceSmall"
3838
/>
3939

core/res/res/layout/simple_list_item_activated_1.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
android:id="@android:id/text1"
1919
android:layout_width="match_parent"
2020
android:layout_height="wrap_content"
21-
android:textAppearance="?android:attr/textAppearanceListItem"
21+
android:textAppearance="?android:attr/textAppearanceListItemSmall"
2222
android:gravity="center_vertical"
23+
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
24+
android:paddingRight="?android:attr/listPreferredItemPaddingRight"
2325
android:background="?android:attr/activatedBackgroundIndicator"
24-
android:minHeight="?android:attr/listPreferredItemHeight"
26+
android:minHeight="?android:attr/listPreferredItemHeightSmall"
2527
/>

core/res/res/layout/simple_list_item_activated_2.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
<TextView android:id="@android:id/text1"
2828
android:layout_width="match_parent"
2929
android:layout_height="wrap_content"
30-
android:layout_marginLeft="8dip"
31-
android:layout_marginTop="8dip"
32-
android:textAppearance="?android:attr/textAppearanceLarge"
30+
android:layout_marginLeft="?android:attr/listPreferredItemPaddingLeft"
31+
android:layout_marginTop="6dip"
32+
android:textAppearance="?android:attr/textAppearanceListItem"
3333
/>
3434

3535
<TextView android:id="@android:id/text2"

core/res/res/layout/simple_list_item_checked.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
1818
android:id="@android:id/text1"
1919
android:layout_width="match_parent"
20-
android:layout_height="?android:attr/listPreferredItemHeight"
21-
android:textAppearance="?android:attr/textAppearanceListItem"
20+
android:layout_height="?android:attr/listPreferredItemHeightSmall"
21+
android:textAppearance="?android:attr/textAppearanceListItemSmall"
2222
android:gravity="center_vertical"
2323
android:checkMark="?android:attr/textCheckMark"
24-
android:paddingLeft="8dip"
25-
android:paddingRight="8dip"
24+
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
25+
android:paddingRight="?android:attr/listPreferredItemPaddingRight"
2626
/>

core/res/res/layout/simple_list_item_single_choice.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
1818
android:id="@android:id/text1"
1919
android:layout_width="match_parent"
20-
android:layout_height="?android:attr/listPreferredItemHeight"
21-
android:textAppearance="?android:attr/textAppearanceListItem"
20+
android:layout_height="?android:attr/listPreferredItemHeightSmall"
21+
android:textAppearance="?android:attr/textAppearanceListItemSmall"
2222
android:gravity="center_vertical"
2323
android:checkMark="?android:attr/listChoiceIndicatorSingle"
24-
android:paddingLeft="8dip"
25-
android:paddingRight="8dip"
24+
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
25+
android:paddingRight="?android:attr/listPreferredItemPaddingRight"
2626
/>

0 commit comments

Comments
 (0)