Commit 82b57286 authored by Grigory Fedorov's avatar Grigory Fedorov

Chat: focus is not set on input view by default.

parent ebcde01b
......@@ -14,7 +14,6 @@
*/
package com.xabber.android.ui;
import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
......@@ -372,11 +371,6 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
insertExtraText();
updateRegisteredChats();
Fragment currentFragment = chatViewerAdapter.getCurrentFragment();
if (currentFragment instanceof ChatViewerFragment) {
((ChatViewerFragment)currentFragment).setInputFocus();
}
}
private void insertExtraText() {
......
......@@ -613,14 +613,6 @@ public class ChatViewerFragment extends Fragment {
return this.account.equals(account) && this.user.equals(user);
}
public void setInputFocus() {
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) {
insertText(text);
}
......
......@@ -185,19 +185,6 @@ public class ChatViewerAdapter extends FragmentStatePagerAdapter {
public void onChatViewAdapterFinishUpdate();
}
@Override
public void setPrimaryItem(ViewGroup container, int position, Object object) {
if (getCurrentFragment() != object) {
currentFragment = ((Fragment) object);
}
super.setPrimaryItem(container, position, object);
}
public Fragment getCurrentFragment() {
return currentFragment;
}
public ArrayList<AbstractChat> getActiveChats() {
return activeChats;
}
......
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