Maui android layout content to fite in screen size

Haviv Elbsz 2,071 Reputation points
2023-03-25T19:11:24.9633333+00:00

Hello all. How I can ensure that my layout content fit in any device screen. I test my app in my phone and it's ok but how I can be sure that it will fit in any other android device. I know I can use scrollview. but I want to know if it possible to design a none scroll layout that fits in any device screen. Thank you very much.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,405 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 74,486 Reputation points Microsoft Vendor
    2023-03-27T05:46:59.56+00:00

    Hello,

    but I want to know if it possible to design a none scroll layout that fits in any device screen.

    I am afraid this answer is no, Android have too much device sizes.

    As your mentioned, you can use ScrollView or FlexLayout to fit more device sizes.

    And try not to use AbsoluteLayout or set specific width or height for your controls.

    Before releasing your application, you can test on different devices by Android Device Manager Or Appcenter. For example, if different device types have screen fit issue, base on different device type, you can provide different layout.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.