正在开发一个简单的 Android 测验应用程序。我想向用户询问有关 xml 和 java 文件中的注释的问题。如何在 strings.xml 文件中写入 xml 注释,以显示在屏幕上?
<string name="comments_1"> // </string>
<string name="comments_2"> <!-- --></string>
<string name="comments_3"> /** */</string>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/comments_2"/>
最佳答案
你可以像这样逃避它:
<string name="comments_2"><!-- --></string>
关于java - 在 TextView 中显示评论/在编辑 View 中接受评论以在测验应用程序中使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41795694/