- Home /
Question by
Novi-Novi · Jun 12, 2017 at 11:22 AM ·
uiinputfield
Trailing spaces in passwords in InputField gets deleted on Android
I want to create a password input field on an Android app. The problem is that if I type in some text with spaces at the end then when I press "ok" or the tick on the android keyboard then the trailing spaces gets removed. I want to be able to type spaces at the end of the passwords.
Note that this doesn't happen on the Unity editor or on a windows build.
Here is the code I have created to demonstrate this:
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class Test : MonoBehaviour {
void Start () {
InputField field = GetComponent<InputField>();
field.contentType = InputField.ContentType.Password;
}
}
Comment
Your answer

Follow this Question
Related Questions
Android Keyboard Stuck / Won't Hide? 1 Answer
UI InputField Undo Redo 0 Answers
How can I block Copy Paste from Input Field? 3 Answers
Input Fields not actually taking in user data on android build 0 Answers