All Projects → javiersantos → Bottomdialogs

javiersantos / Bottomdialogs

Licence: apache-2.0
An Android library that shows a customizable Material-based bottom sheet. API 11+ required.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Bottomdialogs

Materialstyleddialogs
A library that shows a beautiful and customizable Material-based dialog with header. API 14+ required.
Stars: ✭ 1,139 (+82.53%)
Mutual labels:  gradle, material-design, dialog
Androidutillib
🔥 旨在打造一款属于Android开发的强大工具库:内置各种开发必备工具类、Dialog封装、组件重写等
Stars: ✭ 143 (-77.08%)
Mutual labels:  gradle, dialog
Materialdialog Android
📱Android Library to implement animated, 😍beautiful, 🎨stylish Material Dialog in android apps easily.
Stars: ✭ 602 (-3.53%)
Mutual labels:  material-design, dialog
react-spring-bottom-sheet
Accessible ♿️, Delightful ✨, & Fast 🚀
Stars: ✭ 604 (-3.21%)
Mutual labels:  dialog, bottom-sheet
Light Novel Library wenku8 android
[CASUALLY MAINTAINED] 轻小说文库 (Wenku8.com) 安卓版第三方公益App,始于2014年的Material Design风格、无广告、不盈利、Google Play上安装包最小的轻小说阅读器(light novel reader)。目前除了网站的API以外,还添加了我自己架的Cloudflare Worker 中继节点用来突破网站API的限制 wenku8-relay.mewx.org.
Stars: ✭ 772 (+23.72%)
Mutual labels:  gradle, material-design
Materialchipview
Material Chip view. Can be used as tags for categories, contacts or creating text clouds
Stars: ✭ 1,181 (+89.26%)
Mutual labels:  gradle, material-design
Customfloatingactionbutton
This view is for replacement of standard Floating Action Button from Google Support Library. It is easy to use, customizable and you can also add text to button
Stars: ✭ 222 (-64.42%)
Mutual labels:  gradle, material-design
Fullscreendialog
A DialogFragment that implements the Full-screen dialog pattern defined in the Material Design guidelines.
Stars: ✭ 111 (-82.21%)
Mutual labels:  material-design, dialog
Fancyalertdialog Android
Make your native android Dialog Fancy. A library that takes the standard Android Dialog to the next level with a variety of styling options. Style your dialog from code.
Stars: ✭ 260 (-58.33%)
Mutual labels:  material-design, dialog
Aestheticdialogs
📱 An Android Library for 💫fluid, 😍beautiful, 🎨custom Dialogs.
Stars: ✭ 352 (-43.59%)
Mutual labels:  material-design, dialog
Pickimage
Shows a DialogFragment with camera and gallery options. User can choose wich provider wants to pick images from. 📸 🖼️
Stars: ✭ 386 (-38.14%)
Mutual labels:  material-design, dialog
Androidmaterialdialog
Provides builders, which allow to create various "Material Design"-styled dialogs
Stars: ✭ 161 (-74.2%)
Mutual labels:  material-design, dialog
Noty
A simple library for creating animated warnings/dialogs/alerts for Android.
Stars: ✭ 136 (-78.21%)
Mutual labels:  material-design, dialog
React Native Material Dialog
Material design dialogs for React Native 💬
Stars: ✭ 135 (-78.37%)
Mutual labels:  material-design, dialog
React Native Actions Sheet
A Cross Platform(Android & iOS) ActionSheet with a flexible api, native performance and zero dependency code for react native. Create anything you want inside ActionSheet.
Stars: ✭ 412 (-33.97%)
Mutual labels:  dialog, bottom-sheet
Acgn Community
A community app for news,animation,music and novels developed material design style.
Stars: ✭ 193 (-69.07%)
Mutual labels:  gradle, material-design
Lovelydialog
This library is a set of simple wrapper classes that are aimed to help you easily create fancy material dialogs.
Stars: ✭ 1,043 (+67.15%)
Mutual labels:  material-design, dialog
Simpledialogfragments
A collection of easy to use and extendable DialogFragment's for Android
Stars: ✭ 94 (-84.94%)
Mutual labels:  material-design, dialog
T Mvp
Android AOP Architecture by Apt, AspectJ, Javassisit, based on Realm+Databinding+MVP+Retrofit+Rxjava2
Stars: ✭ 2,740 (+339.1%)
Mutual labels:  gradle, material-design
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.
Stars: ✭ 409 (-34.46%)
Mutual labels:  material-design, dialog

BottomDialogs

Android Library

Android Library that shows a customizable Material-based bottom sheet.

How to include

Add the repository to your project build.gradle:

repositories {
    maven {
        url "https://jitpack.io"
    }
}

And add the library to your module build.gradle:

dependencies {
    compile 'com.github.javiersantos:BottomDialogs:1.2.1'
}

Usage

Basic Bottom Dialog

A basic bottom dialog will be shown. You have access to methods such as setTitle(), setContent(), setIcon(), setCancelable(), dismiss(), etc. Customizations are explained below.

new BottomDialog.Builder(this)
	.setTitle("Awesome!")
	.setContent("What can we improve? Your feedback is always welcome.")
	.show();

or

BottomDialog bottomDialog = new BottomDialog.Builder(this)
	.setTitle("Awesome!")
	.setContent("What can we improve? Your feedback is always welcome.")
	.build();
...
bottomDialog.show();

Displaying an icon

The bottom dialog icon will be shown to the left of the title.

new BottomDialog.Builder(this)
	.setTitle("Awesome!")
	.setContent("What can we improve? Your feedback is always welcome.")
	.setIcon(R.drawable.ic_launcher)
	//.setIcon(ContextCompat.getDrawable(this, R.drawable.ic_launcher))
	.show();

Adding buttons and callbacks

Buttons are showed at the end of the bottom dialog. You can add your own text, colors and actions/callbacks.

new BottomDialog.Builder(this)
	.setTitle("Awesome!")
	.setContent("What can we improve? Your feedback is always welcome.")
	.setPositiveText("OK")
	.setPositiveBackgroundColorResource(R.color.colorPrimary)
	//.setPositiveBackgroundColor(ContextCompat.getColor(this, R.color.colorPrimary)
	.setPositiveTextColorResource(android.R.color.white)
	//.setPositiveTextColor(ContextCompat.getColor(this, android.R.color.colorPrimary)
	.onPositive(new BottomDialog.ButtonCallback() {
		@Override
		public void onClick(BottomDialog dialog) {
			Log.d("BottomDialogs", "Do something!");
		}
	}).show();
new BottomDialog.Builder(this)
	.setTitle("Awesome!")
	.setContent("What can we improve? Your feedback is always welcome.")
	.setNegativeText("Exit")
	.setNegativeTextColorResource(R.color.colorAccent)
	//.setNegativeTextColor(ContextCompat.getColor(this, R.color.colorAccent)
	.onNegative(new BottomDialog.ButtonCallback() {
		@Override
		public void onClick(BottomDialog dialog) {
			Log.d("BottomDialogs", "Do something!");
		}
	}).show();

If no onPositive() or onNegative() callbacks are provided, then the bottom dialog will be dismissed when tapping de button.

If autoDismiss() is turned false, then you must manually dismiss the dialog in these callbacks. Auto dismiss is true by default.

Dismissing when touching outside

The setCancelable() method lets you disable dismissing the bottom dialog when you tap outside the dialog window.

new BottomDialog.Builder(this)
	.setTitle("Awesome!")
	.setContent("What can we improve? Your feedback is always welcome.")
	.setCancelable(false)
	.show();

Adding a custom view

You can add custom view to your bottom dialog just by adding the layout to the setCustomView() method.

new BottomDialog.Builder(this)
	.setTitle("Awesome!")
	.setContent("What can we improve? Your feedback is always welcome.")
	.setCustomView(R.layout.my_custom_view)
	.show();

A detailed description is available at: https://github.com/javiersantos/BottomDialogs/wiki/Adding-a-custom-view

Adding a custom color and font

You can add custom colors and fonts to bottom dialog by using the view objects: getIconImageView(), getTitleTextView(), getContentTextView(), getNegativeButton() and getPositiveButton(). For example:

BottomDialog bottomDialog = BottomDialog.Builder(this)
	...
	.build();

bottomDialog.getTitleTextView().setTextColor(Color.parseColor("#8f000000"));
bottomDialog.getTitleTextView().setTypeface(BaseActivity.getFont(Fonts.SEMI_BOLD));
bottomDialog.show();

Third Party Bindings

React Native

You may now use this library with React Native via the module here

License

Copyright 2016-2018 Javier Santos

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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].