Source:
<code>private void launchEditTagsDialog(final Context context, final AppPojo app) { AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setTitle(context.getResources().getString(R.string.tags_add_title)); <START> @SuppressLint("InflateParams") final View v = LayoutInflater.from(context).inflate(R.layout.tags_dialog, null); <END> final MultiAutoCompleteTextView tagInput = v.findViewById(R.id.tag_input); ArrayAdapter<String> adapter = new ArrayAdapter<>(context, android.R.layout.simple_dropdown_item_1line, KissApplication.getApplication(context).getDataHandler().getTagsHandler().getAllTagsAsArray()); tagInput.setTokenizer(new SpaceTokenizer()); tagInput.setText(appPojo.getTags()); tagInput.setAdapter(adapter); builder.setView(v); builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); app.setTags(tagInput.getText().toString()); KissApplication.getApplication(context).getDataHandler().getTagsHandler().setTags(app.id, app.getTags()); app.displayTags = app.getTags(); String msg = context.getResources().getString(R.string.tags_confirmation_added); Toast.makeText(context, msg, Toast.LENGTH_SHORT).show(); } }); builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); AlertDialog dialog = builder.create(); dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); dialog.show(); }</code><technical_language>before. try **View.inflate** import android.annotation.SuppressLint; @SuppressLint</technical_language>

Target:
private void launchEditTagsDialog(final Context context, final AppPojo app) { AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setTitle(context.getResources().getString(R.string.tags_add_title)); final View v = View.inflate(context, R.layout.tags_dialog, null); final MultiAutoCompleteTextView tagInput = v.findViewById(R.id.tag_input); ArrayAdapter<String> adapter = new ArrayAdapter<>(context, android.R.layout.simple_dropdown_item_1line, KissApplication.getApplication(context).getDataHandler().getTagsHandler().getAllTagsAsArray()); tagInput.setTokenizer(new SpaceTokenizer()); tagInput.setText(appPojo.getTags()); tagInput.setAdapter(adapter); builder.setView(v); builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); app.setTags(tagInput.getText().toString()); KissApplication.getApplication(context).getDataHandler().getTagsHandler().setTags(app.id, app.getTags()); app.displayTags = app.getTags(); String msg = context.getResources().getString(R.string.tags_confirmation_added); Toast.makeText(context, msg, Toast.LENGTH_SHORT).show(); } }); builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); AlertDialog dialog = builder.create(); dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); dialog.show(); }