Commit 77849b3e authored by HarveyDoom's avatar HarveyDoom Committed by GitHub

Added requestFocus(View view)

requestFocus can be called by child classes to force keyboard to display when a view requests Focus.
parent a3a9c9a2
...@@ -42,6 +42,12 @@ public abstract class AbstractAddRoomDialogFragment extends RxAppCompatDialogFra ...@@ -42,6 +42,12 @@ public abstract class AbstractAddRoomDialogFragment extends RxAppCompatDialogFra
methodCall = new MethodCallHelper(getContext(), hostname); methodCall = new MethodCallHelper(getContext(), hostname);
} }
protected void requestFocus(View view) {
if (view.requestFocus()) {
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
}
}
@Override @Override
public final void setupDialog(Dialog dialog, int style) { public final void setupDialog(Dialog dialog, int style) {
super.setupDialog(dialog, style); super.setupDialog(dialog, style);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment