fixed crashing when pressing OK in the language search field
This commit is contained in:
parent
231f4e608e
commit
d99e930fda
1 changed files with 13 additions and 0 deletions
|
|
@ -2,13 +2,17 @@ package io.github.sspanak.tt9.preferences.screens.languageSelection;
|
|||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.widget.EditText;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import io.github.sspanak.tt9.R;
|
||||
import io.github.sspanak.tt9.preferences.items.ItemTextInput;
|
||||
|
||||
public class PreferenceSearchLanguage extends ItemTextInput {
|
||||
|
|
@ -31,6 +35,15 @@ public class PreferenceSearchLanguage extends ItemTextInput {
|
|||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull PreferenceViewHolder holder) {
|
||||
super.onBindViewHolder(holder);
|
||||
EditText editText = holder.itemView.findViewById(R.id.input_text_input_field);
|
||||
if (editText != null) {
|
||||
editText.setImeOptions(EditorInfo.IME_ACTION_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void showNoResultItem(boolean show) {
|
||||
if (noResultItem != null) {
|
||||
noResultItem.setVisible(show);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue