2010-10-21 60 views
4

Eclipse不接受小於按鈕文本的符號,有沒有辦法將它轉義出來以便它顯示在按鈕上?如何把< or >放在一個android按鈕

<Button android:id="@+id/button_prev_line" 
     android:text="<line" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" /> 
+3

你試過'< '或'>'? – FrustratedWithFormsDesigner 2010-10-21 14:29:56

回答

19

逃避它<&lt;>與一般&gt;

你應該逃脫下列字符:

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

你試過&lt;&gt;

0

是YOH需要嘗試

< &lt; 
> &gt;