All Projects β†’ muigukenneth β†’ Elegantdialog

muigukenneth / Elegantdialog

Licence: mit
A beautiful, customizable and interactive dialog for Android written in Kotlin/Java 😍

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to Elegantdialog

Aestheticdialogs
πŸ“± An Android Library for πŸ’«fluid, 😍beautiful, 🎨custom Dialogs.
Stars: ✭ 352 (+86.24%)
Mutual labels:  material-design, design, android-ui, dialogs
Bottomsheet
BottomSheet dialog library for Android
Stars: ✭ 219 (+15.87%)
Mutual labels:  material-design, design, android-ui
Lovelydialog
This library is a set of simple wrapper classes that are aimed to help you easily create fancy material dialogs.
Stars: ✭ 1,043 (+451.85%)
Mutual labels:  material-design, android-ui, dialogs
Materialdesigninxamltoolkit
Google's Material Design in XAML & WPF, for C# & VB.Net.
Stars: ✭ 11,603 (+6039.15%)
Mutual labels:  material-design, design
Teammate Android
A Team Management app for creating tournaments and games for various sports
Stars: ✭ 116 (-38.62%)
Mutual labels:  material-design, android-ui
Mato
Mato - Icon pack for Linux
Stars: ✭ 117 (-38.1%)
Mutual labels:  material-design, design
Mediapicker
Easy customizable picker for all your needs in Android application
Stars: ✭ 105 (-44.44%)
Mutual labels:  material-design, android-ui
React Native Material Dialog
Material design dialogs for React Native πŸ’¬
Stars: ✭ 135 (-28.57%)
Mutual labels:  material-design, dialogs
Shotang App
The New Home Screen is designed in a modular way with the core focus on product discovery. Search, Deals, Products everything has been brought upfront. The hamburger menu has been replaced with a bottom navigation bar for easy reachability. On the tech side too, this design allows us to run new deals and other experiments in an agile manner which wasn't possible in the previous version.
Stars: ✭ 132 (-30.16%)
Mutual labels:  material-design, android-ui
Ibackdrop
A library to simply use Backdrop in your project (make it easy). Read more ->
Stars: ✭ 137 (-27.51%)
Mutual labels:  material-design, android-ui
Material
A UI/UX framework for creating beautiful applications.
Stars: ✭ 11,870 (+6180.42%)
Mutual labels:  material-design, design
Materialize
Materialize, a CSS Framework based on Material Design
Stars: ✭ 38,630 (+20339.15%)
Mutual labels:  material-design, design
Android Observablescrollview
Android library to observe scroll events on scrollable views.
Stars: ✭ 9,625 (+4992.59%)
Mutual labels:  material-design, android-ui
Fancyshowcaseview
An easy-to-use customisable show case view with circular reveal animation.
Stars: ✭ 1,662 (+779.37%)
Mutual labels:  material-design, android-ui
Bubble Navigation
πŸŽ‰ [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of 🎨 customization option.
Stars: ✭ 1,537 (+713.23%)
Mutual labels:  material-design, android-ui
Motion
A library used to create beautiful animations and transitions for iOS.
Stars: ✭ 1,726 (+813.23%)
Mutual labels:  material-design, design
Materialdrawer
The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.
Stars: ✭ 11,498 (+5983.6%)
Mutual labels:  material-design, android-ui
Notzz App
πŸ“ A Simple Note-Taking App built to demonstrate the use of Modern Android development tools - (Kotlin, Coroutines, State Flow, Hilt-Dependency Injection, Jetpack DataStore, Architecture Components, MVVM, Room, Material Design Components).
Stars: ✭ 158 (-16.4%)
Mutual labels:  material-design, android-ui
Awesomedialog
A Beautiful Dialog Library for Kotlin Android
Stars: ✭ 163 (-13.76%)
Mutual labels:  material-design, android-ui
Material Design For Bootstrap
Important! A new UI Kit version for Bootstrap 5 is available. Access the latest free version via the link below.
Stars: ✭ 9,463 (+4906.88%)
Mutual labels:  material-design, design

ElegantDialog

Build Status Codacy Badge Known Vulnerabilities Android Arsenal GitHub license GitHub stars platform API

Download

Download

Easily add the dependencies:

 allprojects {
   repositories {
	...
	 maven { url 'https://jitpack.io' }
      }
 }
     
dependencies {
  ...
  implementation 'com.github.muigukenneth:ElegantDialog:${LATEST_VERSION}'
}

Features

Here are some fancy stuff:

  • Top background customization
  • Bottom background customization
  • Custom layout(RecyclerView etc)
  • Custom icons(buttons and title)
  • Color customizations (Icons and Text)
  • Text customizations (Buttons, title and content)
  • Custom fonts (title and content)
  • Image loading using Glide or Picasso

How to use ElegantDialog

Simple use cases looks like this:

     val dialog = ElegantDialog(context)
                .setTitleIcon(titleIcon)//Set title icon drawable if your not loading with Glide or Picasso
                .setTitleIconBackgroundColor(backgroundIconColor) //Set title icon drawable background color
                .setBackgroundTopColor(backgroundTopColor)// Set top color
                .setBackgroundBottomColor(backgroundBottomColor) // Set bottom color
                .setCustomView(R.layout.custom_image_layout)//Set custom layout
                .setCornerRadius(50f) //Set dialog corner radius
                .setCanceledOnTouchOutside(false) // Dismiss on tap outside
                .setTitleHidden(false) // Hide title
                .setElegantActionClickListener(object :
                    ElegantActionListeners {
                    override fun onPositiveListener(dialog: ElegantDialog) {
                      
                        dialog.dismiss()
                    }

                    override fun onNegativeListener(dialog: ElegantDialog) {
                        dialog.dismiss()
                    }

                    override fun onGotItListener(dialog: ElegantDialog) {

                        dialog.dismiss()
                    }

                    override fun onCancelListener(dialog: DialogInterface) {
                        dialog.dismiss()
                    }
                })
                .show()  // Finally don't forget to call show()
                
                 // access your customView
             val contentView: View? = dialog.getCustomView()
              
            // Now for the title, content and buttons customisations
            if (dialog.getTitleIconView() != null) {
                // You can use glide or picasso to display your own title image.
                // Please Note do not pass an icon drawable at setTitleIcon(titleIcon)
                val imageUrl = R.drawable.face
                Glide.with(this).load(imageUrl)
                    .transition(ImageUtils.requestAvatarTransitionOptions())
                    .apply(ImageUtils.requestAvatarOptions("app"))
                    .into(dialog.getTitleIconView()!!)
                    
                dialog.getTitleTextView()!!.text = titleText //Set title text
                dialog.getTitleTextView()!!.setTextColor(titleTextColor) //Set title text color
                
                dialog.getContentTextView()!!.text = contentText //Set content text
                dialog.getContentTextView()!!.setTextColor(contentTextColor) //Set content text color
                
                dialog.getPositiveButtonIconView()!!.setImageDrawable(positiveIcon) //Set positive button icon drawable
                dialog.getPositiveButtonIconView()!!.setColorFilter(positiveIconColor) //Set positive button icon drawable color
                dialog.getPositiveButtonTextView()!!.text = positiveText //Set positive button text
                
                dialog.getNegativeButtonIconView()!!.setImageDrawable(negativeIcon) //Set negative button icon drawable
                dialog.getNegativeButtonIconView()!!.setColorFilter(negativeIconColor) //Set negative button icon drawable color
                dialog.getNegativeButtonTextView()!!.text = negativeText //Set negative button text
                
                dialog.getGotItButtonIconView()!!.setImageDrawable(gotItIcon) //Set got it button icon drawable
                dialog.getGotItButtonIconView()!!.setColorFilter(gotItIconColor) //Set negative button icon drawable color
                dialog.getGotItButtonTextView()!!.text = gotItText //Set got it button text
                
                dialog.getPositiveButtonTextView()!!.visibility = if (hideButtonText) View.GONE else View.VISIBLE //Hide positive button text
                dialog.getNegativeButtonTextView()!!.visibility = if (hideButtonText) View.GONE else View.VISIBLE //Hide negative button text
                dialog.getGotItButtonTextView()!!.visibility = if (hideButtonText) View.GONE else View.VISIBLE //Hide got it button text
                
                dialog.getPositiveButton()!!.visibility = if (hidePositiveButton) View.GONE else View.VISIBLE //Hide positive button 
                dialog.getNegativeButton()!!.visibility = if (hideNegativeButton) View.GONE else View.VISIBLE //Hide negative button
                dialog.getGotItButton()!!.visibility = if (hideGotItButton) View.GONE else View.VISIBLE  //Hide got it button
            }
            

If you want to achieve button left and right gravity :

             //Right Gravity button use got it button for clicks and customization
                dialog.getPositiveButtonIconView()!!.visibility =  View.GONE 
                dialog.getPositiveButtonTextView()!!.visibility =  View.GONE
                dialog.getNegativeButtonIconView()!!.visibility =  View.GONE 
                dialog.getNegtaiveButtonTextView()!!.visibility =  View.GONE
                dialog.getGotItButtonIconView()!!.visibility =  View.VISIBLE 
                dialog.getGotItButtonTextView()!!.visibility =  View.VISIBLE
                
               //Left Gravity button use positive button for clicks and customization
                dialog.getPositiveButtonIconView()!!.visibility =  View.VISIBLE 
                dialog.getPositiveButtonTextView()!!.visibility =  View.VISIBLE
                dialog.getNegativeButtonIconView()!!.visibility =  View.GONE 
                dialog.getNegativeButtonTextView()!!.visibility =  View.GONE
                dialog.getGotItButtonIconView()!!.visibility =  View.GONE 
                dialog.getGotItButtonTextView()!!.visibility =  View.GONE

Pull requests are welcome!

Feel free to contribute to ElegantDialog. Just create a pull request for:

  • Bug fixes
  • New features
  • Code optimizations
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].