9月7日测试包 部分修复
This commit is contained in:
@ -499,6 +499,50 @@ public class DialogUtils {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮灰色
|
||||
* @param context
|
||||
* @param title
|
||||
* @param message
|
||||
* @param positive
|
||||
* @param negative
|
||||
* @param cmListener
|
||||
*/
|
||||
|
||||
public static void showAlertDialog(Context context, String title, CharSequence message
|
||||
, String positive, String negative, final ConfirmListener cmListener) {
|
||||
|
||||
AlertDialog alertDialog = new AlertDialog.Builder(context, R.style.GhAlertDialog)
|
||||
.setTitle(title)
|
||||
.setMessage(message)
|
||||
.setPositiveButton(positive, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (cmListener != null) {
|
||||
cmListener.onConfirm();
|
||||
}
|
||||
}
|
||||
})
|
||||
.setNegativeButton(negative, null)
|
||||
.create();
|
||||
alertDialog.show();
|
||||
|
||||
TextView mesage = (TextView) alertDialog.findViewById(android.R.id.message);
|
||||
Button positiveBtn = alertDialog.getButton(android.app.AlertDialog.BUTTON_POSITIVE);
|
||||
Button negativeBtn = alertDialog.getButton(android.app.AlertDialog.BUTTON_NEGATIVE);
|
||||
|
||||
positiveBtn.setTextSize(13);
|
||||
positiveBtn.setTextColor(ContextCompat.getColor(context, R.color.theme));
|
||||
negativeBtn.setTextSize(13);
|
||||
negativeBtn.setTextColor(ContextCompat.getColor(context, R.color.hint));
|
||||
if (mesage != null) {
|
||||
mesage.setTextSize(13);
|
||||
mesage.setTextColor(ContextCompat.getColor(context, R.color.title));
|
||||
mesage.setLineSpacing(1.0f, 1.3f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 特殊:验证手机号码
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user