Exemplo n.º 1
0
        public void handleMessage(Message msg) {
          switch (msg.what) {
            case UPDATE_COPY_LINK:
              mCopyLinkDialog.dismiss();
              break;
            case UPDATE_RENAME_SHOW:
              int position = msg.getData().getInt("position");
              mRoomData.get(position).setmMeetType2(2);
              mAdapter.notifyDataSetChanged();
              if (mDebug) Log.e(TAG, "UPDATE_RENAME_SHOW");
              break;
            case UPDATE_LISTVIEW_SCROLL:
              mAdapter.notifyDataSetChanged();
              mListView.animate().translationY(-mDy).setDuration(2000);
              break;
            case UPDATE_RENAME_END:
              mAdapter.notifyDataSetChanged();
              if (mDy == 0) mListView.smoothScrollToPositionFromTop(0, 0, 1000);
              else {
                mListView.animate().translationYBy(mDy).setDuration(10);
                mListView.smoothScrollToPositionFromTop(0, 0, 500);
              }
              break;

            default:
              break;
          }
        };
Exemplo n.º 2
0
  /** onActivityResult */
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {

    super.onActivityResult(requestCode, resultCode, data);

    String sign;
    int position;
    String meetingId;

    switch (resultCode) {
      case ExtraType.RESULT_CODE_ROOM_SETTING_MESSAGE_INVITE:
        break;
      case ExtraType.RESULT_CODE_ROOM_SETTING_WEIXIN_INVITE:
        break;
      case ExtraType.RESULT_CODE_ROOM_SETTING_COPY_LINK:
        mCopyLinkDialog = new CopyLinkDialog(this);
        mCopyLinkDialog.show();
        mUIHandler.sendEmptyMessageDelayed(UPDATE_COPY_LINK, 3000);
        break;
      case ExtraType.RESULT_CODE_ROOM_SETTING_NOTIFICATION:
        break;
      case ExtraType.RESULT_CODE_ROOM_SETTING_RENAME:
        mReNameFlag = true;
        sign = TeamMeetingApp.getMyself().getmAuthorization();
        position = data.getIntExtra("position", 0);
        mPosition = position;
        meetingId = data.getStringExtra("meetingId");
        String meetingName = data.getStringExtra("meetingName");
        listViewSetScroll(position);
        Message msg = new Message();
        msg.what = UPDATE_RENAME_SHOW;
        Bundle bundle = new Bundle();
        bundle.putInt("position", position);
        msg.setData(bundle);
        mUIHandler.sendMessageDelayed(msg, 3000);
        // mUIHandler.sendEmptyMessageDelayed(UPDATE_RENAME_SHOW, 5500);

        break;
      case ExtraType.RESULT_CODE_ROOM_SETTING_DELETE:
        sign = TeamMeetingApp.getMyself().getmAuthorization();
        position = data.getIntExtra("position", 0);
        meetingId = data.getStringExtra("meetingId");

        mNetWork.deleteRoom(sign, meetingId);
        mRoomData.remove(position);
        mAdapter.notifyDataSetChanged();

        break;

      default:
        break;
    }
  };