How to create different layout for Galaxy S3 and Nexus 7?

前端 未结 4 759
长情又很酷
长情又很酷 2021-02-03 15:17

I have created an android application which works properly for nexus 7. Inside resources folder, I have created two folders, layout, layout-land for Ne

4条回答
  •  说谎
    说谎 (楼主)
    2021-02-03 16:06

    You need one for xlarge and xlarge-land aswell

    Or you can do it programmatically by calling:

    Display displayparm= activity.getWindowManager().getDefaultDisplay();
    int width= displayparm.getWidth();
    int Height= displayparm.getHeight();
    

    and choosing layout from this info

提交回复
热议问题