mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-18 03:48:08 +00:00
Fix chat view with keyboard open
This commit is contained in:
parent
cfee8b20e6
commit
880a546724
1 changed files with 8 additions and 1 deletions
|
|
@ -110,6 +110,7 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
private Address mRemoteSipAddress, mRemoteParticipantAddress;
|
||||
private ChatRoom mChatRoom;
|
||||
private ArrayList<LinphoneContact> mParticipants;
|
||||
private LinearLayout mTopBar;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
|
|
@ -125,6 +126,8 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
mInflater = inflater;
|
||||
View view = inflater.inflate(R.layout.chat, container, false);
|
||||
|
||||
mTopBar = view.findViewById(R.id.top_bar);
|
||||
|
||||
LinphoneActivity.instance().hideTabBar(true);
|
||||
|
||||
mSelectionHelper = new ListSelectionHelper(view, this);
|
||||
|
|
@ -252,7 +255,7 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
|
||||
addVirtualKeyboardVisiblityListener();
|
||||
// Force hide keyboard
|
||||
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
||||
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
InputMethodManager inputMethodManager = (InputMethodManager) getActivity().getSystemService(INPUT_METHOD_SERVICE);
|
||||
if (getActivity().getCurrentFocus() != null) {
|
||||
inputMethodManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);
|
||||
|
|
@ -446,10 +449,14 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
|
||||
public void showKeyboardVisibleMode() {
|
||||
LinphoneActivity.instance().hideTabBar(true);
|
||||
LinphoneActivity.instance().hideStatusBar();
|
||||
mTopBar.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void hideKeyboardVisibleMode() {
|
||||
LinphoneActivity.instance().hideTabBar(false);
|
||||
LinphoneActivity.instance().showStatusBar();
|
||||
mTopBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue