Monday, 6 December 2021

How do I detect the user-set screen zoom level in kotlin

I'm trying to find a way in Kotlin to detect the level of display zoom a user has set on their device. I currently have two image buttons with labels off to one side sitting side by side in a LinearLayout. The labels wrap mid-word if the display zoom is set past a certain threshold. What I'd like to do is detect the zoom level (or whatever it's called) and stack them vertically if the text is over a certain size so users with less than ideal eyesight can read them properly. Is this possible in Kotlin?



from How do I detect the user-set screen zoom level in kotlin

No comments:

Post a Comment