diff --git a/app/src/main/java/app/fedilab/android/helper/CustomEmoji.java b/app/src/main/java/app/fedilab/android/helper/CustomEmoji.java index d3230475..8f816ccc 100644 --- a/app/src/main/java/app/fedilab/android/helper/CustomEmoji.java +++ b/app/src/main/java/app/fedilab/android/helper/CustomEmoji.java @@ -32,7 +32,7 @@ public class CustomEmoji extends ReplacementSpan { Context mContext = viewWeakReference.get().getContext(); this.viewWeakReference = viewWeakReference; SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(mContext); - scale = sharedpreferences.getFloat(mContext.getString(R.string.SET_FONT_SCALE), 1.0f); + scale = sharedpreferences.getFloat(mContext.getString(R.string.SET_FONT_SCALE), 1.1f); } @Override diff --git a/app/src/main/java/app/fedilab/android/helper/Helper.java b/app/src/main/java/app/fedilab/android/helper/Helper.java index 20e2dd01..7dce373f 100644 --- a/app/src/main/java/app/fedilab/android/helper/Helper.java +++ b/app/src/main/java/app/fedilab/android/helper/Helper.java @@ -1188,7 +1188,7 @@ public class Helper { public static MultipartBody.Part getMultipartBodyWithWM(Context context, String waterMark, @NonNull String paramName, @NonNull Attachment attachment) { File files = new File(attachment.local_path); SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context); - float scale = sharedpreferences.getFloat(context.getString(R.string.SET_FONT_SCALE), 1.0f); + float scale = sharedpreferences.getFloat(context.getString(R.string.SET_FONT_SCALE), 1.1f); float textSize = 15; Paint mPaint = new Paint(); mPaint.setTextSize(textSize); diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/NotificationAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/NotificationAdapter.java index 07fb4c34..04c31fad 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/NotificationAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/NotificationAdapter.java @@ -226,6 +226,7 @@ public class NotificationAdapter extends RecyclerView.Adapter if (theme_text_header_2_line != -1) { holder.binding.username.setTextColor(theme_text_header_2_line); } - + //final float scale = context.getResources().getDisplayMetrics().density; + final float scale = sharedpreferences.getFloat(context.getString(R.string.SET_FONT_SCALE), 1.1f); if (statusToDeal.account.locked) { - final float scale = context.getResources().getDisplayMetrics().density; Drawable img = ContextCompat.getDrawable(context, R.drawable.ic_baseline_lock_24); assert img != null; - img.setBounds(0, 0, (int) (16 * scale + 0.5f), (int) (16 * scale + 0.5f)); + img.setBounds(0, 0, (int) (Helper.convertDpToPixel(16, context) * scale + 0.5f), (int) (Helper.convertDpToPixel(16, context) * scale + 0.5f)); holder.binding.username.setCompoundDrawables(null, null, img, null); } else { holder.binding.username.setCompoundDrawables(null, null, null, null); } - + float normalSize = Helper.convertDpToPixel(28, context); + holder.binding.actionButtonReply.getLayoutParams().width = (int) (normalSize * scale); + holder.binding.actionButtonReply.getLayoutParams().height = (int) (normalSize * scale); + holder.binding.actionButtonReply.requestLayout(); + holder.binding.actionButtonBoost.setImageSize((int) (normalSize * scale)); + holder.binding.actionButtonFavorite.setImageSize((int) (normalSize * scale)); + holder.binding.actionButtonBookmark.setImageSize((int) (normalSize * scale)); + holder.binding.statusAddCustomEmoji.getLayoutParams().width = (int) (normalSize * scale); + holder.binding.statusAddCustomEmoji.getLayoutParams().height = (int) (normalSize * scale); + holder.binding.statusAddCustomEmoji.requestLayout(); + holder.binding.statusEmoji.getLayoutParams().width = (int) (normalSize * scale); + holder.binding.statusEmoji.getLayoutParams().height = (int) (normalSize * scale); + holder.binding.actionButtonMore.getLayoutParams().width = (int) (normalSize * scale); + holder.binding.actionButtonMore.getLayoutParams().height = (int) (normalSize * scale); + holder.binding.actionButtonMore.requestLayout(); + holder.binding.actionShare.getLayoutParams().width = (int) (normalSize * scale); + holder.binding.actionShare.getLayoutParams().height = (int) (normalSize * scale); + holder.binding.actionShare.requestLayout(); if (statusToDeal.account.bot) { holder.binding.botIcon.setVisibility(View.VISIBLE); @@ -1416,7 +1433,6 @@ public class StatusAdapter extends RecyclerView.Adapter if (ownvotes != null && ownvotes.contains(j)) { Drawable img = ContextCompat.getDrawable(context, R.drawable.ic_baseline_check_24); assert img != null; - final float scale = context.getResources().getDisplayMetrics().density; img.setColorFilter(ContextCompat.getColor(context, R.color.cyanea_accent_reference), PorterDuff.Mode.SRC_IN); img.setBounds(0, 0, (int) (20 * scale + 0.5f), (int) (20 * scale + 0.5f)); pollItemBinding.pollItemText.setCompoundDrawables(null, null, img, null); diff --git a/app/src/main/res/drawable/ic_baseline_storage_24.xml b/app/src/main/res/drawable/ic_baseline_storage_24.xml new file mode 100644 index 00000000..7871eb9d --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_storage_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layout/drawer_follow.xml b/app/src/main/res/layout/drawer_follow.xml index 759432ca..37a41359 100644 --- a/app/src/main/res/layout/drawer_follow.xml +++ b/app/src/main/res/layout/drawer_follow.xml @@ -41,7 +41,7 @@ android:layout_gravity="center" android:layout_marginEnd="12dp" android:adjustViewBounds="true" - android:src="@drawable/ic_baseline_cached_24" + android:src="@drawable/ic_baseline_storage_24" android:visibility="gone" tools:visibility="visible" /> diff --git a/app/src/main/res/layout/drawer_status.xml b/app/src/main/res/layout/drawer_status.xml index e04fb47f..23415d7a 100644 --- a/app/src/main/res/layout/drawer_status.xml +++ b/app/src/main/res/layout/drawer_status.xml @@ -548,14 +548,16 @@ android:clipChildren="false" android:clipToPadding="false"> - @@ -640,6 +643,10 @@ android:contentDescription="@string/add_reaction" android:padding="3dp" android:src="@drawable/ic_baseline_emoji_emotions_24" + android:layout_gravity="center" + android:adjustViewBounds="true" + android:clickable="true" + android:focusable="true" android:visibility="gone" tools:visibility="visible" /> @@ -650,6 +657,10 @@ android:layout_marginStart="6dp" android:contentDescription="@string/add_reaction" android:padding="3dp" + android:layout_gravity="center" + android:adjustViewBounds="true" + android:clickable="true" + android:focusable="true" android:src="@drawable/ic_baseline_add_reaction_24" android:visibility="gone" tools:visibility="visible" /> @@ -659,13 +670,15 @@ android:layout_height="wrap_content" android:layout_weight="1" /> -