From 5163927e43e4ddf37bbea61c38085dc06695e7c5 Mon Sep 17 00:00:00 2001 From: Evgeny Petrov Date: Mon, 1 Apr 2019 20:19:37 +0300 Subject: [PATCH] Added "Warning" icon instead of "CW" text. (#1138) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added «Warning» icon instead of «CW» text. Icon source: https://ionicons.com/ * Updated icon to "sms_failed" --- .../java/com/keylesspalace/tusky/ComposeActivity.java | 5 ++--- app/src/main/res/drawable/ic_cw_24dp.xml | 9 +++++++++ app/src/main/res/layout/activity_compose.xml | 7 +++---- 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 app/src/main/res/drawable/ic_cw_24dp.xml diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java index 1a4210eb..d7520efe 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java @@ -29,6 +29,7 @@ import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; +import android.media.Image; import android.net.Uri; import android.os.AsyncTask; import android.os.Build; @@ -202,7 +203,7 @@ public final class ComposeActivity private TootButton tootButton; private ImageButton pickButton; private ImageButton visibilityButton; - private Button contentWarningButton; + private ImageButton contentWarningButton; private ImageButton emojiButton; private ImageButton hideMediaToggle; @@ -1484,12 +1485,10 @@ public final class ComposeActivity if (show) { statusMarkSensitive = true; contentWarningBar.setVisibility(View.VISIBLE); - contentWarningButton.setTextColor(ContextCompat.getColor(this, R.color.tusky_blue)); contentWarningEditor.setSelection(contentWarningEditor.getText().length()); contentWarningEditor.requestFocus(); } else { contentWarningBar.setVisibility(View.GONE); - contentWarningButton.setTextColor(ThemeUtils.getColor(this, android.R.attr.textColorTertiary)); } updateHideMediaToggle(); diff --git a/app/src/main/res/drawable/ic_cw_24dp.xml b/app/src/main/res/drawable/ic_cw_24dp.xml new file mode 100644 index 00000000..62713d71 --- /dev/null +++ b/app/src/main/res/drawable/ic_cw_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/activity_compose.xml b/app/src/main/res/layout/activity_compose.xml index 5edd79a4..97d78465 100644 --- a/app/src/main/res/layout/activity_compose.xml +++ b/app/src/main/res/layout/activity_compose.xml @@ -242,17 +242,16 @@ android:visibility="gone" tools:src="@drawable/ic_eye_24dp" /> - + android:tooltipText="@string/action_content_warning" + app:srcCompat="@drawable/ic_cw_24dp"/>