# ZJDialog **Repository Path**: da0ke/ZJDialog ## Basic Information - **Project Name**: ZJDialog - **Description**: 已迁移至https://gitee.com/da0ke/yhandroid - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-05-08 - **Last Updated**: 2023-10-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: 废弃 ## README # 已迁移至https://gitee.com/da0ke/yhandroid # ZJDialog [![](https://jitpack.io/v/com.gitee.da0ke/ZJDialog.svg)](https://jitpack.io/#com.gitee.da0ke/ZJDialog) #### 介绍 对话框相关的工具类,如:toast、alert、confirm、loading等。 #### 安装教程 1. Add it in your root build.gradle at the end of repositories: ``` allprojects { repositories { ... maven { url 'https://www.jitpack.io' } } } ``` 2. Add the dependency ``` dependencies { implementation 'com.gitee.da0ke:ZJDialog:Tag' } ``` #### 使用说明 1. ZJLoading ``` public abstract class BaseActivity extends Activity { private Dialog loadingDialog; protected void showLoading() { if (loadingDialog == null) { loadingDialog = ZJLoading.with(this).create(); } loadingDialog.show(); } protected void hideLoading() { if (loadingDialog != null && loadingDialog.isShowing()) { loadingDialog.dismiss(); } } } ``` 2. ZJToast ``` ZJToast.with(this).message("我是吐司").createAndShow(); ZJToast.with(this).message("我是吐司").bgColor(Color.MAGENTA).createAndShow(); ``` 3. ZJAlert ``` ZJAlert.with(this) .title("标题") .message("测试消息") .cancelable(true) .onClickPositiveListener(() -> {}) .createAndShow(); ``` 4. ZJConfirm ``` ZJConfirm.with(this).title("标题") .cancelable(true) .message("测试消息") .positive("确定") .negative("取消") .onClickPositiveListener(() -> {}) .onClickNegativeListener(() -> {}) .createAndShow(); ```