Update Accessibility
Update the content descriptions on the ImageViews.
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
android:layout_width="@dimen/cover_size_huge"
|
||||
android:layout_height="@dimen/cover_size_huge"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:contentDescription="@{@string/description_album_cover(album.name)}"
|
||||
app:coverArt="@{album}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -84,7 +85,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:text="@{String.valueOf(album.year)}"
|
||||
android:text="@{album.year != 0 ? String.valueOf(album.year) : @string/placeholder_no_date}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_name"
|
||||
tools:text="2020" />
|
||||
@@ -111,7 +112,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:nestedScrollingEnabled="true"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
android:layout_width="@dimen/cover_size_huge"
|
||||
android:layout_height="@dimen/cover_size_huge"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:contentDescription="@{@string/description_artist_image(artist.name)}"
|
||||
app:artistImage="@{artist}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -110,7 +111,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:nestedScrollingEnabled="true"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
android:indeterminateTintMode="src_in"
|
||||
android:src="@drawable/ic_error"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/description_error"
|
||||
app:layout_constraintBottom_toTopOf="@+id/error_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/loading_bar"
|
||||
app:srcCompat="@drawable/ic_error"
|
||||
tools:ignore="ContentDescription" />
|
||||
app:srcCompat="@drawable/ic_error" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error_text"
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
android:id="@+id/cover"
|
||||
android:layout_width="@dimen/cover_size_normal"
|
||||
android:layout_height="@dimen/cover_size_normal"
|
||||
android:contentDescription="@{@string/description_album_cover(album.name)}"
|
||||
app:coverArt="@{album}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@drawable/ic_album" />
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -26,13 +26,12 @@
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:textSize="20sp"
|
||||
android:textSize="@dimen/track_number_text_size"
|
||||
android:maxLines="1"
|
||||
android:contentDescription="@{@string/description_track_number(song.track)}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@drawable/ic_song"
|
||||
tools:text="1" />
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -22,12 +22,11 @@
|
||||
android:id="@+id/artist_image"
|
||||
android:layout_width="@dimen/cover_size_normal"
|
||||
android:layout_height="@dimen/cover_size_normal"
|
||||
android:src="@drawable/ic_exit"
|
||||
android:contentDescription="@{@string/description_artist_image(artist.name)}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:artistImage="@{artist}"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@drawable/ic_artist" />
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
android:id="@+id/cover"
|
||||
android:layout_width="@dimen/cover_size_compact"
|
||||
android:layout_height="@dimen/cover_size_compact"
|
||||
android:contentDescription="@{@string/description_album_cover(song.name)}"
|
||||
app:coverArt="@{song}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<dimen name="cover_size_huge">230dp</dimen>
|
||||
|
||||
<dimen name="track_number_size">32dp</dimen>
|
||||
<dimen name="track_number_text_size">20sp</dimen>
|
||||
|
||||
<dimen name="detail_header_size_max">26sp</dimen>
|
||||
<dimen name="detail_header_size_min">10sp</dimen>'
|
||||
|
||||
@@ -14,9 +14,15 @@
|
||||
<string name="label_albums">Albums</string>
|
||||
<string name="label_songs">Songs</string>
|
||||
|
||||
<string name="description_album_cover">Album Cover for %s</string>
|
||||
<string name="description_artist_image">Artist Cover for %s</string>
|
||||
<string name="description_track_number">Track %s</string>
|
||||
<string name="description_error">Error</string>
|
||||
|
||||
<string name="placeholder_genre">Unknown Genre</string>
|
||||
<string name="placeholder_artist">Unknown Artist</string>
|
||||
<string name="placeholder_album">Unknown Album</string>
|
||||
<string name="placeholder_no_date">No Date</string>
|
||||
|
||||
<string name="format_info">%1$s / %2$s</string>
|
||||
<string name="format_double_counts">%1$s, %2$s</string>
|
||||
|
||||
Reference in New Issue
Block a user