mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 06:01:12 +00:00
Auto show keyboard on add keyword
This commit is contained in:
parent
09a5a8bf0a
commit
c48353ef2c
1 changed files with 8 additions and 2 deletions
|
@ -6844,11 +6844,17 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||||
final long id = getArguments().getLong("id");
|
final long id = getArguments().getLong("id");
|
||||||
|
|
||||||
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_keyword_add, null);
|
final Context context = getContext();
|
||||||
|
final InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
|
||||||
|
View view = LayoutInflater.from(context).inflate(R.layout.dialog_keyword_add, null);
|
||||||
final EditText etKeyword = view.findViewById(R.id.etKeyword);
|
final EditText etKeyword = view.findViewById(R.id.etKeyword);
|
||||||
etKeyword.setText(null);
|
etKeyword.setText(null);
|
||||||
|
|
||||||
return new AlertDialog.Builder(getContext())
|
etKeyword.requestFocus();
|
||||||
|
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
|
||||||
|
|
||||||
|
return new AlertDialog.Builder(context)
|
||||||
.setView(view)
|
.setView(view)
|
||||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue