Author Topic: How can I navigate through all my text fields with the "Next/done"?iOS/Android  (Read 1645 times)

tux83

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Hi everyone, i have to create a subscription form for iOS/Android, but
How can I navigate through all my text fields with the "Next/done" Button on the iPhone/android Keyboard?

it's possibile?

thank you




ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Your UIInput will receive an OnSubmit notification you can subscribe to (UIInput.onSubmit). Simply select the next field in line.
  1. using UnityEngine;
  2.  
  3. public class SelectNext : MonoBehaviour
  4. {
  5.     public GameObject next;
  6.  
  7.     void Awake ()
  8.     {
  9.         var input = GetComponent<UIInput>();
  10.         EventDelegate.Set(input.onSubmit, delegate () { UICamera.selectedObject = next; });
  11.     }
  12. }

tux83

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
ok! but the keyboard is reset for each field . :-\

I can change the label of it's done?("next", "connect").

thanks


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
I don't know about that. That's iOS, not NGUI.