0

I'm working on Android app Which will set layout for all devices. I have moto c plus and one plus 6t and i have to create two layout for those two mobile

So i create layout-normal(480dpi) and layout-large(600dpi) with textview as normal and large. But i get normal layout for both mobiles .

manifest file:

<supports-screens
        android:resizeable="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:anyDensity="true"
        />

I didn't get the Multiple screen support concept clearly . help me to find it out

Zoe
  • 27,060
  • 21
  • 118
  • 148
Bala
  • 1
  • 2

2 Answers2

0

Have you tried to use ConstraintLayout to handle multiple screens?

Check these two links:

The attributes in your post decide only the screens that your application supports and doesn't set the layout for a different resolution.

You have also to put your xml layout in the correct folder on res/layout. See also the functions that set your layout on Activity classes or Fragment Classes in case you are doing something there. It's not an immediate task, because there are layout fallbacks (as in your case) if you doesn't set something in the right way.

Using Constraint layout let you do something similar without using multiple layout xml, and sometimes the effects are really similar. You introduce multiple layout where you have a very specific situation that you can't solve using the recommended layout classes (Like Constraint).

This is a similar thread if you wanna investigate more: Android supporting multiple resolution with multiple layout folder.

Hope this helps or give you some hints.

Cheers.

Tamir Abutbul
  • 7,301
  • 7
  • 25
  • 53
TomD88
  • 721
  • 6
  • 11
0

use contstraint layout or weight checkout this link -- https://developer.android.com/training/multiscreen/screensizes

rahul khurana
  • 188
  • 1
  • 9