am 1b8a1836: am 0fdf2011: am a9cdf984: Merge "Move QC\'s title contentDescription into photo" into lmp-dev
* commit '1b8a18362c6c3ba6e6473705060954d57f246672':
Move QC's title contentDescription into photo
diff --git a/res/layout/quickcontact_header.xml b/res/layout/quickcontact_header.xml
index bb89dda..37672c7 100644
--- a/res/layout/quickcontact_header.xml
+++ b/res/layout/quickcontact_header.xml
@@ -27,8 +27,7 @@
android:id="@+id/photo_touch_intercept_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@drawable/item_background_material_dark"
- android:contentDescription="@string/description_contact_photo" />
+ android:background="@drawable/item_background_material_dark" />
<!-- Overlays/gradients that can be used to make white text/buttons visible -->
<View
diff --git a/res/layout/quickcontact_title.xml b/res/layout/quickcontact_title.xml
index 9b23a86..8bf48e3 100644
--- a/res/layout/quickcontact_title.xml
+++ b/res/layout/quickcontact_title.xml
@@ -14,6 +14,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
+<!-- The importantForAccessibility is set to "no" since we want the ViewGroup that pretends to be
+ this View's parent (contact photo overlay) to provide the content description for Talkback. -->
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
@@ -26,4 +29,5 @@
android:maxLines="@integer/quickcontact_title_lines"
android:textSize="@dimen/quickcontact_maximum_title_size"
android:ellipsize="end"
+ android:importantForAccessibility="no"
android:id="@+id/large_title"/>
\ No newline at end of file
diff --git a/src/com/android/contacts/widget/MultiShrinkScroller.java b/src/com/android/contacts/widget/MultiShrinkScroller.java
index 26b032b..5603437 100644
--- a/src/com/android/contacts/widget/MultiShrinkScroller.java
+++ b/src/com/android/contacts/widget/MultiShrinkScroller.java
@@ -350,6 +350,7 @@
public void setTitle(String title) {
mLargeTextView.setText(title);
+ mPhotoTouchInterceptOverlay.setContentDescription(title);
}
public void setUseGradient(boolean useGradient) {