Yuito-app-android/app/src/main/java/com/keylesspalace/tusky/view
Nik Clayton fe7b1529df
Provide a preference to scale all UI text (#3248)
Font scaling is applied in addition to any scaling set in Android system preferences. So if the user set the Android font size to largest (a 1.3x increase) and then sets the preference to 120%, the total change is 1.56x.

Create SliderPreference to adjust the preference.

- Use Slider, which supports float values and step sizes > 1
- Display the selected value in the preference's summary
- Provide buttons to increment / decrement the value

Restart the activity if the preference changes so that the user sees the impact of the change immediately. Fix a bug in PreferencesActivity where the "EXTRA_RESTART_ON_BACK" intent was never processed. Fix this to ensure that other activities are restarted so the new font scale takes effect.

Implement the scaling in BaseActivity by overriding onAttachBaseContext, and providing a wrapped context with the font scaling applied.

Fixes https://github.com/tuskyapp/Tusky/issues/2982, https://github.com/tuskyapp/Tusky/issues/2461
2023-06-29 18:34:56 +02:00
..
BackgroundMessageView.kt Simplify repeated code that shows errors (#3762) 2023-06-19 23:49:20 +02:00
BezelImageView.kt Convert BezelImageView, EndlessOnScrollListener, ComposeScheduleView, ProgressImageView to Kotlin (#3147) 2023-01-13 19:49:56 +01:00
ClickableSpanTextView.kt Force a layout pass to ensure spans are measured correctly (#3600) 2023-04-30 21:50:52 +02:00
EmojiPicker.kt add ktlint plugin to project and apply default code style (#2209) 2021-06-28 21:13:24 +02:00
EndlessOnScrollListener.kt Convert BezelImageView, EndlessOnScrollListener, ComposeScheduleView, ProgressImageView to Kotlin (#3147) 2023-01-13 19:49:56 +01:00
ExposedPlayPauseVideoView.kt Handle config changes for video playback (#2754) 2022-11-07 19:57:13 +01:00
GraphView.kt Refactor "trending hashtags" code (#3595) 2023-06-10 19:47:07 +02:00
LicenseCard.kt update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
MediaPreviewImageView.kt update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
MediaPreviewLayout.kt Fix media preview bugs (#3160) 2023-01-12 19:40:51 +01:00
MuteAccountDialog.kt add ktlint plugin to project and apply default code style (#2209) 2021-06-28 21:13:24 +02:00
SliderPreference.kt Provide a preference to scale all UI text (#3248) 2023-06-29 18:34:56 +02:00