L-Dialogs alternatives and similar packages
Based on the "Dialog Widget" category.
Alternatively, view L-Dialogs alternatives based on common mentions on social networks and blogs.
-
android-styled-dialogs
Backport of Material dialogs with easy-to-use API based on DialogFragment -
BlurDialogFragment
Library project to display DialogFragment with a blur effect. -
spots-dialog
Android AlertDialog with moving dots progress indicator -
LicensesDialog
LicensesDialog is an open source library to display licenses of third-party libraries in an Android app. -
Android-RateThisApp
Android library to show "Rate this app" dialog -
FancyGifDialog-Android
Make your native android Dialog Fancy and Gify. A library that takes the standard Android Dialog to the next level with a variety of styling options and Gif's. Style your dialog from code. -
Aesthetic Dialogs for Android 📱
📱 An Android Library for 💫fluid, 😍beautiful, 🎨custom Dialogs. -
FileListerDialog
A simple file/ directory picker dialog for android -
LongPressPopup
Make a Popup appear long pressing on a view and handle drag-release events on its elements -
PostOffice
This is a library for easily constructing Holo and Material Design Dialogs. -
AndroidSliderPreference
Android library that allows applications to add dialog-based slider widgets to their settings -
SimpleDialogFragment
An Android library that provides a simple implementation of a DialogFragment -
WhatIsNewDialog
An Android library for displaying a dialog where it presents new features in the app. -
Bottom Flux Dialog
🌠 Simple way make your beautiful dialog (Bottom Sheet Dialog) -
MonthYearPickerDialog
Dialog for Android that allows pick month and year without exact day which is impossible with standard DatePickerDialog. It has customizable UI and different modes of selecting.
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of L-Dialogs or a related project?
README
L-Dialogs
A small library replicating the new dialogs in android L.
Set Up (Android Studio):
Download the aar here: https://www.dropbox.com/s/276bhapr2g50cak/ldialogs.aar?dl=0
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:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'uk.me.lewisdeane.ldialogs:RENAMED_FILE_NAME_HERE@aar'
}
repositories{
flatDir{
dirs 'libs'
}
}
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:
// Create the builder with required paramaters - Context, Title, Positive Text
CustomDialog.Builder builder = new CustomDialog.Builder(Context context, String title, String positiveText);
// Now we can any of the following methods.
builder.content(String content);
builder.negativeText(String negativeText);
builder.darkTheme(boolean isDark);
builder.typeface(Typeface typeface);
builder.titleTextSize(int size);
builder.contentTextSize(int size);
builder.buttonTextSize(int size);
builder.titleAlignment(Alignment alignment); // Use either Alignment.LEFT, Alignment.CENTER or Alignment.RIGHT
builder.titleColor(String hex); // int res, or int colorRes parameter versions available as well.
builder.contentColor(String hex); // int res, or int colorRes parameter versions available as well.
builder.positiveColor(String hex); // int res, or int colorRes parameter versions available as well.
builder.negativeColor(String hex); // int res, or int colorRes parameter versions available as well.
builder.positiveBackground(Drawable drawable); // int res parameter version also available.
builder.rightToLeft(boolean rightToLeft); // Enables right to left positioning for languages that may require so.
// Now we can build the dialog.
CustomDialog customDialog = builder.build();
// Show the dialog.
customDialog.show();
To handle the button clicks you can use the following code:
customDialog.setClickListener(new CustomDialog.ClickListener() {
@Override
public void onConfirmClick() {
}
@Override
public void onCancelClick() {
}
});
If you want to set a custom view in the dialog you can use the following method.
customDialog.setCustomView(View customView);
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:
// Create list dialog with required parameters - context, title, and our array of items to fill the list.
CustomListDialog.Builder builder = new CustomListDialog.Builder(Context context, String title, String[] items);
// Now again we can use some extra methods on the builder to customise it more.
builder.darkTheme(boolean isDark);
builder.typeface(Typeface typeface);
builder.titleAlignment(Alignment alignment); // Use either Alignment.LEFT, Alignment.CENTER or Alignment.RIGHT
builder.itemAlignment(Alignment alignment); // Use either Alignment.LEFT, Alignment.CENTER or Alignment.RIGHT
builder.titleColor(String hex); // int res, or int colorRes parameter versions available as well.
builder.itemColor(String hex); // int res, or int colorRes parameter versions available as well.
builder.titleTextSize(int size);
builder.itemTextSize(int size);
builder.rightToLeft(boolean rightToLeft); // Enables right to left positioning for languages that may require so.
// Now we can build our dialog.
CustomListDialog customListDialog = builder.build();
// Finally we can show it.
customListDialog.show();
In order to recieve the click events from the dialog, simply use the following method on your customListDialog:
customListDialog.setListClickListener(new CustomListDialog.ListClickListener() {
@Override
public void onListItemSelected(int i, String[] strings, String s) {
// i is the position clicked.
// strings is the array of items in the list.
// s is the item selected.
}
});
To add a listview selector use the following code:
StateListDrawable selector = new StateListDrawable();
selector.addState(new int[]{android.R.attr.state_pressed}, new ColorDrawable(R.color.color1));
selector.addState(new int[]{-android.R.attr.state_pressed}, new ColorDrawable(R.color.color2));
// The important part:
customListDialog.getListView().setSelector(selector);
This library will be updated often, enjoy!