All Projects → Tailyou → OkDialog

Tailyou / OkDialog

Licence: other
通用Dialog,适用于ProgressDialog,BuilderDialog,可以设置字体、进入退出动画等。

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to OkDialog

ngx-modal
Dynamic modal dialog for Angular
Stars: ✭ 54 (+260%)
Mutual labels:  dialog
TaskDialog
.NET implementation of the Windows Task Dialog.
Stars: ✭ 48 (+220%)
Mutual labels:  dialog
Dialog-KoELECTRA
ELECTRA기반 한국어 대화체 언어모델
Stars: ✭ 38 (+153.33%)
Mutual labels:  dialog
Licenser
An android library to display the licenses of your application libraries in a easy way.
Stars: ✭ 75 (+400%)
Mutual labels:  dialog
AVSD-DSTC10 Official
Audio Visual Scene-Aware Dialog (AVSD) Challenge at the 10th Dialog System Technology Challenge (DSTC)
Stars: ✭ 22 (+46.67%)
Mutual labels:  dialog
ContrastiveLearning4Dialogue
The codebase for "Group-wise Contrastive Learning for Neural Dialogue Generation" (Cai et al., Findings of EMNLP 2020)
Stars: ✭ 54 (+260%)
Mutual labels:  dialog
DSTC6-End-to-End-Conversation-Modeling
DSTC6: End-to-End Conversation Modeling Track
Stars: ✭ 56 (+273.33%)
Mutual labels:  dialog
dbas
Welcome to D-BAS! This is a prototype of our dialog-based argumentation system.
Stars: ✭ 21 (+40%)
Mutual labels:  dialog
android-versioninfo
A version info widget for Android. Material style.
Stars: ✭ 21 (+40%)
Mutual labels:  dialog
JavaUltimateTools
A Large Repository Of Awesome Code For Java.
Stars: ✭ 24 (+60%)
Mutual labels:  dialog
AudioVisualSceneAwareDialog
No description or website provided.
Stars: ✭ 22 (+46.67%)
Mutual labels:  dialog
TheBashMenu
A useful bash script allowing you to easily create your own menu, which uses the directional keys! Quickly add your title, options and commands and you're good to go!
Stars: ✭ 52 (+246.67%)
Mutual labels:  dialog
soloalert
A customizable lightweight Alert Library with Material UI and awesome features.
Stars: ✭ 18 (+20%)
Mutual labels:  dialog
opensnips
Open source projects related to Snips https://snips.ai/.
Stars: ✭ 50 (+233.33%)
Mutual labels:  dialog
CustomPermissionsDialogue
Custom Permissions Dialogue is the only permissions library that supports ALL permission request scenarios. This library handles multiple edge cases such as not enabling all permissions or permanently rejecting a permission request.
Stars: ✭ 51 (+240%)
Mutual labels:  dialog
react-native-wxui
A UI package for React Native
Stars: ✭ 21 (+40%)
Mutual labels:  dialog
ak-vue3
组件库包含了 AutoForm 自动表单、BackTop 返回顶部、Breadcrumb 面包屑、 Button 按钮、Cascader 级联选择器、Checkbox 多选框、Collapse 折叠面板、ColorPicker 颜色选择器、DataPicker 时间选择器、Dialog 弹层对话框、Alert 弹框、Echarts 图形图表、Form 表单、Input 输入框、Lazy 图片延时加载、Loading 加载等待、Menu 菜单、Pagination 分页、Progress 进度条、Radio 单选框、Select 选择器、Steps 步骤条、Swiper 图片轮播、Switch 开关、Table 表格、Tabs 标签页、Textarea 文本框、Tooltip 提示、Tr…
Stars: ✭ 24 (+60%)
Mutual labels:  dialog
Alertism
A Good Replacement For Default JavaScript Alerts Which Also Makes Good Pop-Ups
Stars: ✭ 19 (+26.67%)
Mutual labels:  dialog
inkling
Limited Rust implementation of the Ink markup/scripting language for game narratives
Stars: ✭ 22 (+46.67%)
Mutual labels:  dialog
FRDialog
用Builder模式重新打造一个dialog
Stars: ✭ 86 (+473.33%)
Mutual labels:  dialog

一、概述

通用Dialog,适用于ProgressDialog,BuilderDialog,可以设置字体、进入退出动画。

二、版本

OkDialog已上传jcenter,直接在gradle中添加依赖即可。 compile 'com.hengda.zwf:OkDialog:0.0.1'

三、效果

1、ProgressDialog补间动画

2、ProgressDialog帧动画

3、BuilderDialog默认布局

4、BuilderDialog自定义布局

四、使用

此处以BuilderDialog自定义布局为例,简单介绍说使用,具体用法参见demo。 地址:https://github.com/Tailyou/OkDialog

    /**
     * 该方法通过提取文字参数和点击事件可以继续封装
     *
     * @author 祝文飞(Tailyou)
     * @time 2017/2/6 9:37
     */
    private void showCustomDlg() {
        HDialogBuilder hDialogBuilder = new HDialogBuilder(mContext);

        View customView = View.inflate(mContext, R.layout.dialog_custom_view_all, null);
        TextView tvTitle = HdTool.getView(customView, R.id.tvTitle);
        TextView tvMsg = HdTool.getView(customView, R.id.tvMsg);
        TextView btnYes = HdTool.getView(customView, R.id.btnYes);
        TextView btnNo = HdTool.getView(customView, R.id.btnNo);
        tvTitle.setText("注销");
        tvMsg.setText("退出账号可能会使连续登录记录归零,确定退出?");
        btnYes.setText("确定退出");
        btnNo.setText("取消");
        btnYes.setOnClickListener(v -> hDialogBuilder.dismiss());
        btnNo.setOnClickListener(v -> hDialogBuilder.dismiss());

        hDialogBuilder.setCustomView(customView)
                .dlgColor(Color.TRANSPARENT)
                .cancelable(false)
                .show();
    }

封装后:

    private void showCustomDlg(String title, String msg, String txtYes, String txtNo,
                               DialogClickListener dialogClickListener) {
        hDialogBuilder = new HDialogBuilder(mContext);

        View customView = View.inflate(mContext, R.layout.dialog_custom_view_all, null);
        TextView tvTitle = HdTool.getView(customView, R.id.tvTitle);
        TextView tvMsg = HdTool.getView(customView, R.id.tvMsg);
        TextView btnYes = HdTool.getView(customView, R.id.btnYes);
        TextView btnNo = HdTool.getView(customView, R.id.btnNo);
        tvTitle.setText(title);
        tvMsg.setText(msg);
        btnYes.setText(txtYes);
        btnNo.setText(txtNo);
        btnYes.setOnClickListener(v -> dialogClickListener.p());
        btnNo.setOnClickListener(v -> dialogClickListener.n());

        hDialogBuilder.setCustomView(customView)
                        .dlgColor(Color.TRANSPARENT)
                        .cancelable(false)
                        .show();
    }

封装好之后,可以写到工具类中供直接调用.

/**
 * 作者:Tailyou (祝文飞)
 * 时间:2016/5/26 19:03
 * 邮箱:[email protected]
 * 描述:Dialog工具类
 */
public class DialogCenter {

    private static HDialogBuilder hDialogBuilder;

    /**
     * 封装好的方法可以写到DialogCenter工具类中,供直接调用
     *
     * @author 祝文飞(Tailyou)
     * @time 2017/2/6 9:39
     */
    public static void showCustomDlg(Context mContext, String title, String msg, String txtYes, String txtNo,
                               DialogClickListener dialogClickListener) {
        hideDialog();
        hDialogBuilder = new HDialogBuilder(mContext);

        View customView = View.inflate(mContext, R.layout.dialog_custom_view_all, null);
        TextView tvTitle = HdTool.getView(customView, R.id.tvTitle);
        TextView tvMsg = HdTool.getView(customView, R.id.tvMsg);
        TextView btnYes = HdTool.getView(customView, R.id.btnYes);
        TextView btnNo = HdTool.getView(customView, R.id.btnNo);
        tvTitle.setText(title);
        tvMsg.setText(msg);
        btnYes.setText(txtYes);
        btnNo.setText(txtNo);
        btnYes.setOnClickListener(v -> dialogClickListener.p());
        btnNo.setOnClickListener(v -> dialogClickListener.n());

        hDialogBuilder.setCustomView(customView)
                        .dlgColor(Color.TRANSPARENT)
                        .cancelable(false)
                        .show();
    }

    /**
     * 隐藏Dialog
     */
    public static void hideDialog() {
        if (hDialogBuilder != null) {
            hDialogBuilder.dismiss();
            hDialogBuilder = null;
        }
    }

}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].