Merge "Remove deprecated locales"
diff --git a/res/layout/quickcontact_content.xml b/res/layout/quickcontact_content.xml
index e98e599..bab8b6d 100644
--- a/res/layout/quickcontact_content.xml
+++ b/res/layout/quickcontact_content.xml
@@ -25,7 +25,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:id="@+id/card_container">
+ android:id="@+id/card_container"
+ android:paddingTop="@dimen/first_card_marginTop"
+ android:background="@color/card_margin_color" >
<!-- We cannot set the border directly on ExpandingEntryCardView without it looking
funny because of the card's elevation value. So we need a parent FrameLayout -->
@@ -36,7 +38,6 @@
<com.android.contacts.quickcontact.ExpandingEntryCardView
style="@style/ExpandingEntryCardStyle"
android:id="@+id/no_contact_data_card"
- android:layout_marginTop="@dimen/communication_card_marginTop"
android:visibility="gone" />
</FrameLayout>
@@ -47,7 +48,6 @@
<com.android.contacts.quickcontact.ExpandingEntryCardView
style="@style/ExpandingEntryCardStyle"
android:id="@+id/communication_card"
- android:layout_marginTop="@dimen/communication_card_marginTop"
android:visibility="gone" />
</FrameLayout>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 877a68f..40adc95 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -152,7 +152,7 @@
<dimen name="expanding_entry_card_border_width">12dp</dimen>
<!-- Top margin for the communication card, used to add space from header. -->
- <dimen name="communication_card_marginTop">12dp</dimen>
+ <dimen name="first_card_marginTop">12dp</dimen>
<!-- Elevation of an ExpandingEntryCard, for the sake of shadow casting -->
<dimen name="expanding_entry_card_elevation">1dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index b5e6997..9583fcb 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -96,6 +96,11 @@
<!-- Menu item used to remove a star from a contact, making the contact no longer show up at the top of favorites -->
<string name="menu_removeStar">Remove from favorites</string>
+ <!-- Description of what happens when you click on the unstar MenuItem. [CHAR LIMIT=NONE] -->
+ <string name="description_action_menu_remove_star">Removed from favorites</string>
+ <!-- Description of what happens when you click on the star MenuItem. [CHAR LIMIT=NONE] -->
+ <string name="description_action_menu_add_star">Added to favorites</string>
+
<!-- Menu item used to edit a specific contact -->
<string name="menu_editContact">Edit</string>
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index 0dab2cf..cbfa7cc 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -26,7 +26,6 @@
import android.app.LoaderManager.LoaderCallbacks;
import android.app.SearchManager;
import android.content.ActivityNotFoundException;
-import android.content.ComponentName;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Intent;
@@ -1560,6 +1559,13 @@
final Intent intent = ContactSaveService.createSetStarredIntent(
QuickContactActivity.this, mLookupUri, !isStarred);
startService(intent);
+
+ final CharSequence accessibilityText = !isStarred
+ ? getResources().getText(R.string.description_action_menu_add_star)
+ : getResources().getText(R.string.description_action_menu_remove_star);
+ // Accessibility actions need to have an associated view. We can't access the MenuItem's
+ // underlying view, so put this accessibility action on the root view.
+ mScroller.announceForAccessibility(accessibilityText);
}
}