示例#1
0
  @SuppressLint("UseSparseArrays")
  @Override
  public void onResume() {
    message.addTextChangedListener(textWatcher);
    addVirtualKeyboardVisiblityListener();

    LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
    if (lc != null) {
      lc.addListener(mListener);
    }

    if (LinphoneActivity.isInstanciated()) {
      if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) {
        LinphoneActivity.instance().hideStatusBar();
      }
      LinphoneActivity.instance().updateChatFragment(this);
    }

    String draft = getArguments().getString("messageDraft");
    message.setText(draft);

    remoteComposing.setVisibility(chatRoom.isRemoteComposing() ? View.VISIBLE : View.GONE);
    dispayMessageList();

    super.onResume();
  }
 @Override
 public void isComposingReceived(LinphoneCore lc, LinphoneChatRoom room) {
   if (chatRoom != null
       && room != null
       && chatRoom
           .getPeerAddress()
           .asStringUriOnly()
           .equals(room.getPeerAddress().asStringUriOnly())) {
     remoteComposing.setVisibility(chatRoom.isRemoteComposing() ? View.VISIBLE : View.GONE);
   }
 }