您如何在Android XML文件中使用@
作爲文本,因爲它具有特殊含義?我有一個TextView
將只需持有文本@
Android XML轉義符「@」符號
我想:
<TextView
android:id="@+id/at_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/account_name"
android:gravity="center_horizontal"
android:padding="3dip"
android:text="@" />
那當然沒有與錯誤
error: Error: No resource type specified (at 'text' with value '@').
所以我想它指向一個條目工作strings.xml
這樣: <string name="at">@</string>
並顯示錯誤:
error: Error: No resource type specified (at 'at' with value '@').
那麼我如何逃避@
作爲TextView的文本?
完美的感謝! – Jeshurun
隨時歡迎!! ........ –