开发者

How to put < or > in an android button

开发者 https://www.devze.com 2023-01-21 13:36 出处:网络
Eclipse doesn\'t accept the less than symbol for the button text, is there a way to escape it so it shows on the button?

Eclipse doesn't accept the less than symbol for the button text, is there a way to escape it so it shows on the button?

    <Button android:id="@+id/button_prev_line"
        android:text="<line"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" 开发者_StackOverflow社区/>


escape it < with &lt; and > with &gt;

in general you should escape the following characters:

< &lt;
> &gt;
" &quot;
& &amp;


Have you tried &lt; and &gt;.


have you tried &lt; or &#60;


Yes yoh need to try the

< &lt;
> &gt;
0

精彩评论

暂无评论...
验证码 换一张
取 消