android:text= " " What If " "如何在 (android:text) 属性中编写此文本,以及 Android 中的双引号



我是Android的新手,我想要的是包含文字的按钮,其中包括双引号,如下所示...但是我遇到了一个错误缺少Android名称空间前缀"

        <Button
            android:id="@+id/button3"
            android:background="@drawable/nxtbckbutton"
            android:layout_width="wrap_content"
            android:textColor="#ffffff"
            android:layout_height="wrap_content"
            android![enter image description here][1]:text="Continue to  "What if" " />

您需要使用BackSlash

逃脱双引号

android:text="Continue to "What if" "

另一个选项是将&quot; XML实体用于双引号符号。

这是关于在文本属性中使用双引号的问题。

android:text ='继续"如果"'

找到了... thanx guyz ...

相关内容

最新更新