[英]Is there a simple way to remove an underline from linked TextView text in Android Studio?
[英]Is there a way to replace TextView text with a String in Android Studio?
本質上,我試圖用從掃描二維碼獲得的字符串替換 TextView 元素包含的文本,以測試掃描儀是否真正工作
您應該能夠使用 setText 函數編輯文本
public final void setText (CharSequence text)
https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence)
如果這不能按預期工作,這是一篇非常好的文章(調試您可能會發現 TextView 具有您想要的文本,但尚未顯示在屏幕上):
https://tekeye.uk/android/examples/ui/android-app-text-not-updating
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.