上面是效果图。
使用方法:
NiftyDialogBuilder dialogBuilder=NiftyDialogBuilder.getInstance(this); dialogBuilder .withTitle("Modal Dialog") .withMessage("This is a modal Dialog.") .show(); 其他配置选项: dialogBuilder .withTitle("Modal Dialog") .withTitleColor("#FFFFFF") .withDividerColor("#11000000") .withMessage("This is a modal Dialog.") .withMessageColor("#FFFFFF") .withIcon(getResources().getDrawable(R.drawable.icon)) .withEffect(effect) .withButton1Text("OK") .withButton2Text("Cancel") .setCustomView(viewresId,context) .setButton1Click(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(v.getContext(),"i'm btn1",Toast.LENGTH_SHORT).show(); } }) .setButton2Click(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(v.getContext(),"i'm btn2",Toast.LENGTH_SHORT).show(); } }) .show(); 下载:※GItHubhttps://github.com/sd6352051/NiftyDialogEffects
如果喜欢这样的效果,也可以看看这个,漂亮的通知栏https://github.com/sd6352051/NiftyNotification
※楼主博客http://gitonway.blog.163.com/
转自:http://www.eoeandroid.com/thread-539079-1-1.html
转载于:https://www.cnblogs.com/jasonkent27/p/4098467.html
相关资源:Android自定义对话框Dialog(界面美化)