I agree with Treking and recommend using a dialog.  You can build one with 
your own layout and make it similar to a toast without any buttons.  Then 
setup a handler and a runnable to make it disappear 
after a length of time.  You can also use the runnable to activate 
keystrokes to the activity once the dialog is gone.


Hope this helps,
George

On Wednesday, January 23, 2013 2:04:57 AM UTC-5, Revathi Ramanan wrote:
>
> Hi All,
>
> I trigger a toast message when a wrong number is entered by user in Edit 
> Text box.
> The toast duration is Toast.LENGTH_LONG.
>
> My requirement is till the Toast is shown to the user, no Keys should be 
> accepted by Edit Text.
>
> For this, I am trying the below thing.
> I am starting a thread and in the run() of Thread, I am calling 
> sleep(Toast.LENGTH_LONG).
>
> In the onKeyUp() of the activity, I am checking whether Thread is alive.
>
> All the time thread state is returned as TERMINATED and isAlive() is 
> returned as false.
>
> I want a way for the activity not to take any keys till my toast is alive.
>
> Any help would be really appreciated.
>
> Thanks,
> Revathi
>

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

Reply via email to