android 一個有漂亮動畫效果的Dialog
阿新 • • 發佈:2019-01-09
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();