Android multiple screen design

前端 未结 1 786
借酒劲吻你
借酒劲吻你 2020-12-10 19:22

I understand there is plenty of documentation about designing for multiple screen support in Android. and I have read the Android guide here as well as a number of similar q

相关标签:
1条回答
  • 2020-12-10 20:08

    In my experience you don't really need to customize your layout for the small/medium/large/etc screens, as long as you have your drawables for the different densities. Like the documentation says, Android will attempt to render your layout properly on different screen sizes.

    By default, Android resizes your application layout to fit the current device screen. In most cases, this works fine. In other cases, your UI might not look as good and might need adjustments for different screen sizes.

    The 'other cases' applies only if you really want to change your layout on larger screens.

    Using android:scaleType="center" works for me, but it will, like you said, leave empty space around your layout on larger screens if it should fit on smaller screens as well. If you have a fully customized view with 'widgets' that should be placed exactly right, and you don't want to be programmatically determining the scaling and applying the same scaling to your widgets, this is definitely the way to go.

    0 讨论(0)
提交回复
热议问题