add indicator for missing alt texts

closes sk22#355
This commit is contained in:
sk
2023-01-23 19:21:21 +01:00
parent d30b1f7bbd
commit c0c276f03e
10 changed files with 80 additions and 10 deletions

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#E894000C"/>
<corners android:radius="24dp"/>
</shape>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="16dp" android:height="16dp" android:viewportWidth="16" android:viewportHeight="16">
<path android:pathData="M5.96 4.457C5.722 3.18 6.7 2 8 2s2.279 1.18 2.04 2.457l-0.856 4.56C9.077 9.587 8.58 10 8 10S6.923 9.587 6.816 9.017L5.96 4.457zM9.5 12.5C9.5 13.328 8.828 14 8 14s-1.5-0.672-1.5-1.5S7.172 11 8 11s1.5 0.672 1.5 1.5z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="20dp" android:height="20dp" android:viewportWidth="20" android:viewportHeight="20">
<path android:pathData="M10 2C8.343 2 7 3.343 7 5c0 2.227 0.789 5.204 1.225 6.685C8.459 12.48 9.19 13 10 13c0.81 0 1.54-0.518 1.775-1.31C12.212 10.213 13 7.25 13 5c0-1.657-1.343-3-3-3zm0 12c-1.105 0-2 0.895-2 2s0.895 2 2 2 2-0.895 2-2-0.895-2-2-2z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M12 2.002c-2.14 0-3.875 1.735-3.875 3.875 0 2.92 1.207 6.552 1.813 8.199 0.323 0.878 1.159 1.423 2.064 1.423 0.904 0 1.739-0.542 2.063-1.418 0.606-1.64 1.81-5.254 1.81-8.204 0-2.14-1.734-3.875-3.875-3.875zm0.001 14.999c-1.381 0-2.501 1.12-2.501 2.501 0 1.381 1.12 2.501 2.501 2.501 1.382 0 2.501-1.12 2.501-2.5 0-1.382-1.12-2.502-2.5-2.502z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M6.25 3C4.455 3 3 4.455 3 6.25v2.12c0 0.414 0.336 0.75 0.75 0.75S4.5 8.784 4.5 8.37V6.25c0-0.966 0.784-1.75 1.75-1.75h2.12c0.414 0 0.75-0.336 0.75-0.75S8.784 3 8.37 3H6.25zm9.38 1.5c-0.414 0-0.75-0.336-0.75-0.75S15.216 3 15.63 3h2.12C19.545 3 21 4.455 21 6.25v2.12c0 0.414-0.336 0.75-0.75 0.75S19.5 8.784 19.5 8.37V6.25c0-0.966-0.784-1.75-1.75-1.75h-2.12zM3 15.63c0-0.414 0.336-0.75 0.75-0.75s0.75 0.336 0.75 0.75v2.12c0 0.906 0.689 1.651 1.571 1.741C6.13 19.497 6.19 19.5 6.25 19.5h2.12c0.414 0 0.75 0.336 0.75 0.75S8.784 21 8.37 21H6.25C4.455 21 3 19.545 3 17.75v-2.12zm16.5 0c0-0.414 0.336-0.75 0.75-0.75S21 15.216 21 15.63v2.12c0 1.683-1.279 3.067-2.918 3.233C17.973 20.994 17.862 21 17.75 21h-2.12c-0.414 0-0.75-0.336-0.75-0.75s0.336-0.75 0.75-0.75h2.12c0.906 0 1.651-0.689 1.741-1.571 0.006-0.059 0.009-0.119 0.009-0.179v-2.12zM7 7.75C7 7.336 7.336 7 7.75 7h8.5C16.664 7 17 7.336 17 7.75S16.664 8.5 16.25 8.5h-8.5C7.336 8.5 7 8.164 7 7.75zM7.75 11C7.336 11 7 11.336 7 11.75s0.336 0.75 0.75 0.75h8.5c0.414 0 0.75-0.336 0.75-0.75S16.664 11 16.25 11h-8.5zM7 15.75C7 15.336 7.336 15 7.75 15h4.5c0.414 0 0.75 0.336 0.75 0.75s-0.336 0.75-0.75 0.75h-4.5C7.336 16.5 7 16.164 7 15.75z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -20,13 +20,21 @@
android:layout_margin="12dp"
android:importantForAccessibility="noHideDescendants"
android:background="@drawable/bg_image_alt_overlay">
<ImageView
android:id="@+id/no_alt_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="4dp"
android:src="@drawable/ic_fluent_important_20_filled"
android:tint="@color/gray_25" />
<TextView
android:id="@+id/alt_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/m3_label_large"
android:textColor="#FFF"
android:textColor="@color/gray_25"
android:gravity="center"
android:includeFontPadding="false"
android:paddingHorizontal="5dp"
@@ -40,7 +48,7 @@
android:layout_gravity="end|top"
android:src="@drawable/ic_baseline_close_24"
android:tint="#FFF"
android:background="?android:selectableItemBackgroundBorderless"/>
android:background="?android:actionBarItemBackground"/>
<org.joinmastodon.android.ui.views.NestableScrollView
android:id="@+id/alt_text_scroller"

View File

@@ -231,4 +231,7 @@
<string name="sk_no_results">No results</string>
<string name="sk_save_draft">Save draft?</string>
<string name="sk_save_draft_message">Do you want to save your changes to this draft or publish it now?</string>
<string name="sk_no_alt_text">No alt text available</string>
<string name="sk_settings_show_alt_indicator">Indicator for alt texts</string>
<string name="sk_settings_show_no_alt_indicator">Indicator for missing alt texts</string>
</resources>