当前位置: 首页>>代码示例>>Java>>正文


Java EasyAlertDialogHelper.createOkCancelDiolag方法代码示例

本文整理汇总了Java中com.netease.nim.uikit.common.ui.dialog.EasyAlertDialogHelper.createOkCancelDiolag方法的典型用法代码示例。如果您正苦于以下问题:Java EasyAlertDialogHelper.createOkCancelDiolag方法的具体用法?Java EasyAlertDialogHelper.createOkCancelDiolag怎么用?Java EasyAlertDialogHelper.createOkCancelDiolag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.netease.nim.uikit.common.ui.dialog.EasyAlertDialogHelper的用法示例。


在下文中一共展示了EasyAlertDialogHelper.createOkCancelDiolag方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showReDownloadConfirmDlg

import com.netease.nim.uikit.common.ui.dialog.EasyAlertDialogHelper; //导入方法依赖的package包/类
private void showReDownloadConfirmDlg(final IMMessage message) {
    EasyAlertDialogHelper.OnDialogActionListener listener = new EasyAlertDialogHelper.OnDialogActionListener() {

        @Override
        public void doCancelAction() {
        }

        @Override
        public void doOkAction() {
            // 正常情况收到消息后附件会自动下载。如果下载失败,可调用该接口重新下载
            if (message.getAttachment() != null && message.getAttachment() instanceof FileAttachment)
                NIMClient.getService(ChatRoomService.class).downloadAttachment((ChatRoomMessage) message, true);
        }
    };

    final EasyAlertDialog dialog = EasyAlertDialogHelper.createOkCancelDiolag(container.activity, null,
            container.activity.getString(R.string.repeat_download_message), true, listener);
    dialog.show();
}
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:20,代码来源:ChatRoomMsgListPanel.java

示例2: showConfirmButton

import com.netease.nim.uikit.common.ui.dialog.EasyAlertDialogHelper; //导入方法依赖的package包/类
/**
 * 移除群成员确认
 */
private void showConfirmButton() {
    EasyAlertDialogHelper.OnDialogActionListener listener = new EasyAlertDialogHelper.OnDialogActionListener() {

        @Override
        public void doCancelAction() {
        }

        @Override
        public void doOkAction() {
            removeMember();
        }
    };
    final EasyAlertDialog dialog = EasyAlertDialogHelper.createOkCancelDiolag(this, null, getString(R.string.team_member_remove_confirm),
            getString(R.string.remove), getString(R.string.cancel), true, listener);
    dialog.show();
}
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:20,代码来源:AdvancedTeamMemberInfoActivity.java

示例3: showReDownloadConfirmDlg

import com.netease.nim.uikit.common.ui.dialog.EasyAlertDialogHelper; //导入方法依赖的package包/类
private void showReDownloadConfirmDlg(final IMMessage message) {
    EasyAlertDialogHelper.OnDialogActionListener listener = new EasyAlertDialogHelper.OnDialogActionListener() {

        @Override
        public void doCancelAction() {
        }

        @Override
        public void doOkAction() {
            // 正常情况收到消息后附件会自动下载。如果下载失败,可调用该接口重新下载
            if (message.getAttachment() != null && message.getAttachment() instanceof FileAttachment)
                NIMClient.getService(MsgService.class).downloadAttachment(message, true);
        }
    };

    final EasyAlertDialog dialog = EasyAlertDialogHelper.createOkCancelDiolag(container.activity, null,
            container.activity.getString(R.string.repeat_download_message), true, listener);
    dialog.show();
}
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:20,代码来源:MessageListPanelEx.java

示例4: showResendConfirm

import com.netease.nim.uikit.common.ui.dialog.EasyAlertDialogHelper; //导入方法依赖的package包/类
private void showResendConfirm(final IMMessage message, final int index) {
    EasyAlertDialogHelper.OnDialogActionListener listener = new EasyAlertDialogHelper.OnDialogActionListener() {

        @Override
        public void doCancelAction() {
        }

        @Override
        public void doOkAction() {
            resendMessage(message);
        }
    };
    final EasyAlertDialog dialog = EasyAlertDialogHelper.createOkCancelDiolag(container.activity, null,
            container.activity.getString(R.string.repeat_send_message), true, listener);
    dialog.show();
}
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:17,代码来源:MessageListPanelEx.java

示例5: sendVideo

import com.netease.nim.uikit.common.ui.dialog.EasyAlertDialogHelper; //导入方法依赖的package包/类
private void sendVideo() {
    File convertedFile = new File(filename);
    String message = "";
    if (convertedFile.exists()) {
        int b = (int) convertedFile.length();
        int kb = b / 1024;
        float mb = kb / 1024f;
        message += mb > 1 ? getString(R.string.capture_video_size_in_mb, mb) : getString(
                R.string.capture_video_size_in_kb, kb);
        message += getString(R.string.is_send_video);
        if (mb <= 1 && kb < 10) {
            tooShortAlert();
            return;
        }
    }
    EasyAlertDialogHelper.OnDialogActionListener listener = new EasyAlertDialogHelper.OnDialogActionListener() {

        @Override
        public void doCancelAction() {
            cancelRecord();
        }

        @Override
        public void doOkAction() {
            Intent intent = new Intent();
            intent.putExtra("duration", duration);
            setResult(RESULT_OK, intent);
            finish();
        }
    };

    final EasyAlertDialog dialog = EasyAlertDialogHelper.createOkCancelDiolag(this, null, message, true, listener);

    if (!isFinishing() && !destroyed) {
        dialog.show();
    }
}
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:38,代码来源:CaptureVideoActivity.java

示例6: onRemoveFriend

import com.netease.nim.uikit.common.ui.dialog.EasyAlertDialogHelper; //导入方法依赖的package包/类
private void onRemoveFriend() {
    Log.i(TAG, "onRemoveFriend");
    if (!NetworkUtil.isNetAvailable(this)) {
        Toast.makeText(UserProfileActivity.this, R.string.network_is_not_available, Toast.LENGTH_SHORT).show();
        return;
    }
    EasyAlertDialog dialog = EasyAlertDialogHelper.createOkCancelDiolag(this, getString(R.string.remove_friend),
            getString(R.string.remove_friend_tip), true,
            new EasyAlertDialogHelper.OnDialogActionListener() {

                @Override
                public void doCancelAction() {

                }

                @Override
                public void doOkAction() {
                    DialogMaker.showProgressDialog(UserProfileActivity.this, "", true);
                    NIMClient.getService(FriendService.class).deleteFriend(account).setCallback(new RequestCallback<Void>() {
                        @Override
                        public void onSuccess(Void param) {
                            DialogMaker.dismissProgressDialog();
                            Toast.makeText(UserProfileActivity.this, R.string.remove_friend_success, Toast.LENGTH_SHORT).show();
                            finish();
                        }

                        @Override
                        public void onFailed(int code) {
                            DialogMaker.dismissProgressDialog();
                            if (code == 408) {
                                Toast.makeText(UserProfileActivity.this, R.string.network_is_not_available, Toast.LENGTH_SHORT).show();
                            } else {
                                Toast.makeText(UserProfileActivity.this, "on failed:" + code, Toast.LENGTH_SHORT).show();
                            }
                        }

                        @Override
                        public void onException(Throwable exception) {
                            DialogMaker.dismissProgressDialog();
                        }
                    });
                }
            });
    if (!isFinishing() && !isDestroyedCompatible()) {
        dialog.show();
    }
}
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:48,代码来源:UserProfileActivity.java


注:本文中的com.netease.nim.uikit.common.ui.dialog.EasyAlertDialogHelper.createOkCancelDiolag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。