File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes Underlining Edit Text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Underlining Edit Text " Watch "Underlining Edit Text " New topic
Author

Underlining Edit Text

Sahil Reddy
Ranch Hand

Joined: Jan 24, 2011
Posts: 145
Hello Pals

I want to set text in Edit box as Underline , so that when user types anything in Edit text box, it appears as Underlined.

For instance when i setTextSize(26); , when user types anything it shows text in size =26. Now i want to achieve the same thing for Underlining.

Regards
Mario Alcantara
Greenhorn

Joined: Mar 29, 2011
Posts: 16
You need an object of type Editable, this object will store the text that the user typed and also need an objecto of type StyleSpan. The StyleSpan class allow you use different styles over your EditText component, here a very small example:




Sorry, my english isn't good
source: http://www.sgoliver.net/blog/?p=1373
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Underlining Edit Text
 
Similar Threads
Validation
OnChange Event
How do I use a popup box in Java?
Javascript
Dynamic data within a tab using JSP