我想像html样式表格式一样在布局xml中放置边距
我正在使用这段代码,它会出现语法错误
android:layout_margin="5|0|5|0dp"和 android:layout_margin="5dp|0dp|5dp|0dp"
两者都不行。这里有人回答这个问题吗???
最佳答案
您必须改用以下标签:
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
关于Android xml CSS 类似布局边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8643984/