How to fit the application for both config like portrait,landscape in android?

后端 未结 3 846
礼貌的吻别
礼貌的吻别 2021-01-29 00:29

I have done my application in portrait configuration. When I load my application in device its coming portraint configuration. But in landscape mode i keep missing some controls

相关标签:
3条回答
  • 2021-01-29 01:00

    This question was asked before: here

    If you are a beginner, you might find the following useful(read up): Developing orientation aware Android apps

    0 讨论(0)
  • 2021-01-29 01:01

    You probably have to define different layouts for landscape and portrait. You could force android to choose the proper layout depending on orientation. You could put landscape layout xml files in “res\layout-land” and portrait in “res\layout”. Of course it’s always good idea to use RelativeLayout, but it depends on your application. Regards!

    0 讨论(0)
  • 2021-01-29 01:02

    Check this out. Google has released a tutorial about this recently: https://developer.android.com/resources/samples/MultiResolution/index.html

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