how to underline to Textview

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

how to underline to Textview

Postby nbagade » Fri Jan 22, 2010 1:28 pm

Hi,
I want to show the underline below the textview.Like,

text
----

how to do that.
help is needed.
Thanks
nbagade
Experienced Developer
Experienced Developer
 
Posts: 58
Joined: Fri Nov 20, 2009 7:49 am
Location: India

Top

Postby Stam » Fri Jan 22, 2010 6:06 pm

Hi,

I know the strings.xml method to do that, but I know you can do that with some Spannable things (check dev.google for that solution)

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3.  
  4. <resources>
  5.  
  6.     <string name="underlineText"> This <u>test</u> is so cool</string>
  7.  
  8. </resources>
  9.  
  10.  
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


And in your xml :

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <TextView android:layout_width="wrap_content"
  3.  
  4.         android:layout_height="wrap_content"
  5.  
  6.         android:text="@string/underlineText" />
  7.  
  8.  
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


the <u></u> will underline your text (in the same way, you have <b> to bold, <i></i> italic, etc.)
Stam
Junior Developer
Junior Developer
 
Posts: 22
Joined: Wed Nov 25, 2009 1:49 pm
Location: Lille, France

Postby nbagade » Fri Jan 22, 2010 6:37 pm

but I want Textview should be underline
nbagade
Experienced Developer
Experienced Developer
 
Posts: 58
Joined: Fri Nov 20, 2009 7:49 am
Location: India

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 6 guests