2016-04-15 8 views
1

Ich brauche etwas Hilfe für textview Stil. Ich brauche Textview mit Unterstreichung. Ich habe einige Layout-XMLs erstellt. Aber kann keinen Erfolg bekommen. Here what i got Ich möchte diese Zeile in der gleichen Zeile mit edittexts unteren Zeile machen müssen. Hier mein xmlAndroid Textview Layout Problem

<?xml version="1.0" encoding="utf-8"?> 
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > 
    <item 
     android:left="2dp" 
     android:right="10dp" 
     android:top="20dp"> 
     <shape android:shape="line" > 
      <stroke 
       android:width="1dp" 
       android:color="@color/colorPrimary"/> 

      <padding 
       android:bottom="0dp" 
       android:left="5dp" 
       android:right="5dp" 
       android:top="0dp" /> 
     </shape> 
    </item> 

</layer-list> 

Wie kann ich es tun.

+0

Check this post http://stackoverflow.com/questions/8033316/to-draw-an-underline-below-the-textview-in-android –

Antwort

0

Satz ziehbar als Hintergrund zu Ihrem Textview:

<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> 
<item> 
    <shape android:shape="rectangle"> 
     <solid android:color="@android:color/holo_red_dark" /> 

    </shape> 
</item> 

<item android:bottom="2dp"> 
    <shape android:shape="rectangle"> 
     <solid android:color="#ffffff" /> 
    </shape> 
</item> 

</layer-list>