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

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. How can I fix the screen for both configurations?

Asked by: Ada907 | Posted: 20-01-2022

Answer 1

This question was asked before: here

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

Answered by: Roman977 | Posted: 21-02-2022

Answer 2

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!

Answered by: Freddie739 | Posted: 21-02-2022

Answer 3

Check this out. Google has released a tutorial about this recently:

Answered by: Chloe981 | Posted: 21-02-2022

Similar questions

Still can't find your answer? Check out these communities...

Android Google Support | Android Community | Android Community (Facebook) | Android