some more content descriptions - #623

This commit is contained in:
stom79 2018-12-10 09:22:50 +01:00
parent 37a8fc9299
commit a75afcdd79
11 changed files with 37 additions and 147 deletions

View File

@ -276,6 +276,7 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
if( attachment != null && attachment.getDescription() != null && !attachment.getDescription().equals("null")){
media_description.setText(attachment.getDescription());
media_description.setVisibility(View.VISIBLE);
imageView.setContentDescription(attachment.getDescription());
}else{
media_description.setText("");
media_description.setVisibility(View.GONE);

View File

@ -1,123 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Thomas Schneider
This file is a part of Mastalab
This program is free software; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation; either version 3 of the
License, or (at your option) any later version.
Mastalab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along with Mastalab; if not,
see <http://www.gnu.org/licenses>
-->
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="fr.gouv.etalab.mastodon.activities.MainActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/appBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="?attr/popupOverlay">
<ImageView
android:id="@+id/iconbar"
android:layout_width="30dp"
android:layout_height="30dp"
tools:ignore="ContentDescription" />
<LinearLayout
android:id="@+id/toolbar_search_container"
android:layout_width="match_parent"
android:layout_height="40dp"
android:orientation="horizontal">
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
android:layout_width="0dp"
android:layout_weight="1"
app:tabGravity="fill"
app:tabMaxWidth="0dp"
app:tabIndicatorHeight="0dp"
android:layout_height="wrap_content"
app:tabSelectedTextColor="?attr/colorAccent"
/>
</LinearLayout>
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
<!-- Framelayout to display Fragments -->
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/viewpager"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="fr.gouv.etalab.mastodon.activities.MainActivity"
>
</android.support.v4.view.ViewPager>
<RelativeLayout
android:id="@+id/no_action"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/no_action_text"
android:padding="10dp"
android:gravity="center"
android:textSize="25sp"
android:layout_gravity="center"
android:textStyle="italic|bold"
android:typeface="serif"
android:text="@string/action_remote_instance_add"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/add_new_instance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin_floating"
app:srcCompat="@drawable/ic_action_add_new"
tools:ignore="VectorDrawableCompat" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/federated_timeline_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="fitCenter"
android:layout_gravity="bottom|start"
app:fabSize="mini"
app:srcCompat="@drawable/ic_close"
android:layout_margin="@dimen/fab_margin_floating"
tools:ignore="VectorDrawableCompat" />
</android.support.design.widget.CoordinatorLayout>
</android.support.v4.widget.DrawerLayout>

View File

@ -84,6 +84,7 @@
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@drawable/ic_mail_outline"
android:contentDescription="@string/contact_instance_admin"
tools:ignore="VectorDrawableCompat" />
</LinearLayout>
<!-- Main Loader -->

View File

@ -120,6 +120,7 @@
</RelativeLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/toot"
android:contentDescription="@string/toot_it"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
@ -129,6 +130,7 @@
<android.support.design.widget.FloatingActionButton
android:id="@+id/delete_all"
android:visibility="gone"
android:contentDescription="@string/delete_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
@ -138,6 +140,7 @@
<android.support.design.widget.FloatingActionButton
android:id="@+id/add_new"
android:visibility="gone"
android:contentDescription="@string/add_new"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
@ -148,6 +151,7 @@
<android.support.design.widget.FloatingActionButton
android:id="@+id/federated_timeline"
android:layout_width="wrap_content"
android:contentDescription="@string/follow_instance"
android:layout_height="wrap_content"
app:fabSize="mini"
android:layout_gravity="bottom|start"

View File

@ -24,8 +24,8 @@
app:isSwipeFromEdge="true"
app:maskAlpha="125"
app:swipeBackFactor="0.5">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
@ -66,12 +66,13 @@
android:id="@+id/media_picture_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Description is set dynamically -->
<com.github.chrisbanes.photoview.PhotoView
android:visibility="gone"
android:id="@+id/media_picture"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="ContentDescription" />
/>
<TextView
android:visibility="gone"
android:gravity="center"
@ -101,7 +102,7 @@
android:layout_alignParentLeft="true"
android:layout_width="20dp"
android:layout_height="20dp"
tools:ignore="ContentDescription" />
android:contentDescription="@string/previous" />
<ImageView
android:visibility="gone"
android:layout_margin="5dp"
@ -112,7 +113,7 @@
android:layout_alignParentRight="true"
android:layout_width="20dp"
android:layout_height="20dp"
tools:ignore="ContentDescription" />
android:contentDescription="@string/next" />
@ -129,6 +130,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_close"
android:contentDescription="@string/close"
/>
<ImageButton
@ -144,6 +146,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_save_white"
android:contentDescription="@string/download"
/>
<TextView

View File

@ -37,6 +37,7 @@
android:layout_width="200dp"
android:layout_height="110dp"
android:src="@drawable/mastohost"
android:contentDescription="@string/mastohost_logo"
/>
<!-- About partnership -->

View File

@ -50,7 +50,7 @@
android:layout_height="match_parent"
android:scaleType="centerCrop"
app:layout_collapseMode="parallax"
tools:ignore="ContentDescription" />
android:contentDescription="@string/profile_banner"/>
<ImageView
android:padding="1dp"
android:layout_margin="10dp"
@ -60,7 +60,7 @@
app:layout_scrollFlags="scroll"
android:background="@drawable/circle_background_white"
android:layout_centerInParent="true"
tools:ignore="ContentDescription" />
android:contentDescription="@string/profile_picture" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/account_follow"
android:visibility="gone"
@ -102,7 +102,7 @@
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="5dp"
tools:ignore="ContentDescription" />
android:contentDescription="@string/open_menu" />
</RelativeLayout>
<LinearLayout
android:layout_below="@+id/top_banner"
@ -394,7 +394,7 @@
android:gravity="center_vertical"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
tools:ignore="ContentDescription" />
android:contentDescription="@string/profile_picture" />
<TextView
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
@ -417,7 +417,7 @@
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:gravity="center"
tools:ignore="ContentDescription" />
android:contentDescription="@string/display_toot_truncate" />
</LinearLayout>
<TextView
android:id="@+id/warning_message"

View File

@ -16,11 +16,9 @@
see <http://www.gnu.org/licenses>.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:fillViewport="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
@ -104,7 +102,7 @@
android:layout_height="wrap_content"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:src="@drawable/ic_insert_photo"
tools:ignore="ContentDescription" />
android:contentDescription="@string/toot_select_image" />
<ImageButton
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
@ -113,7 +111,7 @@
android:layout_height="wrap_content"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:src="@drawable/ic_public"
tools:ignore="ContentDescription" />
android:contentDescription="@string/toot_visibility_tilte" />
<Button
android:id="@+id/toot_cw"
android:padding="5dp"
@ -133,6 +131,7 @@
style="?attr/borderlessColored"
android:layout_width="30dp"
android:layout_height="30dp"
android:contentDescription="@string/emoji_picker"
/>
<TextView
android:id="@+id/toot_space_left"

View File

@ -40,7 +40,7 @@
android:gravity="center_vertical"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
tools:ignore="ContentDescription" />
android:contentDescription="@string/close" />
<ImageView
android:id="@+id/pp_actionBar"
android:layout_width="30dp"
@ -49,7 +49,7 @@
android:gravity="center_vertical"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
tools:ignore="ContentDescription" />
android:contentDescription="@string/profile_picture" />
<TextView
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
@ -69,7 +69,7 @@
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:gravity="center_vertical"
tools:ignore="ContentDescription" />
android:contentDescription="@string/refresh" />
<ImageView
android:id="@+id/action_expand"
android:layout_width="30dp"
@ -81,6 +81,6 @@
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:gravity="center_vertical"
tools:ignore="ContentDescription" />
android:contentDescription="@string/expand_conversation" />
</android.support.v7.widget.Toolbar>

View File

@ -15,9 +15,7 @@
You should have received a copy of the GNU General Public License along with Mastalab; if not,
see <http://www.gnu.org/licenses>.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -56,7 +54,7 @@
android:src="@drawable/ic_skip_previous"
android:layout_height="40dp"
style="@style/Base.Widget.AppCompat.Button"
tools:ignore="ContentDescription" />
android:contentDescription="@string/previous" />
<ImageButton
android:id="@+id/date_time_next"
android:layout_marginStart="10dp"
@ -65,7 +63,7 @@
android:layout_width="40dp"
android:layout_height="40dp"
style="@style/Base.Widget.AppCompat.Button"
tools:ignore="ContentDescription"/>
android:contentDescription="@string/next"/>
<ImageButton
android:visibility="gone"
android:layout_marginStart="10dp"
@ -75,7 +73,7 @@
android:layout_width="40dp"
android:layout_height="40dp"
style="@style/Base.Widget.AppCompat.Button"
tools:ignore="ContentDescription"/>
android:contentDescription="@string/validate"/>
</LinearLayout>
</LinearLayout>

View File

@ -695,6 +695,12 @@
<string name="app_logo">Logo of the application</string>
<string name="profile_picture">Profile picture</string>
<string name="profile_banner">Profile banner</string>
<string name="contact_instance_admin">Contact admin of the instance</string>
<string name="add_new">Add new</string>
<string name="mastohost_logo">MastoHost logo</string>
<string name="emoji_picker">Emoji picker</string>
<string name="refresh">Refresh</string>
<string name="expand_conversation">Expand the conversation</string>
<string-array name="filter_expire">
<item>Never</item>