Commit 3932760b authored by Grigory Fedorov's avatar Grigory Fedorov

ChatViewerFragment: keyboard not shown automatically.

parent 888a2529
...@@ -615,6 +615,10 @@ public class ChatViewerFragment extends Fragment { ...@@ -615,6 +615,10 @@ public class ChatViewerFragment extends Fragment {
public void setInputFocus() { public void setInputFocus() {
inputView.requestFocus(); inputView.requestFocus();
if (getActivity() != null) {
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(inputView.getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY);
}
} }
public void setInputText(String text) { public void setInputText(String text) {
......
...@@ -54,8 +54,8 @@ ...@@ -54,8 +54,8 @@
<EditText <EditText
android:id="@+id/chat_input" android:id="@+id/chat_input"
android:layout_weight="1" android:layout_weight="1"
android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine" android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
android:imeOptions="actionSend|flagNoEnterAction" android:imeOptions="actionSend|flagNoEnterAction"
android:cursorVisible="true" android:cursorVisible="true"
android:hint="@string/chat_input_hint" android:hint="@string/chat_input_hint"
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
android:maxLines="5" android:maxLines="5"
android:scrollbars="vertical" android:scrollbars="vertical"
android:fadingEdge="vertical" android:fadingEdge="vertical"
android:focusable="true"
android:descendantFocusability="beforeDescendants"
/> />
<Button <Button
android:text="@string/chat_send" android:text="@string/chat_send"
......
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