这是这个问题的后续问题:
我正试图为include布局添加一个边距。我已经在layout_width元素中添加了layout_height和layout_height,但是仍然忽略了页边距。此外,当我试图自动完成布局xml文件中的“页边距”一词时,甚至无法识别该属性。
那么,如何向include标记添加页边距呢?
布局:
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the f
当涉及到支持不同屏幕大小时,我遇到了一个问题。无论我做什么,这个应用程序总是选择一个xhdpi布局。我在两部智能手机上做了测试。三星核心II和华为Y6。这就是这两款智能手机的特点。
Samsung Core II Android 4.4
480x800
Screen density 1.5 which is hdpi
Huawei y6 Android:9
720x1422
screen density 2.0 which is xhdpi
我创建了两个布局
mylayout.xml
mylayout.xml (hdpi)
mylayout.xml (xhdpi)