如何在Android Textview中顯示報價?如何在Textview中顯示報價?
在我的字符串我有一個
BBCode URL IMG and [Quote] tags
等工作,但其報價不轉換。
編輯:也許我需要寫我的意思是標籤:)
如何在Android Textview中顯示報價?如何在Textview中顯示報價?
在我的字符串我有一個
BBCode URL IMG and [Quote] tags
等工作,但其報價不轉換。
編輯:也許我需要寫我的意思是標籤:)
你需要使用\"
myTextView.setText("\"");
顯示"
請給我一點解釋,請? – 2015-02-10 13:12:00
請參閱我編輯的答案。 – barq 2015-02-10 13:13:57
使用"
到報價添加到逃避報價一個字符串,然後將該字符串設置爲TextView
。看看下面的示例 -
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hii "TextView""
android:textSize="15sp"
android:layout_marginBottom="10dp"/>
以上的TextView將顯示 - 斐伊川「的TextView」
TextView.setText(Html.fromHtml("“ " + "YOUR TEXT" + " ”"));
不同於論壇的網站,我們不使用「謝謝」,或者「任何幫助表示讚賞」或[so]上的簽名。請參閱「[應該'嗨','謝謝',標語和致敬從帖子中刪除?](http://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and-salutations-be - 刪除 - 從帖子)。順便說一句,這是「在此先感謝」,而不是「在先進的感謝」。 – 2015-02-10 21:32:09