From ff128ed7d1cf9dc5f0163f3cebf669835dd5b3f0 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 18 Sep 2023 09:22:59 +0200 Subject: Dedicate icon --- .../android/mastodon/ui/drawer/StatusAdapter.java | 18 +- .../mastodon/drawable/baseline_more_actions.xml | 10 + .../res/layouts/mastodon/layout/drawer_status.xml | 213 ++++++++++----------- app/src/main/res/values/strings.xml | 1 + 4 files changed, 125 insertions(+), 117 deletions(-) create mode 100644 app/src/main/res/layouts/mastodon/drawable/baseline_more_actions.xml diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java index f05f5a203..90a13ccde 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java @@ -1315,7 +1315,7 @@ public class StatusAdapter extends RecyclerView.Adapter holder.binding.editTime.setVisibility(View.GONE); holder.binding.visibilitySmall.setImageResource(ressource); if (displayCounters && canBeFederated) { - holder.binding.replyCount.setText(String.valueOf(statusToDeal.replies_count)); + holder.binding.actionButtonReplyCount.setText(String.valueOf(statusToDeal.replies_count)); holder.binding.statusInfo.setVisibility(View.VISIBLE); holder.binding.dateShort.setVisibility(View.GONE); holder.binding.visibilitySmall.setVisibility(View.GONE); @@ -2415,9 +2415,9 @@ public class StatusAdapter extends RecyclerView.Adapter popup.show(); }); if (statusToDeal.replies_count > 0 && !(context instanceof ContextActivity)) { - holder.binding.replyCount.setVisibility(View.VISIBLE); + holder.binding.actionButtonReplyCount.setVisibility(View.VISIBLE); } else { - holder.binding.replyCount.setVisibility(View.GONE); + holder.binding.actionButtonReplyCount.setVisibility(View.GONE); } holder.binding.actionButtonReply.setOnLongClickListener(v -> { CrossActionHelper.doCrossAction(context, CrossActionHelper.TypeOfCrossAction.REPLY_ACTION, null, statusToDeal); @@ -2823,10 +2823,10 @@ public class StatusAdapter extends RecyclerView.Adapter } if (theme_icons_color != -1) { - Helper.changeDrawableColor(context, holder.binding.actionButtonReply, theme_icons_color); - Helper.changeDrawableColor(context, holder.binding.statusAddCustomEmoji, theme_icons_color); - Helper.changeDrawableColor(context, holder.binding.actionButtonQuote, theme_icons_color); - Helper.changeDrawableColor(context, holder.binding.statusEmoji, theme_icons_color); + Helper.changeDrawableColor(context, R.drawable.ic_round_reply_24, theme_icons_color); + // Helper.changeDrawableColor(context, holder.binding.statusAddCustomEmoji, theme_icons_color); + // Helper.changeDrawableColor(context, holder.binding.actionButtonQuote, theme_icons_color); + // Helper.changeDrawableColor(context, holder.binding.statusEmoji, theme_icons_color); Helper.changeDrawableColor(context, holder.binding.actionButtonMore, theme_icons_color); Helper.changeDrawableColor(context, R.drawable.ic_round_star_24, theme_icons_color); Helper.changeDrawableColor(context, R.drawable.ic_round_repeat_24, theme_icons_color); @@ -2835,11 +2835,11 @@ public class StatusAdapter extends RecyclerView.Adapter Helper.changeDrawableColor(context, R.drawable.ic_person, theme_icons_color); Helper.changeDrawableColor(context, R.drawable.ic_bot, theme_icons_color); Helper.changeDrawableColor(context, R.drawable.ic_round_reply_24, theme_icons_color); - Helper.changeDrawableColor(context, holder.binding.actionButtonTranslate, theme_icons_color); + // Helper.changeDrawableColor(context, holder.binding.actionButtonTranslate, theme_icons_color); holder.binding.actionButtonBoost.setInActiveImageTintColor(theme_icons_color); holder.binding.actionButtonFavorite.setInActiveImageTintColor(theme_icons_color); holder.binding.actionButtonBookmark.setInActiveImageTintColor(theme_icons_color); - holder.binding.replyCount.setTextColor(theme_icons_color); + holder.binding.actionButtonReplyCount.setTextColor(theme_icons_color); } if (theme_statuses_color != -1) { holder.binding.cardviewContainer.setBackgroundColor(theme_statuses_color); diff --git a/app/src/main/res/layouts/mastodon/drawable/baseline_more_actions.xml b/app/src/main/res/layouts/mastodon/drawable/baseline_more_actions.xml new file mode 100644 index 000000000..bf6f2f2f3 --- /dev/null +++ b/app/src/main/res/layouts/mastodon/drawable/baseline_more_actions.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layouts/mastodon/layout/drawer_status.xml b/app/src/main/res/layouts/mastodon/layout/drawer_status.xml index 66ac2f484..4b471a228 100644 --- a/app/src/main/res/layouts/mastodon/layout/drawer_status.xml +++ b/app/src/main/res/layouts/mastodon/layout/drawer_status.xml @@ -632,40 +632,34 @@ android:clipChildren="false" android:clipToPadding="false"> - - - + app:primaryColor="@color/boost_icon" + app:secondaryColor="@color/boost_icon" /> - - + - + + + - - + sparkbutton:iconSize="28dp" /> - + app:constraint_referenced_ids="action_button_quote, action_button_translate, action_button_maths, status_add_custom_emoji, status_emoji" + app:flow_maxElementsWrap="3" + app:flow_wrapMode="aligned" + app:layout_constraintBottom_toBottomOf="@id/action_button_extra" + app:layout_constraintStart_toStartOf="parent" /> - + + + + + + + + + style="@style/Widget.Material3.Button.IconButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:icon="@drawable/ic_baseline_emoji_emotions_24" /> - + style="@style/Widget.Material3.Button.IconButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:icon="@drawable/ic_baseline_add_reaction_24" /> + If your instance does not accept some extra features, you can hide these icons Display the \"Quote\" button Display \"Reactions\" buttons + Quote Bubble Exclude visibility Reply visibility -- cgit v1.2.3