Merge "Add content description to suggestion card close button."
This commit is contained in:
committed by
Android (Google) Code Review
commit
44935e8602
@@ -52,6 +52,7 @@
|
|||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
|
android:contentDescription="@string/dlg_close"
|
||||||
android:src="@drawable/ic_suggestion_close_button"/>
|
android:src="@drawable/ic_suggestion_close_button"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
|
android:contentDescription="@string/dlg_close"
|
||||||
android:src="@drawable/ic_suggestion_close_button"/>
|
android:src="@drawable/ic_suggestion_close_button"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -294,6 +294,19 @@ public class SuggestionAdapterTest {
|
|||||||
verify(drawable).setTint(colorAccent);
|
verify(drawable).setTint(colorAccent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void onBindViewHolder_closeButtonShouldHaveContentDescription()
|
||||||
|
throws PendingIntent.CanceledException {
|
||||||
|
final List<Suggestion> suggestions = makeSuggestions("pkg1");
|
||||||
|
setupSuggestions(mActivity, suggestions);
|
||||||
|
|
||||||
|
mSuggestionAdapter.onBindViewHolder(mSuggestionHolder, 0);
|
||||||
|
|
||||||
|
assertThat(
|
||||||
|
mSuggestionHolder.itemView.findViewById(R.id.close_button).getContentDescription())
|
||||||
|
.isNotNull();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void setCardLayout_oneCard_shouldSetCardWidthToMatchParent() {
|
public void setCardLayout_oneCard_shouldSetCardWidthToMatchParent() {
|
||||||
final List<Suggestion> suggestions = makeSuggestions("pkg1");
|
final List<Suggestion> suggestions = makeSuggestions("pkg1");
|
||||||
|
|||||||
Reference in New Issue
Block a user