Loading app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java +14 −13 Original line number Diff line number Diff line Loading @@ -924,6 +924,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> } //final float scale = context.getResources().getDisplayMetrics().density; final float scale = sharedpreferences.getFloat(context.getString(R.string.SET_FONT_SCALE), 1.1f); final float scaleIcon = sharedpreferences.getFloat(context.getString(R.string.SET_FONT_SCALE_ICON), 1.1f); if (statusToDeal.account.locked) { Drawable img = ContextCompat.getDrawable(context, R.drawable.ic_baseline_lock_24); assert img != null; Loading @@ -934,22 +935,22 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> } //Button sizes depending of the defined scale 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.getLayoutParams().width = (int) (normalSize * scaleIcon); holder.binding.actionButtonReply.getLayoutParams().height = (int) (normalSize * scaleIcon); 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.actionButtonBoost.setImageSize((int) (normalSize * scaleIcon)); holder.binding.actionButtonFavorite.setImageSize((int) (normalSize * scaleIcon)); holder.binding.actionButtonBookmark.setImageSize((int) (normalSize * scaleIcon)); holder.binding.statusAddCustomEmoji.getLayoutParams().width = (int) (normalSize * scaleIcon); holder.binding.statusAddCustomEmoji.getLayoutParams().height = (int) (normalSize * scaleIcon); 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.statusEmoji.getLayoutParams().width = (int) (normalSize * scaleIcon); holder.binding.statusEmoji.getLayoutParams().height = (int) (normalSize * scaleIcon); holder.binding.actionButtonMore.getLayoutParams().width = (int) (normalSize * scaleIcon); holder.binding.actionButtonMore.getLayoutParams().height = (int) (normalSize * scaleIcon); holder.binding.actionButtonMore.requestLayout(); holder.binding.actionShare.getLayoutParams().width = (int) (normalSize * scale); holder.binding.actionShare.getLayoutParams().height = (int) (normalSize * scale); holder.binding.actionShare.getLayoutParams().width = (int) (normalSize * scaleIcon); holder.binding.actionShare.getLayoutParams().height = (int) (normalSize * scaleIcon); holder.binding.actionShare.requestLayout(); if (statusToDeal.account.bot) { Loading app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentInterfaceSettings.java +11 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ public class FragmentInterfaceSettings extends PreferenceFragmentCompat implemen SET_FONT_SCALE.setMax(180); SET_FONT_SCALE.setMin(80); } SeekBarPreference SET_FONT_SCALE_ICON = findPreference(getString(R.string.SET_FONT_SCALE_ICON_INT)); if (SET_FONT_SCALE_ICON != null) { SET_FONT_SCALE_ICON.setMax(180); SET_FONT_SCALE_ICON.setMin(80); } recreate = false; } Loading @@ -63,6 +68,12 @@ public class FragmentInterfaceSettings extends PreferenceFragmentCompat implemen editor.putFloat(getString(R.string.SET_FONT_SCALE), scale); recreate = true; } if (key.compareToIgnoreCase(getString(R.string.SET_FONT_SCALE_ICON_INT)) == 0) { int progress = sharedPreferences.getInt(getString(R.string.SET_FONT_SCALE_ICON_INT), 110); float scale = (float) (progress) / 100.0f; editor.putFloat(getString(R.string.SET_FONT_SCALE_ICON), scale); recreate = true; } if (key.compareToIgnoreCase(getString(R.string.SET_USE_SINGLE_TOPBAR)) == 0) { recreate = true; } Loading app/src/main/res/values/strings.xml +5 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,8 @@ <string name="camera">Camera</string> <string name="delete_all">Delete all</string> <string name="schedule">Schedule</string> <string name="text_size">Text and icon sizes</string> <string name="text_size">Text sizes</string> <string name="icon_size">Icon sizes</string> <string name="next">Next</string> <string name="previous">Previous</string> <string name="open_with">Open with</string> Loading Loading @@ -915,6 +916,9 @@ <string name="SET_NOTIF_STATUS" translatable="false">SET_NOTIF_STATUS</string> <string name="SET_FONT_SCALE" translatable="false">SET_FONT_SCALE</string> <string name="SET_FONT_SCALE_INT" translatable="false">SET_FONT_SCALE_INT</string> <string name="SET_FONT_SCALE_ICON" translatable="false">SET_FONT_SCALE_ICON</string> <string name="SET_FONT_SCALE_ICON_INT" translatable="false">SET_FONT_SCALE_ICON_INT</string> <string name="SET_FILTER_REGEX_HOME" translatable="false">SET_FILTER_REGEX_HOME</string> <string name="SET_FILTER_REGEX_LOCAL" translatable="false">SET_FILTER_REGEX_LOCAL</string> <string name="SET_FILTER_REGEX_PUBLIC" translatable="false">SET_FILTER_REGEX_PUBLIC</string> Loading app/src/main/res/xml/pref_compose.xml +3 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ <SwitchPreferenceCompat app:defaultValue="true" app:iconSpaceReserved="false" app:singleLineTitle="false" app:key="@string/SET_RETRIEVE_METADATA_IF_URL_FROM_EXTERAL" app:title="@string/set_retrieve_metadata_share_from_extras" /> Loading @@ -68,6 +69,7 @@ <SwitchPreferenceCompat app:iconSpaceReserved="false" app:key="@string/SET_CUSTOM_SHARING" app:singleLineTitle="false" app:summary="@string/settings_title_custom_sharing_indication" app:title="@string/settings_title_custom_sharing" /> Loading @@ -79,6 +81,7 @@ app:useSimpleSummaryProvider="true" /> <SwitchPreferenceCompat app:singleLineTitle="false" app:iconSpaceReserved="false" app:key="@string/SET_FORWARD_TAGS_IN_REPLY" app:title="@string/set_forward_tags" /> Loading app/src/main/res/xml/pref_interface.xml +14 −0 Original line number Diff line number Diff line Loading @@ -70,14 +70,26 @@ <androidx.preference.SeekBarPreference android:defaultValue="110" android:max="180" app:singleLineTitle="false" app:iconSpaceReserved="false" app:key="@string/SET_FONT_SCALE_INT" app:showSeekBarValue="true" app:title="@string/text_size" /> <androidx.preference.SeekBarPreference android:defaultValue="110" android:max="180" app:iconSpaceReserved="false" app:key="@string/SET_FONT_SCALE_ICON_INT" app:showSeekBarValue="true" app:singleLineTitle="false" app:title="@string/icon_size" /> <androidx.preference.SeekBarPreference android:defaultValue="100" android:max="1000" app:singleLineTitle="false" app:iconSpaceReserved="false" app:key="@string/SET_VIDEO_CACHE" app:showSeekBarValue="true" Loading @@ -86,6 +98,7 @@ <androidx.preference.SeekBarPreference android:defaultValue="5" android:max="30" app:singleLineTitle="false" app:iconSpaceReserved="false" app:key="@string/SET_NSFW_TIMEOUT" app:showSeekBarValue="true" Loading @@ -94,6 +107,7 @@ <androidx.preference.SeekBarPreference android:defaultValue="3" android:max="30" app:singleLineTitle="false" app:iconSpaceReserved="false" app:key="@string/SET_MED_DESC_TIMEOUT" app:showSeekBarValue="true" Loading Loading
app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java +14 −13 Original line number Diff line number Diff line Loading @@ -924,6 +924,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> } //final float scale = context.getResources().getDisplayMetrics().density; final float scale = sharedpreferences.getFloat(context.getString(R.string.SET_FONT_SCALE), 1.1f); final float scaleIcon = sharedpreferences.getFloat(context.getString(R.string.SET_FONT_SCALE_ICON), 1.1f); if (statusToDeal.account.locked) { Drawable img = ContextCompat.getDrawable(context, R.drawable.ic_baseline_lock_24); assert img != null; Loading @@ -934,22 +935,22 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> } //Button sizes depending of the defined scale 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.getLayoutParams().width = (int) (normalSize * scaleIcon); holder.binding.actionButtonReply.getLayoutParams().height = (int) (normalSize * scaleIcon); 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.actionButtonBoost.setImageSize((int) (normalSize * scaleIcon)); holder.binding.actionButtonFavorite.setImageSize((int) (normalSize * scaleIcon)); holder.binding.actionButtonBookmark.setImageSize((int) (normalSize * scaleIcon)); holder.binding.statusAddCustomEmoji.getLayoutParams().width = (int) (normalSize * scaleIcon); holder.binding.statusAddCustomEmoji.getLayoutParams().height = (int) (normalSize * scaleIcon); 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.statusEmoji.getLayoutParams().width = (int) (normalSize * scaleIcon); holder.binding.statusEmoji.getLayoutParams().height = (int) (normalSize * scaleIcon); holder.binding.actionButtonMore.getLayoutParams().width = (int) (normalSize * scaleIcon); holder.binding.actionButtonMore.getLayoutParams().height = (int) (normalSize * scaleIcon); holder.binding.actionButtonMore.requestLayout(); holder.binding.actionShare.getLayoutParams().width = (int) (normalSize * scale); holder.binding.actionShare.getLayoutParams().height = (int) (normalSize * scale); holder.binding.actionShare.getLayoutParams().width = (int) (normalSize * scaleIcon); holder.binding.actionShare.getLayoutParams().height = (int) (normalSize * scaleIcon); holder.binding.actionShare.requestLayout(); if (statusToDeal.account.bot) { Loading
app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentInterfaceSettings.java +11 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ public class FragmentInterfaceSettings extends PreferenceFragmentCompat implemen SET_FONT_SCALE.setMax(180); SET_FONT_SCALE.setMin(80); } SeekBarPreference SET_FONT_SCALE_ICON = findPreference(getString(R.string.SET_FONT_SCALE_ICON_INT)); if (SET_FONT_SCALE_ICON != null) { SET_FONT_SCALE_ICON.setMax(180); SET_FONT_SCALE_ICON.setMin(80); } recreate = false; } Loading @@ -63,6 +68,12 @@ public class FragmentInterfaceSettings extends PreferenceFragmentCompat implemen editor.putFloat(getString(R.string.SET_FONT_SCALE), scale); recreate = true; } if (key.compareToIgnoreCase(getString(R.string.SET_FONT_SCALE_ICON_INT)) == 0) { int progress = sharedPreferences.getInt(getString(R.string.SET_FONT_SCALE_ICON_INT), 110); float scale = (float) (progress) / 100.0f; editor.putFloat(getString(R.string.SET_FONT_SCALE_ICON), scale); recreate = true; } if (key.compareToIgnoreCase(getString(R.string.SET_USE_SINGLE_TOPBAR)) == 0) { recreate = true; } Loading
app/src/main/res/values/strings.xml +5 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,8 @@ <string name="camera">Camera</string> <string name="delete_all">Delete all</string> <string name="schedule">Schedule</string> <string name="text_size">Text and icon sizes</string> <string name="text_size">Text sizes</string> <string name="icon_size">Icon sizes</string> <string name="next">Next</string> <string name="previous">Previous</string> <string name="open_with">Open with</string> Loading Loading @@ -915,6 +916,9 @@ <string name="SET_NOTIF_STATUS" translatable="false">SET_NOTIF_STATUS</string> <string name="SET_FONT_SCALE" translatable="false">SET_FONT_SCALE</string> <string name="SET_FONT_SCALE_INT" translatable="false">SET_FONT_SCALE_INT</string> <string name="SET_FONT_SCALE_ICON" translatable="false">SET_FONT_SCALE_ICON</string> <string name="SET_FONT_SCALE_ICON_INT" translatable="false">SET_FONT_SCALE_ICON_INT</string> <string name="SET_FILTER_REGEX_HOME" translatable="false">SET_FILTER_REGEX_HOME</string> <string name="SET_FILTER_REGEX_LOCAL" translatable="false">SET_FILTER_REGEX_LOCAL</string> <string name="SET_FILTER_REGEX_PUBLIC" translatable="false">SET_FILTER_REGEX_PUBLIC</string> Loading
app/src/main/res/xml/pref_compose.xml +3 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ <SwitchPreferenceCompat app:defaultValue="true" app:iconSpaceReserved="false" app:singleLineTitle="false" app:key="@string/SET_RETRIEVE_METADATA_IF_URL_FROM_EXTERAL" app:title="@string/set_retrieve_metadata_share_from_extras" /> Loading @@ -68,6 +69,7 @@ <SwitchPreferenceCompat app:iconSpaceReserved="false" app:key="@string/SET_CUSTOM_SHARING" app:singleLineTitle="false" app:summary="@string/settings_title_custom_sharing_indication" app:title="@string/settings_title_custom_sharing" /> Loading @@ -79,6 +81,7 @@ app:useSimpleSummaryProvider="true" /> <SwitchPreferenceCompat app:singleLineTitle="false" app:iconSpaceReserved="false" app:key="@string/SET_FORWARD_TAGS_IN_REPLY" app:title="@string/set_forward_tags" /> Loading
app/src/main/res/xml/pref_interface.xml +14 −0 Original line number Diff line number Diff line Loading @@ -70,14 +70,26 @@ <androidx.preference.SeekBarPreference android:defaultValue="110" android:max="180" app:singleLineTitle="false" app:iconSpaceReserved="false" app:key="@string/SET_FONT_SCALE_INT" app:showSeekBarValue="true" app:title="@string/text_size" /> <androidx.preference.SeekBarPreference android:defaultValue="110" android:max="180" app:iconSpaceReserved="false" app:key="@string/SET_FONT_SCALE_ICON_INT" app:showSeekBarValue="true" app:singleLineTitle="false" app:title="@string/icon_size" /> <androidx.preference.SeekBarPreference android:defaultValue="100" android:max="1000" app:singleLineTitle="false" app:iconSpaceReserved="false" app:key="@string/SET_VIDEO_CACHE" app:showSeekBarValue="true" Loading @@ -86,6 +98,7 @@ <androidx.preference.SeekBarPreference android:defaultValue="5" android:max="30" app:singleLineTitle="false" app:iconSpaceReserved="false" app:key="@string/SET_NSFW_TIMEOUT" app:showSeekBarValue="true" Loading @@ -94,6 +107,7 @@ <androidx.preference.SeekBarPreference android:defaultValue="3" android:max="30" app:singleLineTitle="false" app:iconSpaceReserved="false" app:key="@string/SET_MED_DESC_TIMEOUT" app:showSeekBarValue="true" Loading