From e4340f5015cb32f11e1d8e22d28af2550e9c4fa3 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Thu, 29 Dec 2022 13:56:18 -0300 Subject: [PATCH] After hours of looking at the code, i found how to fix it --- .../joinmastodon/android/fragments/ComposeFragment.java | 4 +--- .../src/main/res/drawable/ic_fluent_send_24_enabled.xml | 3 +++ .../src/main/res/drawable/ic_fluent_send_24_selector.xml | 8 ++++++++ mastodon/src/main/res/layout/fragment_compose.xml | 3 ++- mastodon/src/main/res/values-sw380dp/publish_button.xml | 4 ---- mastodon/src/main/res/values/publish_button.xml | 4 ---- 6 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 mastodon/src/main/res/drawable/ic_fluent_send_24_enabled.xml create mode 100644 mastodon/src/main/res/drawable/ic_fluent_send_24_selector.xml delete mode 100644 mastodon/src/main/res/values-sw380dp/publish_button.xml delete mode 100644 mastodon/src/main/res/values/publish_button.xml diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java index e168b4dd2..620e94e5e 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java @@ -299,11 +299,9 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr sensitiveItem=view.findViewById(R.id.sensitive_item); replyText=view.findViewById(R.id.reply_text); - boolean smallStyle = getContext().getResources().getBoolean(R.bool.show_small_publish_button); - if(GlobalUserPreferences.relocatePublishButton){ publishButton=view.findViewById(R.id.publish); - publishButton.setText(editingStatus==null || redraftStatus ? R.string.publish : R.string.save); +// publishButton.setText(editingStatus==null || redraftStatus ? R.string.publish : R.string.save); publishButton.setEllipsize(TextUtils.TruncateAt.END); publishButton.setOnClickListener(this::onPublishClick); publishButton.setSingleLine(true); diff --git a/mastodon/src/main/res/drawable/ic_fluent_send_24_enabled.xml b/mastodon/src/main/res/drawable/ic_fluent_send_24_enabled.xml new file mode 100644 index 000000000..a8ccdeb36 --- /dev/null +++ b/mastodon/src/main/res/drawable/ic_fluent_send_24_enabled.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/mastodon/src/main/res/drawable/ic_fluent_send_24_selector.xml b/mastodon/src/main/res/drawable/ic_fluent_send_24_selector.xml new file mode 100644 index 000000000..2168caa74 --- /dev/null +++ b/mastodon/src/main/res/drawable/ic_fluent_send_24_selector.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/mastodon/src/main/res/layout/fragment_compose.xml b/mastodon/src/main/res/layout/fragment_compose.xml index cf606aa1f..438779cda 100644 --- a/mastodon/src/main/res/layout/fragment_compose.xml +++ b/mastodon/src/main/res/layout/fragment_compose.xml @@ -322,7 +322,8 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:visibility="gone" - android:autoSizeTextType="uniform" + android:tooltipText="@string/publish" + android:drawableStart="@drawable/ic_fluent_send_24_selector" /> diff --git a/mastodon/src/main/res/values-sw380dp/publish_button.xml b/mastodon/src/main/res/values-sw380dp/publish_button.xml deleted file mode 100644 index e7539ec2f..000000000 --- a/mastodon/src/main/res/values-sw380dp/publish_button.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - false - \ No newline at end of file diff --git a/mastodon/src/main/res/values/publish_button.xml b/mastodon/src/main/res/values/publish_button.xml deleted file mode 100644 index 93ee836b6..000000000 --- a/mastodon/src/main/res/values/publish_button.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - true - \ No newline at end of file