mirror of
https://github.com/Matte23/circolapp.git
synced 2025-12-06 07:29:10 +00:00
Add contentDescription to ImageButtons
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<activity
|
||||
android:name=".SettingsActivity"
|
||||
android:parentActivityName=".MainActivity"
|
||||
android:label="@string/title_settings"></activity>
|
||||
android:label="@string/title_settings" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name">
|
||||
|
||||
@@ -90,22 +90,31 @@ class CircularLetterAdapter(
|
||||
|
||||
holder.favouriteButton.setImageResource(
|
||||
if (circulars[position].favourite) {
|
||||
holder.favouriteButton.contentDescription =
|
||||
context.getString(R.string.image_remove_favourite)
|
||||
R.drawable.baseline_star_24
|
||||
} else {
|
||||
holder.favouriteButton.contentDescription =
|
||||
context.getString(R.string.image_add_favourite)
|
||||
R.drawable.baseline_star_border_24
|
||||
}
|
||||
)
|
||||
|
||||
holder.reminderButton.setImageResource(
|
||||
if (circulars[position].reminder) {
|
||||
holder.reminderButton.contentDescription =
|
||||
context.getString(R.string.image_remove_reminder)
|
||||
R.drawable.baseline_notifications_active_24
|
||||
} else {
|
||||
holder.reminderButton.contentDescription =
|
||||
context.getString(R.string.image_add_reminder)
|
||||
R.drawable.baseline_notifications_none_24
|
||||
}
|
||||
)
|
||||
|
||||
if (collapsedItems != position) {
|
||||
holder.collapseButton.setImageDrawable(context.getDrawable(R.drawable.baseline_expand_more_24))
|
||||
holder.collapseButton.contentDescription = context.getString(R.string.image_expand)
|
||||
|
||||
holder.viewButton.visibility = View.GONE
|
||||
holder.downloadButton.visibility = View.GONE
|
||||
@@ -116,6 +125,7 @@ class CircularLetterAdapter(
|
||||
holder.attachmentsList.adapter = null
|
||||
} else {
|
||||
holder.collapseButton.setImageDrawable(context.getDrawable(R.drawable.baseline_expand_less_24))
|
||||
holder.collapseButton.contentDescription = context.getString(R.string.image_collapse)
|
||||
|
||||
holder.viewButton.visibility = View.VISIBLE
|
||||
holder.downloadButton.visibility = View.VISIBLE
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/baseline_visibility_24"
|
||||
android:tint="@color/colorAccent"
|
||||
android:contentDescription="@string/image_view_attachment"
|
||||
app:layout_constraintEnd_toStartOf="@+id/attachment_download_button"
|
||||
app:layout_constraintTop_toBottomOf="@+id/attachment_divider" />
|
||||
|
||||
@@ -46,6 +47,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/baseline_get_app_24"
|
||||
android:tint="@color/colorAccent"
|
||||
android:contentDescription="@string/image_download_attachment"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/attachment_divider" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -53,6 +53,7 @@
|
||||
android:layout_marginEnd="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/baseline_expand_more_24"
|
||||
android:contentDescription="@string/image_expand"
|
||||
app:layout_constraintBottom_toTopOf="@+id/circular_reminder_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -65,6 +66,7 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/baseline_visibility_24"
|
||||
android:tint="@color/colorAccent"
|
||||
android:contentDescription="@string/image_view_circular"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/circulars_attachments_list"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
@@ -77,6 +79,7 @@
|
||||
android:gravity="center"
|
||||
android:src="@drawable/baseline_get_app_24"
|
||||
android:tint="@color/colorAccent"
|
||||
android:contentDescription="@string/image_download_circular"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/circulars_attachments_list"
|
||||
app:layout_constraintEnd_toStartOf="@+id/circular_guideline"
|
||||
@@ -89,6 +92,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/baseline_star_24"
|
||||
android:tint="@color/colorAccent"
|
||||
android:contentDescription="@string/image_add_favourite"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/circulars_attachments_list"
|
||||
app:layout_constraintEnd_toStartOf="@+id/circular_reminder_button"
|
||||
@@ -102,6 +106,7 @@
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@drawable/baseline_notifications_24"
|
||||
android:tint="@color/colorAccent"
|
||||
android:contentDescription="@string/image_add_reminder"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/circulars_attachments_list"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
@@ -52,4 +52,15 @@
|
||||
<string name="snackbar_circular_downloaded">La circolare sarà salvata nella cartella Download</string>
|
||||
|
||||
<string name="snackbar_connection_not_available">Rete non disponibile. I risultati potrebbero non essere aggiornati</string>
|
||||
|
||||
<string name="image_view_attachment">Visualizza allegato</string>
|
||||
<string name="image_download_attachment">Scarica allegato</string>
|
||||
<string name="image_view_circular">Visualizza circolare</string>
|
||||
<string name="image_download_circular">Scarica circolare</string>
|
||||
<string name="image_add_favourite">Aggiungi ai preferiti</string>
|
||||
<string name="image_add_reminder">Aggiungi promemoria</string>
|
||||
<string name="image_remove_favourite">Rimuovi dai preferiti</string>
|
||||
<string name="image_remove_reminder">Rimuovi promemoria</string>
|
||||
<string name="image_expand">Espandi</string>
|
||||
<string name="image_collapse">Compatta</string>
|
||||
</resources>
|
||||
@@ -53,4 +53,15 @@
|
||||
<string name="snackbar_circular_downloaded">The circular letter will be saved into the download folder</string>
|
||||
|
||||
<string name="snackbar_connection_not_available">Network not available. Results may be outdated</string>
|
||||
|
||||
<string name="image_view_attachment">View attachment</string>
|
||||
<string name="image_download_attachment">Download attachment</string>
|
||||
<string name="image_view_circular">View circular</string>
|
||||
<string name="image_download_circular">Download circular</string>
|
||||
<string name="image_add_favourite">Add to favourites</string>
|
||||
<string name="image_add_reminder">Add reminder</string>
|
||||
<string name="image_remove_favourite">Remove from favourites</string>
|
||||
<string name="image_remove_reminder">Remove reminder</string>
|
||||
<string name="image_expand">Expand</string>
|
||||
<string name="image_collapse">Collapse</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user