Creating different layout for android phone and tablet

后端 未结 4 525
栀梦
栀梦 2020-11-29 09:09

This is a basic android question. I have app which need to have different screen design for a phone and a tablet. The phone needs to have a ListView and the Tablet need to h

4条回答
  •  自闭症患者
    2020-11-29 09:53

    You basically need to provide different layout files for different qualifiers.

    As a very brief example, xml layout files places in the layout-sw720dp (or layout-large for API level < 13) folder will be used for devices more than 720 dips wide (i.e. 10" tablets).

    Check Supporting Multiple Screens and Providing Resources in the Android documentation.

提交回复
热议问题