是否有任何可能的方法来设置 TextView 周围的边框,如下图所示? 第一张照片是我目前得到的,第二张照片是我想要什么样的边框。 LinearLayout 中包含的所有元素都只是单独的 TextView 非常感谢你的帮助~~
最佳答案
您可以通过将 TextView 背景设置为具有如下背景和边框的 xml 形状来做到这一点:
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#191919" />
<stroke android:width="1dp" android:color="#191919"/>
</shape>
关于这个你可以加红here
关于android - 如何设置TextView结构的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8850979/