Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -1,79 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This is hidden from screenreaders because that same alt text is set as content description on the ImageView -->
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/alt_text_wrapper"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|bottom"
|
||||
android:layout_margin="12dp"
|
||||
android:importantForAccessibility="noHideDescendants"
|
||||
android:background="@drawable/bg_image_alt_overlay">
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/alt_badges"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|bottom"
|
||||
android:padding="12dp"
|
||||
android:importantForAccessibility="noHideDescendants">
|
||||
|
||||
<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="?colorGray25" />
|
||||
<ImageView
|
||||
android:id="@+id/no_alt_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/ic_fluent_important_20_filled"
|
||||
android:background="@drawable/bg_image_no_alt_overlay"
|
||||
android:tint="?colorGray25" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/alt_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/m3_label_large"
|
||||
android:textColor="?colorGray25"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:paddingVertical="1dp"
|
||||
android:text="@string/sk_alt_button"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/alt_text_close"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:src="@drawable/ic_baseline_close_24"
|
||||
android:tint="#FFF"
|
||||
android:background="?android:actionBarItemBackground"/>
|
||||
|
||||
<org.joinmastodon.android.ui.views.NestableScrollView
|
||||
android:id="@+id/alt_text_scroller"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="40dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/alt_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:textAppearance="@style/m3_body_medium"
|
||||
android:textColor="?colorGray25"
|
||||
tools:text="Alt text goes here"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_alt_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:textAppearance="@style/m3_label_large"
|
||||
android:textColor="?colorGray25"
|
||||
android:text="@string/sk_no_alt_text"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</org.joinmastodon.android.ui.views.NestableScrollView>
|
||||
<TextView
|
||||
android:id="@+id/alt_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:textAppearance="@style/m3_label_large"
|
||||
android:textColor="?colorGray25"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:paddingVertical="1dp"
|
||||
android:background="@drawable/bg_image_alt_overlay"
|
||||
android:text="@string/sk_alt_button"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.joinmastodon.android.ui.views.ImageAttachmentFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
@@ -27,4 +27,4 @@
|
||||
|
||||
<include layout="@layout/alt_badge" />
|
||||
|
||||
</org.joinmastodon.android.ui.views.ImageAttachmentFrameLayout>
|
||||
</FrameLayout>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.joinmastodon.android.ui.views.ImageAttachmentFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
@@ -12,4 +13,4 @@
|
||||
|
||||
<include layout="@layout/alt_badge" />
|
||||
|
||||
</org.joinmastodon.android.ui.views.ImageAttachmentFrameLayout>
|
||||
</FrameLayout>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.joinmastodon.android.ui.views.ImageAttachmentFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
@@ -20,4 +20,4 @@
|
||||
|
||||
<include layout="@layout/alt_badge" />
|
||||
|
||||
</org.joinmastodon.android.ui.views.ImageAttachmentFrameLayout>
|
||||
</FrameLayout>
|
||||
|
||||
77
mastodon/src/main/res/layout/overlay_image_alt_text.xml
Normal file
77
mastodon/src/main/res/layout/overlay_image_alt_text.xml
Normal file
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/alt_text_wrapper"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|bottom"
|
||||
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="?colorGray25" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/alt_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/m3_label_large"
|
||||
android:textColor="?colorGray25"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:paddingVertical="1dp"
|
||||
android:text="@string/sk_alt_button"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/alt_text_close"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:src="@drawable/ic_baseline_close_24"
|
||||
android:tint="#FFF"
|
||||
android:background="?android:actionBarItemBackground"/>
|
||||
|
||||
<org.joinmastodon.android.ui.views.NestableScrollView
|
||||
android:id="@+id/alt_text_scroller"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="40dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/alt_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:textAppearance="@style/m3_body_medium"
|
||||
android:textColor="#FFF"
|
||||
tools:text="Alt text goes here"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_alt_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:textAppearance="@style/m3_label_large"
|
||||
android:textColor="?colorGray25"
|
||||
android:text="@string/sk_no_alt_text"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</org.joinmastodon.android.ui.views.NestableScrollView>
|
||||
|
||||
</FrameLayout>
|
||||
Reference in New Issue
Block a user