1

The main screen in my app works fine when the screen zoom is set to default:

enter image description here

When I set the screen zoom to the maximum, layouts overlap:

enter image description here

I want to disable android OS from zooming my app. In other words I don't want the activity to be resizable. I tried different solutions but non of them achieves what I want.

I used this code in the manifest:

<supports-screens
    android:smallScreens="false"
    android:resizeable="false"
    android:requiresSmallestWidthDp="360" />

But the app is still zoomed but with a warning message to the user that the app may behave unexpectedly:

enter image description here

How can disable resizing or zooming my activity on all screens? Plz help me.

M. Omar
  • 261
  • 1
  • 2
  • 13
  • 2
    If the user has enabled screen zoom, presumably the user *wants the screen to be zoomed*. For example, it may make the text easier to read or make small UI elements easier to tap on. – CommonsWare Dec 06 '20 at 19:13
  • I sure know that, but I'm going to set the default icons and font of the app to a large size, which will force all views to overlap in a way that makes the app useless. Is there any way to prevent this?! – M. Omar Dec 06 '20 at 19:21
  • https://stackoverflow.com/questions/56779224/how-do-i-prevent-android-device-display-size-scaling-in-my-app?noredirect=1&lq=1 – Ibrahim Ali Dec 06 '20 at 19:40
  • Thanks a lot for the help, but I'm looking for an official configuration, not a work around. – M. Omar Dec 06 '20 at 20:21

1 Answers1

-1

You should not prevent zooming. As CommonsWare commented, the user wants to zoom in.

The best thing to do in this case is making every page/layout that might not fit on a small/zoomed screen scrollable. That way, if it doesn't fit the user can just scroll down.

radwl
  • 29
  • 2