我需要在 TableLayout
中显示 TableRow
的边框。
我该怎么做???
最佳答案
我给出一个想法 -> 使用 shape 标签创建一个 xml 文件
像这样
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF"/>
<stroke android:width="2dp" android:color="#515151"/>
<corners android:radius="3dp" />
<padding android:left="10dp" android:top="5dp"
android:right="10dp" android:bottom="5dp" />
</shape>
在表格布局的 android:background="@drawable/xmlFilename" 中设置此 xml 文件
它给出了你的表格布局的边框
关于android - 如何在 android 的 tablelayout 中为 tablerow 设置边框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5562118/