I'm writing a process for the user to choose his country. I've an edittext linked to adapter which showing all available options.
In my manifest i set the the activity to
android:windowSoftInputMode="stateAlwaysHidden"
I need to disable the soft keyboard completely.
It works fine except in one condition. if the user perform a long click/press on the editText the keyboard is popping.
Is there a way to permanently disable the keyboard in a specific activity by using code or in the manifest?
my code:
editCountry.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
picker = CountryPicker.newInstance(getString(R.string.select_counrty));
picker.show(getSupportFragmentManager(), "COUNTRY_PICKER");
picker.setListener( new CountryPickerListener() {
@Override
public void onSelectCountry(String name, String code) {
editCountry.setText(name);
picker.dismiss();
}
});
}
});
my manifest:
<activity android:name=".UserSettingPref"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden" >
Thanks