Fix misc font sizes and spacing issues
- Make contact name and status more closely spaced together
(vertically), which also helps the status to still be visible
in the extra large font accessibility case
- Use our own version of the select_dialog_item.xml so that
long dialog items (i.e. "Select photo from Gallery")
do not get cut-off on the phone (Framework can't change
the font size in their XML because it's public API)
Bug: 5255619
Change-Id: Ica6ba908b0cb143550e9cf7391524449008b20cb
diff --git a/res/layout/contact_tile_starred.xml b/res/layout/contact_tile_starred.xml
index 3f8d91d..011dc15 100644
--- a/res/layout/contact_tile_starred.xml
+++ b/res/layout/contact_tile_starred.xml
@@ -63,6 +63,7 @@
android:paddingBottom="4dip"
android:fadingEdge="horizontal"
android:fadingEdgeLength="3dip"
+ android:layout_marginTop="-3dip"
android:ellipsize="marquee" />
</LinearLayout>
diff --git a/res/layout/contact_tile_starred_quick_contact.xml b/res/layout/contact_tile_starred_quick_contact.xml
index 3f072d1..c3015b1 100644
--- a/res/layout/contact_tile_starred_quick_contact.xml
+++ b/res/layout/contact_tile_starred_quick_contact.xml
@@ -61,6 +61,7 @@
android:drawablePadding="4dip"
android:fadingEdge="horizontal"
android:fadingEdgeLength="3dip"
+ android:layout_marginTop="-3dip"
android:ellipsize="marquee" />
</LinearLayout>
diff --git a/res/layout/select_dialog_item.xml b/res/layout/select_dialog_item.xml
new file mode 100644
index 0000000..ea671dd
--- /dev/null
+++ b/res/layout/select_dialog_item.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+ List item in the pop-up window that appears when tapping a contact's photo
+ in the contact editor. This is similar to the framework's select_dialog_item.xml layout
+ except the text appearance is medium.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@android:id/text1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="48dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="?android:attr/textColorAlertDialogListItem"
+ android:gravity="center_vertical"
+ android:paddingLeft="14dip"
+ android:paddingRight="15dip"
+ android:ellipsize="marquee"
+/>
diff --git a/src/com/android/contacts/editor/PhotoActionPopup.java b/src/com/android/contacts/editor/PhotoActionPopup.java
index ac2d64f..cca6f9d 100644
--- a/src/com/android/contacts/editor/PhotoActionPopup.java
+++ b/src/com/android/contacts/editor/PhotoActionPopup.java
@@ -69,7 +69,7 @@
context.getString(resId)));
}
final ListAdapter adapter = new ArrayAdapter<ChoiceListItem>(context,
- android.R.layout.select_dialog_item, choices);
+ R.layout.select_dialog_item, choices);
final ListPopupWindow listPopupWindow = new ListPopupWindow(context);
final OnItemClickListener clickListener = new OnItemClickListener() {