APIdia Launch Partner
Top Inners Fields Constructors Methods
com.badlogic.gdx.input

public Class NativeInputConfiguration

extends Object
Class Inheritance
Imports
com.badlogic.gdx.Input

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Modifier and TypeField and Description
private String[]
private NativeInputConfiguration.NativeInputCloseCallback
private boolean
private boolean
private int
private String
private boolean
private boolean
private TextInputWrapper
private Input.OnscreenKeyboardType
private Input.InputStringValidator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String[]
public NativeInputConfiguration.NativeInputCloseCallback
public int
public String
public TextInputWrapper
public Input.OnscreenKeyboardType
public Input.InputStringValidator
public boolean
public boolean
public boolean
public boolean
public NativeInputConfiguration
setAutoComplete(String[] autoComplete)

Sets a list of autocompletable strings to present the user while typing

public NativeInputConfiguration
setCloseCallback(NativeInputConfiguration.NativeInputCloseCallback closeCallback)

Installing a callback for when the native input is closed.

public NativeInputConfiguration
setMaskInput(boolean
Whether to hide the text input while typing (usually for passwords)
maskInput
)

public NativeInputConfiguration
setMaxLength(int
What the text length limit should be. -1 for no max length
maxLength
)

public NativeInputConfiguration
setMultiLine(boolean
whether the keyboard should accept multiple lines.
multiLine
)

public NativeInputConfiguration
setPlaceholder(String
String to show, if nothing is inputted yet.
placeholder
)

public NativeInputConfiguration
setPreventCorrection(boolean
Disable autocomplete/correction
preventCorrection
)

public NativeInputConfiguration
setShowUnmaskButton(boolean
Whether to show a button to show unhidden password
showUnmaskButton
)

public NativeInputConfiguration
setTextInputWrapper(TextInputWrapper
Should provide access to the backed input field.
textInputWrapper
)

public NativeInputConfiguration
setType(Input.OnscreenKeyboardType
which type of keyboard we wish to display.
type
)

public NativeInputConfiguration
setValidator(Input.InputStringValidator
Can validate the input from the keyboard and reject.
validator
)

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

autoCompleteback to summary
private String[] autoComplete
closeCallbackback to summary
private NativeInputConfiguration.NativeInputCloseCallback closeCallback
isMultiLineback to summary
private boolean isMultiLine
maskInputback to summary
private boolean maskInput
maxLengthback to summary
private int maxLength
placeholderback to summary
private String placeholder
preventCorrectionback to summary
private boolean preventCorrection
showUnmaskButtonback to summary
private boolean showUnmaskButton
textInputWrapperback to summary
private TextInputWrapper textInputWrapper
typeback to summary
private Input.OnscreenKeyboardType type
validatorback to summary
private Input.InputStringValidator validator

Constructor Detail

NativeInputConfigurationback to summary
public NativeInputConfiguration()

Method Detail

getAutoCompleteback to summary
public String[] getAutoComplete()
getCloseCallbackback to summary
public NativeInputConfiguration.NativeInputCloseCallback getCloseCallback()
getMaxLengthback to summary
public int getMaxLength()
getPlaceholderback to summary
public String getPlaceholder()
getTextInputWrapperback to summary
public TextInputWrapper getTextInputWrapper()
getTypeback to summary
public Input.OnscreenKeyboardType getType()
getValidatorback to summary
public Input.InputStringValidator getValidator()
isMaskInputback to summary
public boolean isMaskInput()
isMultiLineback to summary
public boolean isMultiLine()
isPreventCorrectionback to summary
public boolean isPreventCorrection()
isShowUnmaskButtonback to summary
public boolean isShowUnmaskButton()
setAutoCompleteback to summary
public NativeInputConfiguration setAutoComplete(String[] autoComplete)

Sets a list of autocompletable strings to present the user while typing

setCloseCallbackback to summary
public NativeInputConfiguration setCloseCallback(NativeInputConfiguration.NativeInputCloseCallback closeCallback)

Installing a callback for when the native input is closed. See NativeInputCloseCallback for more information

setMaskInputback to summary
public NativeInputConfiguration setMaskInput(boolean maskInput)
Parameters
maskInput:boolean

Whether to hide the text input while typing (usually for passwords)

setMaxLengthback to summary
public NativeInputConfiguration setMaxLength(int maxLength)
Parameters
maxLength:int

What the text length limit should be. -1 for no max length

setMultiLineback to summary
public NativeInputConfiguration setMultiLine(boolean multiLine)
Parameters
multiLine:boolean

whether the keyboard should accept multiple lines.

setPlaceholderback to summary
public NativeInputConfiguration setPlaceholder(String placeholder)
Parameters
placeholder:String

String to show, if nothing is inputted yet.

setPreventCorrectionback to summary
public NativeInputConfiguration setPreventCorrection(boolean preventCorrection)
Parameters
preventCorrection:boolean

Disable autocomplete/correction

setShowUnmaskButtonback to summary
public NativeInputConfiguration setShowUnmaskButton(boolean showUnmaskButton)
Parameters
showUnmaskButton:boolean

Whether to show a button to show unhidden password

setTextInputWrapperback to summary
public NativeInputConfiguration setTextInputWrapper(TextInputWrapper textInputWrapper)
Parameters
textInputWrapper:TextInputWrapper

Should provide access to the backed input field.

setTypeback to summary
public NativeInputConfiguration setType(Input.OnscreenKeyboardType type)
Parameters
type:Input.OnscreenKeyboardType

which type of keyboard we wish to display.

setValidatorback to summary
public NativeInputConfiguration setValidator(Input.InputStringValidator validator)
Parameters
validator:Input.InputStringValidator

Can validate the input from the keyboard and reject.

validateback to summary
public void validate()
com.badlogic.gdx.input back to summary

public Interface NativeInputConfiguration.NativeInputCloseCallback


Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

Whether the keyboard should be kept open to be opened again soon. e.g. when advancing through multiple text fields
onClose
(boolean
Whether the way the keyboard was closed can be considered a confirmative action e.g. to advance the UI
confirmativeAction
)

This will be called on the main thread, when the closing of a native input is processed.

Method Detail

onCloseback to summary
public boolean onClose(boolean confirmativeAction)

This will be called on the main thread, when the closing of a native input is processed. This does not mean, that the keyboard is already hidden. You can schedule a new `openTextInputField` call here.

Parameters
confirmativeAction:boolean

Whether the way the keyboard was closed can be considered a confirmative action e.g. to advance the UI

Returns:boolean

Whether the keyboard should be kept open to be opened again soon. e.g. when advancing through multiple text fields