簡體   English   中英

如何設置TextView結構的顏色?

[英]how to set the color of the TextView structure?

有沒有辦法設置TextView周圍的邊框,如下圖所示? 第一張照片是我目前得到的,第二張照片是我想要的邊框。 在LinearLayout中包含的所有元素都只是單獨的textViews thx這么多的幫助~~ 在此輸入圖像描述

在此輸入圖像描述

您可以通過將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>

你可以在這里更多地了解這一點

我認為您可以做到這一點,請檢查以下鏈接: Android-在TextView上顯示帶邊框文本的方法? 這可能有助於解決你的問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM