简体   繁体   中英

How to put < or > in an android 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" />

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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM