Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44935e86 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add content description to suggestion card close button."

parents b5e283f6 98a6b742
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@
                android:layout_alignParentEnd="true"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="8dp"
                android:contentDescription="@string/dlg_close"
                android:src="@drawable/ic_suggestion_close_button"/>

        </RelativeLayout>
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@
                android:layout_alignParentEnd="true"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="8dp"
                android:contentDescription="@string/dlg_close"
                android:src="@drawable/ic_suggestion_close_button"/>

        </RelativeLayout>
+13 −0
Original line number Diff line number Diff line
@@ -294,6 +294,19 @@ public class SuggestionAdapterTest {
        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
    public void setCardLayout_oneCard_shouldSetCardWidthToMatchParent() {
        final List<Suggestion> suggestions = makeSuggestions("pkg1");