Learnoset Material Dialogs is a powerful library for Android Studio that consist of
- Easy to Use
- Don't need to right lengthy code
- Easy to implement
- Responsive Designs
- Modern Designs
1. Add below line in your module level build.gradle file
implementation 'com.github.learnoset:material-dialogs:1.7'- Add below line in your project level build.gradle file
allprojects {
repositories {
google()
jcenter()
// add below line
maven {url 'https://jitpack.io' }
}
}- Add below code in the XML file
// Creating DialogAppUpdateDialogappUpdateDialog = newAppUpdateDialog(context, "V1.6");
appUpdateDialog.setCancelable(false);
// adding update featuresappUpdateDialog.addUpdateFeature("Bugs Fixed");
appUpdateDialog.addUpdateFeature("Design Improvements");
appUpdateDialog.addUpdateFeature("New Functionalities");
appUpdateDialog.addUpdateFeature("More Update Features");
// show dialogappUpdateDialog.show();
// listen for update button clickappUpdateDialog.setUpdateBtnClickListener(newUpdateBtnClickListener() {
@OverridepublicvoidonClick() {
// handle click event here
}
});
- Using Themes with Custom Update Available Dialog
appUpdateDialog.setDialogTheme(AppUpdateDialog.DialogTheme.LIGHT);
// ORappUpdateDialog.setDialogTheme(AppUpdateDialog.DialogTheme.DARK);
// OR USING CUSTOM THEMECustomDialogThemecustomDialogTheme = newCustomDialogTheme();
customDialogTheme.setDialogBackgroundColor(Color.RED); // setting custom dialog background colorcustomDialogTheme.setTextColor(Color.BLACK); // text colorscustomDialogTheme.setUpdateAvailableTxtColor(Color.BLACK); // setting NEW UPDATE AVAILABLE text colorcustomDialogTheme.setUpdateNowBtnColor(Color.BLUE); // setting Update Now button colorcustomDialogTheme.setWaveColorOne(Color.BLUE); // setting wave one colorcustomDialogTheme.setWaveColorTwo(Color.BLUE); // setting wave two colorcustomDialogTheme.setVersionNameColor(Color.WHITE); // setting version name text colorappUpdateDialog.setDialogTheme(customDialogTheme);
// show dialog after setting themeappUpdateDialog.show();You can Visit our Website to learn more about Android App Development, Java, Python, JavaScript, Artificial Intelligence
Learnoset Website
We provide source code for Login & Register pages, Custom Dialogs, Custom Navigation Bar, Custom Toolbar, Custom Bottom Bar with material UI design and complete project files
