Hi !! Reading and writing to a EditText widget is simple. For reading
text use gF.gettext() and if you want to convert to string then use
gF.gettext().tostring(). Else for writing to a edittext use
sF.settext() function.
I am also a newbie so not clear how to automatically call the validate
function when you move from gF to next textbox but up to my knowledge
you need to code the validation criteria in  the lostfocus() function
of gF edittext. Once done its simple. If validation fails than display
error using 'AlertDialog' object and set up a message you want to
display. Search for it or else i'll send you a example code.

correct me if you find anything wrong :)

Regards,
wahib

On 9/20/09, Rc3375 <rcobb3...@gmail.com> wrote:
>
> hi everyone--
> got questions about android.....
> the MAIN.XML screen has the following items in this order:
> 1.  TextView01
> 2.  EditText (called gF)
> 3.  EditText (called fF)
> 4.  EditText (called sF)
> 5.  EditText (called ttlF)
> 6.  EditText (called nF)
> and at the bottom of the screen, a botton called cB(that performs the
> calculations).
>
> i need to be able to READ and check if the user has entered a valid
> input into the first  field(gF).  such as a double value/float value
> within a given range( greater than 1.01 and less than 99.98). this
> should not be an integer.  if that number is not within that range,
> change the TextView01(string) informing the user what that range
> should be(i.e "Please enter a value between 1.00 and 99.99").  pause
> xx seconds, and restore the original text to TextView01.
>
> if  gF is within the allowed range, button cB would/should be ENABLED,
> the user presses it,   the fields(EditText(3 thru 6) would be
> calculated and filled in with whatever those values come out to be.
>
> i have not been able to figure out how to READ what the user entered
> into field(gF), how to PLACE/ASSIGN those values to fields 3-6(once
> the calculations are done), how to get the calculation portion to fire
> up, validate a range, OR change a TextView01(string).
>
> i am at a COMPLETE loss.  can/would anyone be able to help me?  thank
> all of you for your kind attention.  rc3375.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to