mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-23 17:20:04 +02:00
Changes action icons
This commit is contained in:
parent
165f85c8af
commit
dda3296154
10 changed files with 102 additions and 19 deletions
|
@ -725,6 +725,13 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||||
}
|
}
|
||||||
if (emojis == null) {
|
if (emojis == null) {
|
||||||
return;
|
return;
|
||||||
|
} else if (emojisList == null) {
|
||||||
|
if (emojis.containsKey(BaseMainActivity.currentInstance)) {
|
||||||
|
emojisList = emojis.get(BaseMainActivity.currentInstance);
|
||||||
|
if (emojisList == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (Emoji emoji : emojisList) {
|
for (Emoji emoji : emojisList) {
|
||||||
if (shortcode != null && emoji.shortcode.contains(shortcode)) {
|
if (shortcode != null && emoji.shortcode.contains(shortcode)) {
|
||||||
|
|
|
@ -521,9 +521,12 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
holder.binding.actionButtonFavorite.pressOnTouch(false);
|
holder.binding.actionButtonFavorite.pressOnTouch(false);
|
||||||
holder.binding.actionButtonBoost.pressOnTouch(false);
|
holder.binding.actionButtonBoost.pressOnTouch(false);
|
||||||
holder.binding.actionButtonBookmark.pressOnTouch(false);
|
holder.binding.actionButtonBookmark.pressOnTouch(false);
|
||||||
holder.binding.actionButtonFavorite.setActiveImage(R.drawable.ic_baseline_star_24);
|
holder.binding.actionButtonFavorite.setActiveImage(R.drawable.ic_round_star_24);
|
||||||
holder.binding.actionButtonFavorite.setInactiveImage(R.drawable.ic_star_outline);
|
holder.binding.actionButtonFavorite.setInactiveImage(R.drawable.ic_round_star_border_24);
|
||||||
holder.binding.actionButtonBookmark.setInactiveImage(R.drawable.ic_baseline_bookmark_border_24);
|
holder.binding.actionButtonBookmark.setActiveImage(R.drawable.ic_round_bookmark_24);
|
||||||
|
holder.binding.actionButtonBookmark.setInactiveImage(R.drawable.ic_round_bookmark_border_24);
|
||||||
|
holder.binding.actionButtonBoost.setActiveImage(R.drawable.ic_round_repeat_24);
|
||||||
|
holder.binding.actionButtonBoost.setInactiveImage(R.drawable.ic_round_repeat_24);
|
||||||
holder.binding.actionButtonFavorite.setDisableCircle(true);
|
holder.binding.actionButtonFavorite.setDisableCircle(true);
|
||||||
holder.binding.actionButtonBoost.setDisableCircle(true);
|
holder.binding.actionButtonBoost.setDisableCircle(true);
|
||||||
holder.binding.actionButtonBookmark.setDisableCircle(true);
|
holder.binding.actionButtonBookmark.setDisableCircle(true);
|
||||||
|
@ -880,13 +883,13 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
}
|
}
|
||||||
//Button sizes depending of the defined scale
|
//Button sizes depending of the defined scale
|
||||||
float normalSize = Helper.convertDpToPixel(28, context);
|
float normalSize = Helper.convertDpToPixel(28, context);
|
||||||
float normalSize2 = Helper.convertDpToPixel(24, context);
|
|
||||||
holder.binding.actionButtonReply.getLayoutParams().width = (int) (normalSize * scaleIcon);
|
holder.binding.actionButtonReply.getLayoutParams().width = (int) (normalSize * scaleIcon);
|
||||||
holder.binding.actionButtonReply.getLayoutParams().height = (int) (normalSize * scaleIcon);
|
holder.binding.actionButtonReply.getLayoutParams().height = (int) (normalSize * scaleIcon);
|
||||||
holder.binding.actionButtonReply.requestLayout();
|
holder.binding.actionButtonReply.requestLayout();
|
||||||
holder.binding.actionButtonBoost.setImageSize((int) (normalSize * scaleIcon));
|
holder.binding.actionButtonBoost.setImageSize((int) (normalSize * scaleIcon));
|
||||||
holder.binding.actionButtonFavorite.setImageSize((int) (normalSize * scaleIcon));
|
holder.binding.actionButtonFavorite.setImageSize((int) (normalSize * scaleIcon));
|
||||||
holder.binding.actionButtonBookmark.setImageSize((int) (normalSize2 * scaleIcon));
|
holder.binding.actionButtonBookmark.setImageSize((int) (normalSize * scaleIcon));
|
||||||
|
|
||||||
holder.binding.statusAddCustomEmoji.getLayoutParams().width = (int) (normalSize * scaleIcon);
|
holder.binding.statusAddCustomEmoji.getLayoutParams().width = (int) (normalSize * scaleIcon);
|
||||||
holder.binding.statusAddCustomEmoji.getLayoutParams().height = (int) (normalSize * scaleIcon);
|
holder.binding.statusAddCustomEmoji.getLayoutParams().height = (int) (normalSize * scaleIcon);
|
||||||
|
@ -2195,13 +2198,13 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
Helper.changeDrawableColor(context, holder.binding.statusAddCustomEmoji, theme_icons_color);
|
Helper.changeDrawableColor(context, holder.binding.statusAddCustomEmoji, theme_icons_color);
|
||||||
Helper.changeDrawableColor(context, holder.binding.statusEmoji, theme_icons_color);
|
Helper.changeDrawableColor(context, holder.binding.statusEmoji, theme_icons_color);
|
||||||
Helper.changeDrawableColor(context, holder.binding.actionButtonMore, theme_icons_color);
|
Helper.changeDrawableColor(context, holder.binding.actionButtonMore, theme_icons_color);
|
||||||
Helper.changeDrawableColor(context, R.drawable.ic_baseline_star_24, theme_icons_color);
|
Helper.changeDrawableColor(context, R.drawable.ic_round_star_24, theme_icons_color);
|
||||||
Helper.changeDrawableColor(context, R.drawable.ic_repeat, theme_icons_color);
|
Helper.changeDrawableColor(context, R.drawable.ic_round_repeat_24, theme_icons_color);
|
||||||
Helper.changeDrawableColor(context, holder.binding.visibility, theme_icons_color);
|
Helper.changeDrawableColor(context, holder.binding.visibility, theme_icons_color);
|
||||||
Helper.changeDrawableColor(context, R.drawable.ic_star_outline, theme_icons_color);
|
Helper.changeDrawableColor(context, R.drawable.ic_round_star_border_24, theme_icons_color);
|
||||||
Helper.changeDrawableColor(context, R.drawable.ic_person, theme_icons_color);
|
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_bot, theme_icons_color);
|
||||||
Helper.changeDrawableColor(context, R.drawable.ic_baseline_reply_16, theme_icons_color);
|
Helper.changeDrawableColor(context, R.drawable.ic_round_reply_24, theme_icons_color);
|
||||||
holder.binding.actionButtonFavorite.setInActiveImageTintColor(theme_icons_color);
|
holder.binding.actionButtonFavorite.setInActiveImageTintColor(theme_icons_color);
|
||||||
holder.binding.actionButtonBookmark.setInActiveImageTintColor(theme_icons_color);
|
holder.binding.actionButtonBookmark.setInActiveImageTintColor(theme_icons_color);
|
||||||
holder.binding.actionButtonBoost.setInActiveImageTintColor(theme_icons_color);
|
holder.binding.actionButtonBoost.setInActiveImageTintColor(theme_icons_color);
|
||||||
|
|
10
app/src/main/res/drawable/ic_round_bookmark_24.xml
Normal file
10
app/src/main/res/drawable/ic_round_bookmark_24.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="?attr/colorControlNormal"
|
||||||
|
android:pathData="M17,3H7c-1.1,0 -2,0.9 -2,2v16l7,-3 7,3V5c0,-1.1 -0.9,-2 -2,-2z" />
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_round_bookmark_border_24.xml
Normal file
10
app/src/main/res/drawable/ic_round_bookmark_border_24.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="?attr/colorControlNormal"
|
||||||
|
android:pathData="M17,3L7,3c-1.1,0 -2,0.9 -2,2v16l7,-3 7,3L19,5c0,-1.1 -0.9,-2 -2,-2zM17,18l-5,-2.18L7,18L7,6c0,-0.55 0.45,-1 1,-1h8c0.55,0 1,0.45 1,1v12z" />
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_round_more_horiz_24.xml
Normal file
10
app/src/main/res/drawable/ic_round_more_horiz_24.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="?attr/colorControlNormal"
|
||||||
|
android:pathData="M6,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z" />
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_round_repeat_24.xml
Normal file
10
app/src/main/res/drawable/ic_round_repeat_24.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="?attr/colorControlNormal"
|
||||||
|
android:pathData="M7,7h10v1.79c0,0.45 0.54,0.67 0.85,0.35l2.79,-2.79c0.2,-0.2 0.2,-0.51 0,-0.71l-2.79,-2.79c-0.31,-0.31 -0.85,-0.09 -0.85,0.36L17,5L6,5c-0.55,0 -1,0.45 -1,1v4c0,0.55 0.45,1 1,1s1,-0.45 1,-1L7,7zM17,17L7,17v-1.79c0,-0.45 -0.54,-0.67 -0.85,-0.35l-2.79,2.79c-0.2,0.2 -0.2,0.51 0,0.71l2.79,2.79c0.31,0.31 0.85,0.09 0.85,-0.36L7,19h11c0.55,0 1,-0.45 1,-1v-4c0,-0.55 -0.45,-1 -1,-1s-1,0.45 -1,1v3z" />
|
||||||
|
</vector>
|
11
app/src/main/res/drawable/ic_round_reply_24.xml
Normal file
11
app/src/main/res/drawable/ic_round_reply_24.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:autoMirrored="true"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M10,9V7.41c0,-0.89 -1.08,-1.34 -1.71,-0.71L3.7,11.29c-0.39,0.39 -0.39,1.02 0,1.41l4.59,4.59c0.63,0.63 1.71,0.19 1.71,-0.7V14.9c5,0 8.5,1.6 11,5.1 -1,-5 -4,-10 -11,-11z" />
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_round_star_24.xml
Normal file
10
app/src/main/res/drawable/ic_round_star_24.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="?attr/colorControlNormal"
|
||||||
|
android:pathData="M12,17.27l4.15,2.51c0.76,0.46 1.69,-0.22 1.49,-1.08l-1.1,-4.72l3.67,-3.18c0.67,-0.58 0.31,-1.68 -0.57,-1.75l-4.83,-0.41l-1.89,-4.46c-0.34,-0.81 -1.5,-0.81 -1.84,0L9.19,8.63L4.36,9.04c-0.88,0.07 -1.24,1.17 -0.57,1.75l3.67,3.18l-1.1,4.72c-0.2,0.86 0.73,1.54 1.49,1.08L12,17.27z" />
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_round_star_border_24.xml
Normal file
10
app/src/main/res/drawable/ic_round_star_border_24.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="?attr/colorControlNormal"
|
||||||
|
android:pathData="M19.65,9.04l-4.84,-0.42 -1.89,-4.45c-0.34,-0.81 -1.5,-0.81 -1.84,0L9.19,8.63l-4.83,0.41c-0.88,0.07 -1.24,1.17 -0.57,1.75l3.67,3.18 -1.1,4.72c-0.2,0.86 0.73,1.54 1.49,1.08l4.15,-2.5 4.15,2.51c0.76,0.46 1.69,-0.22 1.49,-1.08l-1.1,-4.73 3.67,-3.18c0.67,-0.58 0.32,-1.68 -0.56,-1.75zM12,15.4l-3.76,2.27 1,-4.28 -3.32,-2.88 4.38,-0.38L12,6.1l1.71,4.04 4.38,0.38 -3.32,2.88 1,4.28L12,15.4z" />
|
||||||
|
</vector>
|
|
@ -589,11 +589,12 @@
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:id="@+id/action_button_reply_container"
|
android:id="@+id/action_button_reply_container"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="48dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/action_button_reply"
|
android:id="@+id/action_button_reply"
|
||||||
|
@ -605,7 +606,7 @@
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:contentDescription="@string/reply"
|
android:contentDescription="@string/reply"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
app:srcCompat="@drawable/ic_reply" />
|
app:srcCompat="@drawable/ic_round_reply_24" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/reply_count"
|
android:id="@+id/reply_count"
|
||||||
|
@ -613,6 +614,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:text="+"
|
android:text="+"
|
||||||
|
tools:visibility="visible"
|
||||||
android:textColor="?colorControlNormal"
|
android:textColor="?colorControlNormal"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
@ -629,10 +631,10 @@
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:contentDescription="@string/reblog_add"
|
android:contentDescription="@string/reblog_add"
|
||||||
app:sparkbutton_activeImage="@drawable/ic_repeat"
|
app:sparkbutton_activeImage="@drawable/ic_round_repeat_24"
|
||||||
app:sparkbutton_animationSpeed="1.5"
|
app:sparkbutton_animationSpeed="1.5"
|
||||||
app:sparkbutton_iconSize="24dp"
|
app:sparkbutton_iconSize="24dp"
|
||||||
app:sparkbutton_inActiveImage="@drawable/ic_repeat"
|
app:sparkbutton_inActiveImage="@drawable/ic_round_repeat_24"
|
||||||
app:sparkbutton_primaryColor="@color/boost_icon"
|
app:sparkbutton_primaryColor="@color/boost_icon"
|
||||||
app:sparkbutton_secondaryColor="@color/boost_icon" />
|
app:sparkbutton_secondaryColor="@color/boost_icon" />
|
||||||
|
|
||||||
|
@ -647,10 +649,10 @@
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:contentDescription="@string/favourite_add"
|
android:contentDescription="@string/favourite_add"
|
||||||
app:sparkbutton_activeImage="@drawable/ic_baseline_star_24"
|
app:sparkbutton_activeImage="@drawable/ic_round_star_24"
|
||||||
app:sparkbutton_animationSpeed="1.5"
|
app:sparkbutton_animationSpeed="1.5"
|
||||||
app:sparkbutton_iconSize="24dp"
|
app:sparkbutton_iconSize="24dp"
|
||||||
app:sparkbutton_inActiveImage="@drawable/ic_star_outline"
|
app:sparkbutton_inActiveImage="@drawable/ic_round_star_border_24"
|
||||||
app:sparkbutton_primaryColor="@color/marked_icon"
|
app:sparkbutton_primaryColor="@color/marked_icon"
|
||||||
app:sparkbutton_secondaryColor="@color/marked_icon" />
|
app:sparkbutton_secondaryColor="@color/marked_icon" />
|
||||||
|
|
||||||
|
@ -665,10 +667,10 @@
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:contentDescription="@string/bookmark_add"
|
android:contentDescription="@string/bookmark_add"
|
||||||
app:sparkbutton_activeImage="@drawable/ic_baseline_bookmark_24"
|
app:sparkbutton_activeImage="@drawable/ic_round_bookmark_24"
|
||||||
app:sparkbutton_animationSpeed="1.5"
|
app:sparkbutton_animationSpeed="1.5"
|
||||||
app:sparkbutton_iconSize="24dp"
|
app:sparkbutton_iconSize="24dp"
|
||||||
app:sparkbutton_inActiveImage="@drawable/ic_baseline_bookmark_border_24"
|
app:sparkbutton_inActiveImage="@drawable/ic_round_bookmark_border_24"
|
||||||
app:sparkbutton_primaryColor="@color/marked_icon"
|
app:sparkbutton_primaryColor="@color/marked_icon"
|
||||||
app:sparkbutton_secondaryColor="@color/marked_icon" />
|
app:sparkbutton_secondaryColor="@color/marked_icon" />
|
||||||
|
|
||||||
|
@ -722,7 +724,7 @@
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
app:srcCompat="@drawable/ic_more_horiz" />
|
app:srcCompat="@drawable/ic_round_more_horiz_24" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue