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
...@@ -41,6 +41,12 @@ public abstract class AbstractAddRoomDialogFragment extends RxAppCompatDialogFra ...@@ -41,6 +41,12 @@ public abstract class AbstractAddRoomDialogFragment extends RxAppCompatDialogFra
realmHelper = RealmStore.get(hostname); realmHelper = RealmStore.get(hostname);
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) {
......
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