How can i support multiple screen sizes in android with single xml layout file

后端 未结 9 2231
鱼传尺愫
鱼传尺愫 2021-02-06 12:54

I want to support my android screen in multiple screen sizes but i can do it with maintaining multiple xml layout file\'s

but according to requirement it i supposed to b

9条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-06 13:37

    May be you can try below library which manages all the screen size resolution automatically.

    compile 'com.intuit.sdp:sdp-android:1.0.4'
    

    You need to just add the dependency in your build.gradle file and you are done.

    You need to specify like:

    android:layout_height="@dimen/_10sdp"
    

    Instead of usual:

    android:layout_height="@dimen/10dp"
    

提交回复
热议问题