From 82be9f0bc73ea861d77f31ebd1c3b8660d000635 Mon Sep 17 00:00:00 2001 From: tom79 Date: Sat, 1 Feb 2020 12:22:22 +0100 Subject: [PATCH] Add description --- .../app/fedilab/android/activities/ShowAccountActivity.java | 5 +++++ app/src/main/res/values/strings.xml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/app/src/main/java/app/fedilab/android/activities/ShowAccountActivity.java b/app/src/main/java/app/fedilab/android/activities/ShowAccountActivity.java index 11957b1c1..d7644c332 100644 --- a/app/src/main/java/app/fedilab/android/activities/ShowAccountActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ShowAccountActivity.java @@ -978,15 +978,18 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt account_follow.setImageResource(R.drawable.ic_lock_open); doAction = action.UNBLOCK; account_follow.setVisibility(View.VISIBLE); + account_follow.setContentDescription(getString(R.string.action_unblock)); } else if (relationship.isBlocked_by()) { account_follow.setImageResource(R.drawable.ic_user_plus); account_follow.setVisibility(View.VISIBLE); account_follow.setEnabled(false); + account_follow.setContentDescription(getString(R.string.action_disabled)); doAction = action.NOTHING; }else if (relationship.isRequested()) { account_follow_request.setVisibility(View.VISIBLE); account_follow.setImageResource(R.drawable.ic_hourglass_full); account_follow.setVisibility(View.VISIBLE); + account_follow.setContentDescription(getString(R.string.follow_request)); doAction = action.UNFOLLOW; } else if (relationship.isFollowing()) { account_follow.setImageResource(R.drawable.ic_user_minus); @@ -994,11 +997,13 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt account_follow.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(ShowAccountActivity.this, R.color.red_1))); } doAction = action.UNFOLLOW; + account_follow.setContentDescription(getString(R.string.action_unfollow)); account_follow.setVisibility(View.VISIBLE); } else if (!relationship.isFollowing()) { account_follow.setImageResource(R.drawable.ic_user_plus); doAction = action.FOLLOW; account_follow.setVisibility(View.VISIBLE); + account_follow.setContentDescription(getString(R.string.action_follow)); } else { account_follow.setVisibility(View.GONE); doAction = action.NOTHING; diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d1dd581eb..398be701e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1218,4 +1218,6 @@ It is a Pixelfed story Upload a media, it will be automatically added to your Pixelfed story. Media successfully added to your story! + Action disabled + Unfollow \ No newline at end of file