MLBB Dialog Library for Android
Add below codes to your root build.gradle
file (not your module build.gradle file).
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
And add a dependency code to your module's build.gradle
file.
dependencies {
implementation 'com.github.sudoxE7:MLBBDialog:1.0.0'
}
Add in your Activity file.
new MLBBDialogBuilder(MainActivity.this, Style.NEW)
.setTitle(getString(R.string.title))
.setSubtitle(getString(R.string.subtitle))
.setCancelable(true)
.setPositiveListener(getString(R.string.positive), new MLBBDialogClickListener() {
@Override
public void onClick(MLBBDialog mLBBDialog) {
finishAffinity();
mLBBDialog.dismiss();
}
})
.setNegativeListener(getString(R.string.negative), new MLBBDialogClickListener() {
@Override
public void onClick(MLBBDialog mLBBDialog) {
mLBBDialog.dismiss();
}
})
.build().show();
Just remove in build:
.setNegativeListener(getString(R.string.negative), new MLBBDialogClickListener() {
@Override
public void onClick(MLBBDialog mLBBDialog) {
mLBBDialog.dismiss();
}
})
Just add in build:
.setFont(Typeface.createFromAsset(getAssets(),"fonts/anastasia.ttf"))
To change the style of MLBB Dialog
Style.OLD
Style.NEW
// Credit to Exodus