Forum Xamarin.Android


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

How to set the display on different screens automatically?

BayuBayu Member ✭✭✭

I made an Android application, I set the layout so that it works properly on the Android Lollipop 5.1 API 22 emulator, but after I run it on a higher emulator Android Oreo 8.1 API 27, some button out of the screen, how to fix it? thanks


  • LandLuLandLu Member, Xamarin Team Xamurai

    Different devices have different screen sizes. If you put too many controls there the latter ones may be located outside of the window.
    We could use a scroll view wrapping the layout. Therefore, the layout could be scrolled to display all the content if the content size is larger than the screen size.

  • BayuBayu Member ✭✭✭

    Thank you,

    I am sorry @LandLu , I make the same app.

    When I build in Android Lollipop 5.1 API 22, the app content is working properly. But, when I build in Android Oreo 8.1 API 27, some controls located outside of the window.

    Is there a way for my content to adapt to all types of the screens automatically?

  • LandLuLandLu Member, Xamarin Team Xamurai

    It depends on how you layout the controls. There's not such an automatic approach to fit the screen.
    The best solution is to consume a scroll view to wrap the root layout.

Sign In or Register to comment.