mirror of https://github.com/axmolengine/axmol.git
android supports LOWERCASE_ALL_CHARACTERS
This commit is contained in:
parent
7e1da2188c
commit
93d87ad19e
|
@ -99,6 +99,11 @@ public class Cocos2dxEditBox extends EditText {
|
|||
*/
|
||||
private final int kEditBoxInputFlagInitialCapsAllCharacters = 4;
|
||||
|
||||
/**
|
||||
* Lowercase all characters automatically.
|
||||
*/
|
||||
private final int kEditBoxInputFlagLowercaseAllCharacters = 5;
|
||||
|
||||
private final int kKeyboardReturnTypeDefault = 0;
|
||||
private final int kKeyboardReturnTypeDone = 1;
|
||||
private final int kKeyboardReturnTypeSend = 2;
|
||||
|
@ -243,6 +248,9 @@ public class Cocos2dxEditBox extends EditText {
|
|||
case kEditBoxInputFlagInitialCapsAllCharacters:
|
||||
this.mInputFlagConstraints = InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS;
|
||||
break;
|
||||
case kEditBoxInputFlagLowercaseAllCharacters:
|
||||
this.mInputFlagConstraints = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ public class Cocos2dxEditBoxHelper {
|
|||
final Cocos2dxEditBox editBox = new Cocos2dxEditBox(mCocos2dxActivity);
|
||||
editBox.setFocusable(true);
|
||||
editBox.setFocusableInTouchMode(true);
|
||||
editBox.setInputFlag(4); //kEditBoxInputFlagInitialCapsAllCharacters
|
||||
editBox.setInputFlag(5); //kEditBoxInputFlagLowercaseAllCharacters
|
||||
editBox.setInputMode(6); //kEditBoxInputModeSingleLine
|
||||
editBox.setReturnType(0); //kKeyboardReturnTypeDefault
|
||||
editBox.setHintTextColor(Color.GRAY);
|
||||
|
|
Loading…
Reference in New Issue