converting EditText input into a string

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

converting EditText input into a string

Postby AndroidMafia » Tue Sep 21, 2010 11:56 am

Is there anyway you can typecast or convert the EditText input into a string? I'm trying to write a simple is palindrome app for android. In java I just had it cut the string in half, compare each half, then return true or false. If it returned true it would print "Yes, it is a palindrome"
AndroidMafia
Freshman
Freshman
 
Posts: 2
Joined: Tue Sep 21, 2010 11:41 am

Top

Re: converting EditText input into a string

Postby dv297 » Wed Sep 22, 2010 4:35 am

Try getText().toString(), I'm assuming you know how to cut the string after that.
dv297
Once Poster
Once Poster
 
Posts: 1
Joined: Sun Sep 05, 2010 11:22 pm

Re: converting EditText input into a string

Postby AndroidMafia » Sun Sep 26, 2010 2:31 pm

Yes I do, I'll give it a try. thanks dv297
AndroidMafia
Freshman
Freshman
 
Posts: 2
Joined: Tue Sep 21, 2010 11:41 am

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests