How to make layouts for different device resolutions?

Asked

Viewed 30 times

0

Good guys, I wonder how I do to create layouts for different screen sizes (small, normal, large or xlarge) in the same project in Android Studio? I do the layouts in the same directory: "layout" or do I have to create another one? The app chooses the appropriate layout for each device automatically or should be programmed?

Thanks in advance!

  • Use Percentlayout and Constraintlayout and you no longer need to do multiple layouts, just 2. 1 for normal devices and another for tablets, but only if you want different layouts on tablets. ;)

  • @itscorey thought exactly like this, one for normal devices and one for tablets (large), and I would like to know how I can do this, because I already have a code for a normal, but I need to do it for tablets, ie need to create a new layout for everyone right?

  • I believe so. I’ve seen some developers create separate Apks for tablets, but repurpose the code. I believe that’s a good approach, but only someone with more experience to answer you.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.