L-Dialogs
A small library replicating the new dialogs in android L.
Set Up (Android Studio):
Maven central support will be coming soon.
You can rename the aar and then place it in the libs directory of your project.
Go into your build.gradle and add the following:
Usage
Normal Dialogs
You should now be able to access the class CustomDialog from one of your java files.
To create a new CustomDialog we need to use a builder as so:
To handle the button clicks you can use the following code:
If you want to set a custom view in the dialog you can use the following method.
Then do what you need to do with the custom views content in onConfirmClick or onCancelClick.
List Dialogs
To use the CustomListDialog we need to use a builder again, this is done as follows:
In order to recieve the click events from the dialog, simply use the following method on your customListDialog:
To add a listview selector use the following code: