0

I am following this tutorial on creating basic pin code screens: http://lomza.totem-soft.com/pin-input-view-in-android/

I'm just stucked because I don't know how I would call another activity after the Pin code screen has been shown. I'm thinking that there's a button but I don't know where in the code exactly I would be putting the listener.

I just started studying android development so I'm not really familiar with it. Any response would be appreciated.

Harold Decapia
  • 375
  • 1
  • 8
  • 23

2 Answers2

1

@Senya is correct, the tutorial is pretty much basic stuff, there's no Button provided and you should add one yourself if you really want one.

However the whole point of a pin is quick access for the user so it is better if you don't provide a separate done button but just listen for the keys in onKey() method and verify the pin as correct, and you can launch your Activity if it is.

Abbas
  • 3,529
  • 5
  • 36
  • 64
0

In the tutorial just an example of PIN View without extra logic. You can add Button to layout or set listener to EditText for EditorInfo.IME_ACTION_DONE if you want.

Update: in this case listener should be added to the last EditText.

CeH9
  • 372
  • 5
  • 11