Skip to content

cyynf/dialog_library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dialog_library

仿IOS对话框:


   new AlertDialog(this)
  .builder()
  .setTitle("提示")
  .setMsg("要放弃编辑的内容吗?")
  .setPositiveButton("确认放弃", new View.OnClickListener() {
       @Override
       public void onClick(View v) {
                           
       }
    })
  .setNegativeButton("取消", new View.OnClickListener() {
       @Override
       public void onClick(View v) {

       }
    })
  .show();
 new ActionSheetDialog(MenuActivity.this)
                       .builder()
                       .setTitle("注销后需要重新登录,确认要注销吗?")
                       .setCancelable(false)
                       .setCanceledOnTouchOutside(false)
                       .addSheetItem("确认", ActionSheetDialog.SheetItemColor.Red
                               , new ActionSheetDialog.OnSheetItemClickListener() {
                                   @Override
                                   public void onClick(int which) {
                                      
                                   }
                               }).show();
ActionSheetDialog.OnSheetItemClickListener onSheetItemClickListener = new ActionSheetDialog.OnSheetItemClickListener() {
           @Override
           public void onClick(int which) {
              
       };
                               
 ActionSheetDialog actionSheetDialog = new ActionSheetDialog(MainActivity.this)
                       .builder();
               actionSheetDialog.setCancelable(false)
                       .setCanceledOnTouchOutside(false);
               actionSheetDialog.addSheetItem(""), ActionSheetDialog.SheetItemColor.Blue
                           , onSheetItemClickListener);
               actionSheetDialog.addCancelListener(new ActionSheetDialog.OnCancelListener() {
                   @Override
                   public void onCancel() {
                     
                   }
               });
               actionSheetDialog.show();

动画加载对话框:


//初始化对话框<br>
ShapeLoadingDialog loadingDialog = new ShapeLoadingDialog(this);
loadingDialog.setLoadingText("加载中...");
//显示       
 loadingDialog.show();
 //隐藏
 loadingDialog.dismiss();

旋转加载对话框:


 CustomProgress diaog;
 diaog = CustomProgress.show(this, "加载中...", true, null);
 diaog.dismiss();

About

Android/安卓仿IOS风格对话框,动画加载对话框

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages