design part 3
This commit is contained in:
@@ -30,6 +30,8 @@ public class DialogHelper {
|
||||
new MaterialDialog.Builder(context)
|
||||
.title(title)
|
||||
.content(message)
|
||||
.titleColorRes(R.color.red)
|
||||
.contentColorRes(R.color.navy)
|
||||
.positiveText(R.string.ok)
|
||||
.positiveColor(ContextCompat.getColor(context, R.color.colorPrimary))
|
||||
.onPositive(new MaterialDialog.SingleButtonCallback() {
|
||||
@@ -39,6 +41,7 @@ public class DialogHelper {
|
||||
dialog.dismiss();
|
||||
}
|
||||
})
|
||||
.typeface("Quicksand-Medium.ttf", "Quicksand-Regular.ttf")
|
||||
.show();
|
||||
|
||||
}
|
||||
@@ -52,8 +55,11 @@ public class DialogHelper {
|
||||
new MaterialDialog.Builder(context)
|
||||
.title(R.string.alert)
|
||||
.content(content)
|
||||
.titleColorRes(R.color.red)
|
||||
.contentColorRes(R.color.navy)
|
||||
.positiveText(R.string.ok)
|
||||
.positiveColor(ContextCompat.getColor(context, R.color.colorPrimary))
|
||||
.typeface("Quicksand-Medium.ttf", "Quicksand-Regular.ttf")
|
||||
.show();
|
||||
}
|
||||
|
||||
@@ -62,8 +68,11 @@ public class DialogHelper {
|
||||
new MaterialDialog.Builder(BaseActivity.currentActivity)
|
||||
.title(R.string.alert)
|
||||
.content(BaseActivity.currentActivity.getString(R.string.failed))
|
||||
.titleColorRes(R.color.red)
|
||||
.contentColorRes(R.color.navy)
|
||||
.positiveText(R.string.ok)
|
||||
.positiveColor(ContextCompat.getColor(BaseActivity.currentActivity, R.color.colorPrimary))
|
||||
.typeface("Quicksand-Medium.ttf", "Quicksand-Regular.ttf")
|
||||
.show();
|
||||
}
|
||||
|
||||
@@ -72,6 +81,8 @@ public class DialogHelper {
|
||||
new MaterialDialog.Builder(BaseActivity.currentActivity)
|
||||
.title(R.string.alert)
|
||||
.content(BaseActivity.currentActivity.getString(R.string.no_network_message))
|
||||
.titleColorRes(R.color.red)
|
||||
.contentColorRes(R.color.navy)
|
||||
.positiveText(R.string.ok)
|
||||
.positiveColor(ContextCompat.getColor(BaseActivity.currentActivity, R.color.colorPrimary))
|
||||
.onPositive(new MaterialDialog.SingleButtonCallback() {
|
||||
@@ -80,6 +91,7 @@ public class DialogHelper {
|
||||
BaseActivity.currentActivity.finishAffinity();
|
||||
}
|
||||
})
|
||||
.typeface("Quicksand-Medium.ttf", "Quicksand-Regular.ttf")
|
||||
.show();
|
||||
}
|
||||
|
||||
@@ -88,9 +100,12 @@ public class DialogHelper {
|
||||
return;
|
||||
loadingDialog = new MaterialDialog.Builder(BaseActivity.currentActivity)
|
||||
.content(BaseActivity.currentActivity.getString(R.string.loading))
|
||||
.titleColorRes(R.color.red)
|
||||
.contentColorRes(R.color.navy)
|
||||
.cancelable(false)
|
||||
.progress(true, 0)
|
||||
.progressIndeterminateStyle(true)
|
||||
.typeface("Quicksand-Medium.ttf", "Quicksand-Regular.ttf")
|
||||
.show();
|
||||
}
|
||||
|
||||
@@ -107,10 +122,13 @@ public class DialogHelper {
|
||||
new MaterialDialog.Builder(context)
|
||||
.title(R.string.alert)
|
||||
.content(message)
|
||||
.titleColorRes(R.color.red)
|
||||
.contentColorRes(R.color.navy)
|
||||
.positiveText(R.string.ok)
|
||||
.onPositive(positiveButtonCallback)
|
||||
.negativeText(R.string.cancel)
|
||||
.onNegative(negativeButtonCallback)
|
||||
.typeface("Quicksand-Medium.ttf", "Quicksand-Regular.ttf")
|
||||
.show();
|
||||
}
|
||||
|
||||
@@ -119,6 +137,8 @@ public class DialogHelper {
|
||||
new MaterialDialog.Builder(context)
|
||||
.title(R.string.alert)
|
||||
.content(R.string.alert_update_app)
|
||||
.titleColorRes(R.color.red)
|
||||
.contentColorRes(R.color.navy)
|
||||
.positiveText(R.string.update_app)
|
||||
.positiveColor(ContextCompat.getColor(context, R.color.colorPrimary))
|
||||
.cancelable(false)
|
||||
@@ -131,6 +151,7 @@ public class DialogHelper {
|
||||
BaseActivity.currentActivity.finishAffinity();
|
||||
}
|
||||
})
|
||||
.typeface("Quicksand-Medium.ttf", "Quicksand-Regular.ttf")
|
||||
.show();
|
||||
}
|
||||
|
||||
@@ -139,8 +160,11 @@ public class DialogHelper {
|
||||
new MaterialDialog.Builder(BaseActivity.currentActivity)
|
||||
.title(R.string.app_name)
|
||||
.content(message)
|
||||
.titleColorRes(R.color.red)
|
||||
.contentColorRes(R.color.navy)
|
||||
.positiveText(R.string.ok)
|
||||
.onPositive(singleButtonCallback)
|
||||
.typeface("Quicksand-Medium.ttf", "Quicksand-Regular.ttf")
|
||||
.show();
|
||||
}
|
||||
|
||||
@@ -151,6 +175,8 @@ public class DialogHelper {
|
||||
new MaterialDialog.Builder(context)
|
||||
.title(R.string.app_name)
|
||||
.content(R.string.password_reset)
|
||||
.titleColorRes(R.color.red)
|
||||
.contentColorRes(R.color.navy)
|
||||
.positiveText(R.string.ok)
|
||||
.positiveColor(ContextCompat.getColor(context, R.color.colorPrimary))
|
||||
.cancelable(false)
|
||||
@@ -162,6 +188,7 @@ public class DialogHelper {
|
||||
BaseActivity.currentActivity.finishAffinity();
|
||||
}
|
||||
})
|
||||
.typeface("Quicksand-Medium.ttf", "Quicksand-Regular.ttf")
|
||||
.show();
|
||||
|
||||
}
|
||||
@@ -171,9 +198,12 @@ public class DialogHelper {
|
||||
new MaterialDialog.Builder(BaseActivity.currentActivity)
|
||||
.title(R.string.app_name)
|
||||
.content(R.string.profile_updated)
|
||||
.titleColorRes(R.color.red)
|
||||
.contentColorRes(R.color.navy)
|
||||
.positiveText(R.string.ok)
|
||||
.cancelable(false)
|
||||
.onPositive(singleButtonCallback)
|
||||
.typeface("Quicksand-Medium.ttf", "Quicksand-Regular.ttf")
|
||||
.show();
|
||||
}
|
||||
*/
|
||||
@@ -181,8 +211,11 @@ public class DialogHelper {
|
||||
public static void showListDialog(ArrayList<String> itemList, MaterialDialog.ListCallback listCallback){
|
||||
new MaterialDialog.Builder(BaseActivity.currentActivity)
|
||||
.title(R.string.choose)
|
||||
.titleColorRes(R.color.red)
|
||||
.contentColorRes(R.color.navy)
|
||||
.items(itemList)
|
||||
.itemsCallback(listCallback)
|
||||
.typeface("Quicksand-Medium.ttf", "Quicksand-Regular.ttf")
|
||||
.show();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user