You are on page 1of 21

ColorDialog (/details/1/4236)

 303 (https://github.com/andyxialm/ColorDialog/stargazers?utm_source=android-

arsenal.com&utm_medium=referral&utm_campaign=4236)  11

(https://github.com/andyxialm/ColorDialog/watchers?utm_source=android-

arsenal.com&utm_medium=referral&utm_campaign=4236)  75

(https://github.com/andyxialm/ColorDialog/network?utm_source=android-

arsenal.com&utm_medium=referral&utm_campaign=4236)  9

(https://github.com/andyxialm/ColorDialog/issues?utm_source=android-

arsenal.com&utm_medium=referral&utm_campaign=4236)

 (https://facebook.com/sharer.php?
General u=https://android-
Category
arsenal.com/details/1/4236)
Free (/free)

Tag
 (https://twitter.com/intent/twe
arsenal.com/details/1/4236&text=The%20An
Dialogs (/tag/30)

License %20Dialogs%20-%20ColorDialog
MIT License (http://opensource.org/licenses/MIT?utm_source=android-arsenal.com&utm_medium=referr

 (http://news.ycombinator.com/submitlink
al&utm_campaign=4236)

arsenal.com/details/1/4236&t=The%20Andro
Min SDK
14 (Android 4.0–4.0.2 Ice Cream Sandwich) (/api?level=14)

Registered
%20Dialogs%2
Aug 27, 2016

Favorites
 (https://plus.google.com/share?
15 url=https://android-
Link arsenal.com/details/1/4236)
https://github.com/andyxialm/ColorDialog (https://github.com/andyxialm/ColorDialog?utm_source=android

 (https://reddit.com/subm
-arsenal.com&utm_medium=referral&utm_campaign=4236)

arsenal.com/details/1/4236&title=The%20An
See also
BlankSpace (/details/1/6446)
Panter Dialog (/details/1/4678) %20Dialogs%
SimplePlacesSearchDialog (/details/1/6742)
Easy Native Dialog (/details/1/6525)
Search Dialog (/details/1/5772)

Additional

Language
Java

Version
1.0.0 (Nov 7, 2016) (https://github.com/andyxialm/ColorDialog/releases/tag/1.0.0?utm_source=android-ar
senal.com&utm_medium=referral&utm_campaign=4236)

Created
Nov 16, 2015

Updated
Apr 17, 2017

Owner
阵雨 (andyxialm) (/user/andyxialm)

Contributor
1 (https://github.com/andyxialm/ColorDialog/graphs/contributors?utm_source=android-arsenal.com&utm_
medium=referral&utm_campaign=4236)

Activity

Badge
 Generate

Download
 Source code
 APK file

Promotion
     

FBS tiene a A lot of Apples de FBS,


especialmente para los
lot of Apples traders más activos!

#ColorDialog & PromptDialog JitPack 1.0.0 (https://jitpack.io/#andyxialm/ColorDialog)


Android Arsenal ColorDialog ()

ColorDialog support: Text Mode, Image Mode, Text & Image Mode
PromptDialog support: Success, Info, Error, Warning, Help
Support custom in/out animation
PromptDialog's UI from Dribbble@Diego Faria (https://dribbble.com/shots/1626595-Feedback-
dialogs-collection-FREE-PSD?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=4236), Thanks.

Usage

Gradle

Step 1. Add the JitPack repository to your build file

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

Step 2. Add the dependency


dependencies {
compile 'com.github.andyxialm:ColorDialog:1.0.0'
}

Maven

Step 1. Add the JitPack repository to your build file

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

Step 2. Add the dependency

<dependency>
<groupId>com.github.andyxialm</groupId>
<artifactId>ColorDialog</artifactId>
<version>1.0.0</version>
</dependency>

Java Code:

ColorDialog dialog = new ColorDialog(this);


dialog.setTitle(getString(R.string.operation));
dialog.setContentText(getString(R.string.content_text));
dialog.setContentImage(getResources().getDrawable(R.mipmap.sample_img));
dialog.setPositiveListener(getString(R.string.delete), new ColorDialog.OnPositiveListener()
@Override
public void onClick(ColorDialog dialog) {
Toast.makeText(MainActivity.this, dialog.getPositiveText().toString(), Toast.LENGTH
}
})
.setNegativeListener(getString(R.string.cancel), new ColorDialog.OnNegativeListener() {
@Override
public void onClick(ColorDialog dialog) {
Toast.makeText(MainActivity.this, dialog.getNegativeText().toString(), Toast.LENGTH
dialog.dismiss();
}
}).show();
new PromptDialog(this)
.setDialogType(PromptDialog.DIALOG_TYPE_SUCCESS)
.setAnimationEnable(true)
.setTitleText(getString(R.string.success))
.setContentText(getString(R.string.text))
.setPositiveListener(getString(R.string.ok), new PromptDialog.OnPositiveListener() {
@Override
public void onClick(PromptDialog dialog) {
dialog.dismiss();
}
}).show();

Screenshots:
PromptDialog Success
(https://github.com/andyxialm/ColorDialog/blob/master/art/Screenshot_type_success.png?
raw=true&utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=4236)

PromptDialog Info
(https://github.com/andyxialm/ColorDialog/blob/master/art/Screenshot_type_info.png?
raw=true&utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=4236)

PromptDialog Help
(https://github.com/andyxialm/ColorDialog/blob/master/art/Screenshot_type_help.png?
raw=true&utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=4236)

PromptDialog Error
(https://github.com/andyxialm/ColorDialog/blob/master/art/Screenshot_type_error.png?
raw=true&utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=4236)

PromptDialog Warning
(https://github.com/andyxialm/ColorDialog/blob/master/art/Screenshot_type_warning.png?
raw=true&utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=4236)

ColorDialog Text Mode


(https://github.com/andyxialm/ColorDialog/blob/master/art/Screenshot_text.png?
raw=true&utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=4236)

ColorDialog Image Mode


(https://github.com/andyxialm/ColorDialog/blob/master/art/Screenshot_img.png?
raw=true&utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=4236)

ColorDialog Text&Image Mode


(https://github.com/andyxialm/ColorDialog/blob/master/art/Screenshot_imgtext.png?
raw=true&utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=4236)

#License

ColorDialog is available under the MIT license.

Certi ed isolated USB OPEN


acc. to EN60601-1 for sensitive medical and industrial applications iftools.com

Follow us on Twitter (https://twitter.com/Android_Arsenal?utm_source=android-


arsenal.com&utm_medium=referral&utm_campaign=4236)

Read us in Telegram (https://telegram.me/AndroidArsenal?utm_source=android-


arsenal.com&utm_medium=referral&utm_campaign=4236)

Get Android app on Google Play (https://play.google.com/store/apps/details?


id=com.android_arsenal.androidarsenal&utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=4236)

Stay informed with Pushbullet (https://www.pushbullet.com/channel?tag=android_arsenal&utm_source=android-


arsenal.com&utm_medium=referral&utm_campaign=4236)

Created by Vladislav Bauer (https://github.com/vbauer?utm_source=android-


arsenal.com&utm_medium=referral&utm_campaign=4236)
 (https://twitter.com/BauerVlad?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=4236)
 (https://www.linkedin.com/in/vladislavbauer?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=4236)
 (https://www.paypal.me/VladislavBauer?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=4236)
© 2014-2018 - Android Arsenal (/) | Privacy (/privacy)

You might also like