requestFocus() not working properly

This is a discussion on requestFocus() not working properly within the Beginning Developers forums, part of the Android Development category; I have got two edittext fields accno & amount. When accno is entered & when we leave the field I have put a validation in ...

Results 1 to 2 of 2

Thread: requestFocus() not working properly

  1. #1
    Android Lurker asmitakulkarni's Avatar
    Join Date
    Oct 2011

    requestFocus() not working properly

    I have got two edittext fields accno & amount. When accno is entered & when we leave the field I have put a validation in onFocusChanged() & if the data is not valid I want to display a message & again shift the focus to accno field instead of amount . For that I have used accNo.requestFocus(). But it is not working properly.
    i.e. the accNo field is not being focussed . Only a cursor is shown on that. But we cannot enter any value in accno. If any value is entered it goes in amount field.

  2. is the premier Android Forum. Registered users do not see these ads. .

  3. #2
    App Developer alostpacket's Avatar
    Join Date
    Jan 2011
    31 times
    I've had issues with this as well -- I dont think requestFocus works correctly. You could also try requestFocusInTouchMode I think it's called.

    Another possible work-around would be to make the amount field disabled/hidden until the account field is verified... Not the best solution but maybe it helps

Remove Ads

Sponsored Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. Arabic not shown properly
    By labid in forum Android Forum
    Replies: 0
    Last Post: 09-05-2011, 10:51 PM
  2. my new tab is not working
    By sabena@android in forum Introductions & Site Assistance
    Replies: 4
    Last Post: 05-29-2011, 11:59 PM
  3. Redbox App Not Working
    By mmitsch in forum HTC EVO 4G
    Replies: 2
    Last Post: 01-29-2011, 07:32 PM
  4. tty not working
    By les shamel in forum Motorola Droid X
    Replies: 2
    Last Post: 01-29-2011, 04:48 PM

Search tags for this page

android edittext request focus not working in dialog

android edittext requestfocus


android edittext requestfocus not working

android request focus

android requestfocus

android requestfocus not work

android requestfocus not working

android requestfocus()
edittext requestfocus not working

requestfocus android

requestfocus android not working
requestfocus en android
requestfocus in android
requestfocus not working android
Click on a term to search our sites for related topics.
Android Forum