Material Dialog Android Library Demo

Animated Material Dialog — Android 📱 😍🎨

Shreyas Patil
Jun 13 · 5 min read
Screenshot of Google Files App.

👉 About MaterialDialog Library :

👇 Library provides two types of Dialogs :

1️⃣ Material Dialog:

Animated Material Dialog

This is basic material dialog which has two material buttons ( Same as Android’s AlertDialog ) as you can see in the image. For e.g. Here you can see the animated Material Dialog with Animation, Title, Message and two buttons.

2️⃣ Bottom Sheet Material Dialog:

Animated Bottom Sheet Material Dialog

This is Bottom Sheet material dialog which has two material buttons which is created at bottom of device as you can see in the image. For e.g. Here you can see the animated Bottom Sheet Material Dialog with Animation, Title, Message and two buttons.

💻 Getting Started :

* Prerequisite:

i. Gradle

dependencies {    // Material Dialog Library
implementation 'com.shreyaspatil:MaterialDialog:1.0.0'
// Material Design Library
implementation 'com.google.android.material:material:1.0.0'
// Lottie Animation Library
implementation 'com.airbnb.android:lottie:3.0.6'
}

ii. Set up Material Theme

<resources>
<style name="AppTheme" parent="Theme.MaterialComponents.Light">
<!-- Customize your theme here. -->
...
</style>
</resources>

Create Dialog Instance

i. Material Dialog

Creating MaterialDialog and showing it.
Simple Material Dialog

ii. Bottom Sheet Material Dialog

Creating BottomSheetMaterialDialog and showing it.
Simple Bottom Sheet Material Dialog

🎞 Showing Animations:

Animated Material Dialogs. Material Dialog at left and Bottom Sheet Material Dialog at right.

i. Using Resource File

Adding animation using Resource (raw) file.

ii. Using Asset File

Adding animations using the Asset File.

iii. Getting LottieAnimationView

LottieAnimationView animationView = mDialog.getAnimationView();
// Do operations on animationView

◀️ Dialog State Listeners

Tweet about library.

MindOrks

Our community publishes stories worth reading on software development and design. Android | Machine Learning | #MakeEveryoneCode

Shreyas Patil

Written by

📱Android Developer 🌐Web Developer. http://shreyaspatil.me

MindOrks

MindOrks

Our community publishes stories worth reading on software development and design. Android | Machine Learning | #MakeEveryoneCode