2

Im trying to resolve a usability problem in my app, im using Xamarin Android but for this question i think we can ignore Xamarin.

I have a list where each ítem has a edittext like a counter for each ítem.

The user is capable of changing that value by clicking on + and - buttons or directly by writing in the edittext with the softKeyboard.

My problem shows when the user opens the keyboard, change the number, but do not click on done but instead just close the keyboard using the backbutton.

Im using something like this to get the counter change.

editCount.EditorAction += delegate (object sender, TextView.EditorActionEventArgs e) {
            if (e.ActionId == Android.Views.InputMethods.ImeAction.Done)
            {

Of course, thats not being called if the user simply close the keyboard instead of hitting done.

I know i could use TextChanged instead of EditorAction but it will be a real nightmare to make those changes to this app...

Just forcing the user to hit the done button to close the keyboard should be enought, much better if i can restore the previous value of the edittext in case they just close the keyboard.

How can i achieve something like this?

Nanoc
  • 2,381
  • 1
  • 20
  • 35

0 Answers0