Pam*_*Pam 4 java android button settext
我正试图从我的xml中将按钮的文本设置为"<<<",但我得到一个"错误:(20)解析XML时出错:格式不正确(无效令牌)"
<Button
android:id="@+id/test"
android:text="<<<"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
Run Code Online (Sandbox Code Playgroud)
所以我跳到我的strings.xml进入那里,这显然不起作用.
<string name="abc"> <<< </string>
Run Code Online (Sandbox Code Playgroud)
这有解决方法吗?
这些是html实体,也适用于android studio:
> can be replaced with >
< can be replaced with <
" can be replaced with ", “ or ”
' can be replaced with ', ‘ or ’
} can be replaced with }
& can be replaced with &
space can be replaced with  
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
188 次 |
| 最近记录: |