jadex.android.controlcenter.preference.JadexIntegerPreference Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-runtimetools-android Show documentation
Show all versions of jadex-runtimetools-android Show documentation
The Jadex rules tools package contains
tools for the Jadex active components
infrastructure.
The newest version!
package jadex.android.controlcenter.preference;
import android.content.Context;
import android.text.InputType;
import android.view.View;
import android.widget.EditText;
public class JadexIntegerPreference extends JadexStringPreference {
public JadexIntegerPreference(Context context) {
super(context);
}
@Override
protected View onCreateDialogView() {
View onCreateDialogView = super.onCreateDialogView();
EditText text = getEditText();
text.setInputType(InputType.TYPE_CLASS_NUMBER);
return onCreateDialogView;
}
@Override
public void setValue(Object value) {
// Integer intValue = (Integer) value;
super.setValue("" + value);
}
public int getInt() {
return Integer.parseInt(getText());
}
@Override
protected boolean callChangeListener(Object newValue) {
return super.callChangeListener(Integer.parseInt((String) newValue));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy