Android S3 layout vs Galaxy Nexus layout

后端 未结 4 949
-上瘾入骨i
-上瘾入骨i 2020-12-10 07:43

I\'ve developed an app that was supposed to target both the Galaxy Nexus and the Galaxy S3. Both have 720 x 1280 screen resolutions and I have only used \'dp\' values in my

4条回答
  •  清歌不尽
    2020-12-10 08:33

    You can get the device model and can set layout.

    As following you can get model

    String phoneModel = android.os.Build.MODEL;
    if(phoneModel.equals("ABC")) {
        // SET Ralated Layout
    } else if(phoneModel.equals("XYZ")) {
        // SET Ralated Layout
    }
    

提交回复
热议问题