├── versions.properties ├── sample ├── .gitignore ├── ic_web.png ├── sample.apk ├── keystore.jks ├── src │ └── main │ │ ├── res │ │ ├── drawable-hdpi │ │ │ ├── ic_check.png │ │ │ ├── ic_launcher.png │ │ │ ├── ic_circle_darker.png │ │ │ └── ic_circle_lighter.png │ │ ├── drawable-mdpi │ │ │ ├── ic_check.png │ │ │ ├── ic_launcher.png │ │ │ ├── ic_circle_darker.png │ │ │ └── ic_circle_lighter.png │ │ ├── drawable-xhdpi │ │ │ ├── ic_check.png │ │ │ ├── ic_launcher.png │ │ │ ├── ic_circle_darker.png │ │ │ └── ic_circle_lighter.png │ │ ├── drawable-xxhdpi │ │ │ ├── ic_check.png │ │ │ ├── ic_launcher.png │ │ │ ├── ic_circle_darker.png │ │ │ └── ic_circle_lighter.png │ │ ├── drawable-xxxhdpi │ │ │ └── ic_launcher.png │ │ ├── values │ │ │ ├── integers.xml │ │ │ ├── colors.xml │ │ │ ├── styles.xml │ │ │ ├── dimens.xml │ │ │ ├── arrays.xml │ │ │ └── strings.xml │ │ ├── values-land │ │ │ └── integers.xml │ │ ├── values-v21 │ │ │ ├── dimens.xml │ │ │ └── styles.xml │ │ ├── values-w720dp │ │ │ └── dimens.xml │ │ ├── menu │ │ │ └── main.xml │ │ ├── values-large │ │ │ └── dimens.xml │ │ ├── drawable-v21 │ │ │ ├── md_btn_selector_custom.xml │ │ │ └── md_btn_selector_custom_holo.xml │ │ ├── layout │ │ │ ├── preference_activity_custom.xml │ │ │ ├── dialog_webview.xml │ │ │ ├── dialog_customlistitem.xml │ │ │ ├── preference_custom.xml │ │ │ ├── dialog_customview.xml │ │ │ ├── preference_list_fragment.xml │ │ │ └── activity_main.xml │ │ ├── values-sw320dp │ │ │ └── dimens.xml │ │ ├── drawable │ │ │ ├── md_btn_selector_custom.xml │ │ │ ├── md_btn_selected_custom.xml │ │ │ └── md_btn_unselected_custom.xml │ │ ├── xml │ │ │ └── preferences.xml │ │ └── xml-v11 │ │ │ └── preferences.xml │ │ ├── java │ │ └── com │ │ │ └── afollestad │ │ │ └── materialdialogssample │ │ │ ├── PreferenceActivityCompat.java │ │ │ ├── PreferenceActivity.java │ │ │ ├── ButtonItemAdapter.java │ │ │ ├── ChangelogDialog.java │ │ │ └── FolderSelectorDialog.java │ │ ├── assets │ │ └── changelog.html │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── library ├── .gitignore ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ ├── values │ │ │ ├── bool.xml │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ ├── attrs.xml │ │ │ ├── styles.xml │ │ │ └── dimens.xml │ │ ├── values-sw600dp │ │ │ ├── bool.xml │ │ │ └── dimens.xml │ │ ├── values-sw720dp │ │ │ ├── bool.xml │ │ │ └── dimens.xml │ │ ├── anim │ │ │ ├── decelerate_cubic.xml │ │ │ ├── popup_enter.xml │ │ │ └── popup_exit.xml │ │ ├── drawable │ │ │ ├── md_item_selected.xml │ │ │ ├── md_transparent.xml │ │ │ ├── md_item_selected_dark.xml │ │ │ ├── md_selector.xml │ │ │ ├── md_btn_selector.xml │ │ │ ├── md_selector_dark.xml │ │ │ ├── md_btn_selector_dark.xml │ │ │ ├── md_btn_selected.xml │ │ │ └── md_btn_selected_dark.xml │ │ ├── drawable-v21 │ │ │ ├── md_btn_selector_ripple.xml │ │ │ ├── md_btn_selector_ripple_dark.xml │ │ │ └── md_btn_shape.xml │ │ ├── layout │ │ │ ├── md_dialog_custom.xml │ │ │ ├── md_dialog_progress_indeterminate.xml │ │ │ ├── md_stub_actionbuttons.xml │ │ │ ├── md_stub_progress_indeterminate_horizontal.xml │ │ │ ├── md_listitem.xml │ │ │ ├── md_dialog_progress.xml │ │ │ ├── md_dialog_progress_indeterminate_horizontal.xml │ │ │ ├── md_stub_inputpref.xml │ │ │ ├── md_stub_titleframe.xml │ │ │ ├── md_stub_progress_indeterminate.xml │ │ │ ├── md_dialog_basic.xml │ │ │ ├── md_simplelist_item.xml │ │ │ ├── md_listitem_multichoice.xml │ │ │ ├── md_listitem_singlechoice.xml │ │ │ ├── md_dialog_list.xml │ │ │ ├── md_stub_progress.xml │ │ │ └── md_dialog_input.xml │ │ ├── layout-ldrtl │ │ │ ├── md_simplelist_item.xml │ │ │ ├── md_listitem_multichoice.xml │ │ │ └── md_listitem_singlechoice.xml │ │ ├── values-v21 │ │ │ └── styles.xml │ │ └── values-v11 │ │ │ └── styles.xml │ │ └── java │ │ └── com │ │ └── afollestad │ │ └── materialdialogs │ │ ├── ProgressStyle.java │ │ ├── Theme.java │ │ ├── DialogAction.java │ │ ├── GravityEnum.java │ │ ├── util │ │ ├── TypefaceHelper.java │ │ └── DialogUtils.java │ │ ├── simplelist │ │ ├── MaterialSimpleListItem.java │ │ └── MaterialSimpleListAdapter.java │ │ ├── ThemeSingleton.java │ │ ├── DialogBase.java │ │ ├── internal │ │ ├── MDButton.java │ │ ├── MDTintHelper.java │ │ └── CircleView.java │ │ ├── MaterialDialogAdapter.java │ │ ├── prefs │ │ ├── MaterialDialogPreference.java │ │ ├── MaterialListPreference.java │ │ ├── MaterialMultiSelectListPreference.java │ │ └── MaterialEditTextPreference.java │ │ └── progress │ │ └── CircularProgressDrawable.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── art └── mdshowcase.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── LICENSE.txt ├── .gitignore ├── gradlew.bat └── gradlew /versions.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sample/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':library', ':sample' 2 | -------------------------------------------------------------------------------- /sample/ic_web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/ic_web.png -------------------------------------------------------------------------------- /sample/sample.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/sample.apk -------------------------------------------------------------------------------- /art/mdshowcase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/art/mdshowcase.png -------------------------------------------------------------------------------- /sample/keystore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/keystore.jks -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /library/src/main/res/values/bool.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable-hdpi/ic_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-hdpi/ic_check.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-mdpi/ic_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-mdpi/ic_check.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-xhdpi/ic_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-xhdpi/ic_check.png -------------------------------------------------------------------------------- /library/src/main/res/values-sw600dp/bool.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | -------------------------------------------------------------------------------- /library/src/main/res/values-sw720dp/bool.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-xxhdpi/ic_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-xxhdpi/ic_check.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-hdpi/ic_circle_darker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-hdpi/ic_circle_darker.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-mdpi/ic_circle_darker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-mdpi/ic_circle_darker.png -------------------------------------------------------------------------------- /library/src/main/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 446dp 4 | -------------------------------------------------------------------------------- /library/src/main/res/values-sw720dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 480dp 4 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable-hdpi/ic_circle_lighter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-hdpi/ic_circle_lighter.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-mdpi/ic_circle_lighter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-mdpi/ic_circle_lighter.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-xhdpi/ic_circle_darker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-xhdpi/ic_circle_darker.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-xhdpi/ic_circle_lighter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-xhdpi/ic_circle_lighter.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-xxhdpi/ic_circle_darker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-xxhdpi/ic_circle_darker.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-xxhdpi/ic_circle_lighter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/material-dialogs/master/sample/src/main/res/drawable-xxhdpi/ic_circle_lighter.png -------------------------------------------------------------------------------- /sample/src/main/res/values/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 4 5 | 6 | -------------------------------------------------------------------------------- /library/src/main/java/com/afollestad/materialdialogs/ProgressStyle.java: -------------------------------------------------------------------------------- 1 | package com.afollestad.materialdialogs; 2 | 3 | public enum ProgressStyle { 4 | CIRCULAR, HORIZONTAL 5 | } -------------------------------------------------------------------------------- /sample/src/main/res/values-land/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 5 | 6 | -------------------------------------------------------------------------------- /library/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Back 4 | Done 5 | -------------------------------------------------------------------------------- /library/src/main/res/anim/decelerate_cubic.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /library/src/main/java/com/afollestad/materialdialogs/Theme.java: -------------------------------------------------------------------------------- 1 | package com.afollestad.materialdialogs; 2 | 3 | /** 4 | * @author Aidan Follestad (afollestad) 5 | */ 6 | public enum Theme { 7 | LIGHT, DARK 8 | } -------------------------------------------------------------------------------- /sample/src/main/res/values-v21/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8dp 6 | 7 | -------------------------------------------------------------------------------- /sample/src/main/res/values-w720dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 32dp 6 | 7 | -------------------------------------------------------------------------------- /sample/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/md_item_selected.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/md_transparent.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /sample/src/main/res/values-large/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8dp 4 | 32dp 5 | 32dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /library/src/main/java/com/afollestad/materialdialogs/DialogAction.java: -------------------------------------------------------------------------------- 1 | package com.afollestad.materialdialogs; 2 | 3 | /** 4 | * @author Aidan Follestad (afollestad) 5 | */ 6 | public enum DialogAction { 7 | POSITIVE, 8 | NEUTRAL, 9 | NEGATIVE 10 | } -------------------------------------------------------------------------------- /library/src/main/res/drawable/md_item_selected_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable-v21/md_btn_selector_custom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Nov 28 16:53:41 CST 2014 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip 7 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/preference_activity_custom.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /library/src/main/res/drawable-v21/md_btn_selector_ripple.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /library/src/main/res/drawable-v21/md_btn_selector_ripple_dark.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /sample/src/main/res/values-sw320dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 0dp 6 | 7 | 16dp 8 | 9 | -------------------------------------------------------------------------------- /library/src/main/res/anim/popup_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | -------------------------------------------------------------------------------- /library/src/main/res/anim/popup_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable/md_btn_selector_custom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable-v21/md_btn_selector_custom_holo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sample/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | #3F51B5 6 | #3949AB 7 | #009688 8 | #EF5350 9 | 10 | -------------------------------------------------------------------------------- /sample/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/md_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/md_btn_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/md_selector_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/md_btn_selector_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/dialog_webview.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /sample/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /library/src/main/res/layout/md_dialog_custom.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /library/src/main/res/layout/md_dialog_progress_indeterminate.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/aidanfollestad/Documents/android-sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /sample/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 14sp 6 | 18sp 7 | 2dp 8 | 9 | 10 | 0dp 11 | 12 | 16dp 13 | 14 | 0x02000000 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /sample/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/aidanfollestad/Documents/android-sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | -keep class !android.support.v7.internal.view.menu.**,** {*;} 20 | -dontwarn 21 | -ignorewarnings -------------------------------------------------------------------------------- /library/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | #33969696 12 | #40CBCBCB 13 | 14 | #10000000 15 | #10FFFFFF 16 | 17 | #1E88E5 18 | #1565C0 19 | 20 | #DD2C00 21 | 22 | -------------------------------------------------------------------------------- /library/src/main/res/drawable-v21/md_btn_shape.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /sample/src/main/java/com/afollestad/materialdialogssample/PreferenceActivityCompat.java: -------------------------------------------------------------------------------- 1 | package com.afollestad.materialdialogssample; 2 | 3 | import android.annotation.TargetApi; 4 | import android.os.Build; 5 | import android.os.Bundle; 6 | import android.view.MenuItem; 7 | 8 | @TargetApi(Build.VERSION_CODES.GINGERBREAD_MR1) 9 | public class PreferenceActivityCompat extends android.preference.PreferenceActivity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | addPreferencesFromResource(R.xml.preferences); 15 | } 16 | 17 | @Override 18 | public boolean onOptionsItemSelected(MenuItem item) { 19 | if (item.getItemId() == android.R.id.home) { 20 | onBackPressed(); 21 | return true; 22 | } 23 | return super.onOptionsItemSelected(item); 24 | } 25 | } -------------------------------------------------------------------------------- /library/src/main/res/drawable/md_btn_selected.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 9 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/md_btn_selected_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 9 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable/md_btn_selected_custom.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 9 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable/md_btn_unselected_custom.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 9 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /library/src/main/res/layout/md_stub_actionbuttons.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 9 | 10 | 16 | 17 | 23 | 24 | -------------------------------------------------------------------------------- /library/src/main/res/layout/md_stub_progress_indeterminate_horizontal.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 16 | 17 | 23 | 24 | -------------------------------------------------------------------------------- /library/src/main/res/layout/md_listitem.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 22 | 23 | -------------------------------------------------------------------------------- /sample/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | #3F51B5 6 | #9E9E9E 7 | #424242 8 | #1F1F1F 9 | #607D8B 10 | #795548 11 | #D32F2F 12 | #E91E63 13 | #9C27B0 14 | #5E35B1 15 | #1E88E5 16 | #03A9F4 17 | #00BCD4 18 | #009688 19 | #4CAF50 20 | #8BC34A 21 | #CDDC39 22 | #FFEB3B 23 | #FFC107 24 | #FF9800 25 | #FF5722 26 | 27 | 28 | 29 | Twitter 30 | Google 31 | Instagram 32 | Facebook 33 | 34 | 35 | -------------------------------------------------------------------------------- /sample/src/main/assets/changelog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 24 | 25 | 26 |

WebView Custom View

27 | 28 |
    29 |
  1. NEW: Hey!
  2. 30 |
  3. IMPROVE: Hello!
  4. 31 |
  5. FIX: Hi!
  6. 32 |
  7. FIX: Hey again!
  8. 33 |
  9. FIX: What?
  10. 34 |
  11. FIX: This is an example.
  12. 35 |
  13. MISC: How are you?
  14. 36 |
37 |

Material guidelines for dialogs: 38 | http://www.google.com/design/spec/components/dialogs.html. 39 |

40 | 41 | -------------------------------------------------------------------------------- /library/src/main/res/layout/md_dialog_progress.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /library/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'com.novoda.bintray-release' 3 | 4 | android { 5 | compileSdkVersion 23 6 | buildToolsVersion "23.0.0" 7 | 8 | defaultConfig { 9 | minSdkVersion 8 10 | targetSdkVersion 23 11 | versionCode 1 12 | versionName "0.7.9.0" 13 | } 14 | lintOptions { 15 | abortOnError false 16 | } 17 | } 18 | 19 | dependencies { 20 | compile fileTree(dir: 'libs', include: ['*.jar']) 21 | compile 'com.android.support:support-v4:23.0.0' 22 | compile 'com.android.support:appcompat-v7:23.0.0' 23 | compile 'com.android.support:recyclerview-v7:23.0.0' 24 | compile 'com.android.support:support-annotations:23.0.0' 25 | } 26 | 27 | publish { 28 | userOrg = 'drummer-aidan' 29 | groupId = 'com.afollestad' 30 | artifactId = 'material-dialogs' 31 | version = '0.7.9.0' 32 | description = 'A library for implementing Material design styled dialogs across all versions of Android.' 33 | website = 'https://github.com/afollestad/material-dialogs' 34 | issueTracker = "${website}/issues" 35 | repository = "${website}.git" 36 | } -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Aidan Michael Follestad 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /library/src/main/java/com/afollestad/materialdialogs/GravityEnum.java: -------------------------------------------------------------------------------- 1 | package com.afollestad.materialdialogs; 2 | 3 | import android.os.Build; 4 | import android.view.Gravity; 5 | import android.view.View; 6 | 7 | public enum GravityEnum { 8 | START, CENTER, END; 9 | 10 | private static final boolean HAS_RTL = Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1; 11 | 12 | public int getGravityInt() { 13 | switch (this) { 14 | case START: 15 | return HAS_RTL ? Gravity.START : Gravity.LEFT; 16 | case CENTER: 17 | return Gravity.CENTER_HORIZONTAL; 18 | case END: 19 | return HAS_RTL ? Gravity.END : Gravity.RIGHT; 20 | default: 21 | throw new IllegalStateException("Invalid gravity constant"); 22 | } 23 | } 24 | 25 | public int getTextAlignment() { 26 | switch (this) { 27 | case CENTER: 28 | return View.TEXT_ALIGNMENT_CENTER; 29 | case END: 30 | return View.TEXT_ALIGNMENT_VIEW_END; 31 | default: 32 | return View.TEXT_ALIGNMENT_VIEW_START; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /library/src/main/res/layout/md_dialog_progress_indeterminate_horizontal.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /library/src/main/res/layout/md_stub_inputpref.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 26 | 27 | -------------------------------------------------------------------------------- /library/src/main/res/layout/md_stub_titleframe.xml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 21 | 22 | 28 | 29 | -------------------------------------------------------------------------------- /sample/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.0" 6 | 7 | signingConfigs { 8 | production { 9 | keyAlias 'afollestad' 10 | keyPassword 'aidan1995' 11 | storeFile file('./keystore.jks') 12 | storePassword 'aidan1995' 13 | } 14 | } 15 | 16 | defaultConfig { 17 | applicationId "com.afollestad.materialdialogssample" 18 | minSdkVersion 9 19 | targetSdkVersion 23 20 | versionCode 138 21 | versionName "0.7.9.0" 22 | } 23 | lintOptions { 24 | abortOnError false 25 | } 26 | buildTypes { 27 | debug { 28 | signingConfig signingConfigs.production 29 | } 30 | release { 31 | signingConfig signingConfigs.production 32 | minifyEnabled true 33 | shrinkResources true 34 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 35 | } 36 | } 37 | } 38 | 39 | dependencies { 40 | compile fileTree(dir: 'libs', include: ['*.jar']) 41 | compile project(':library') 42 | compile 'com.android.support:gridlayout-v7:23.0.0' 43 | } -------------------------------------------------------------------------------- /sample/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /library/src/main/res/layout/md_stub_progress_indeterminate.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 18 | 19 | 31 | 32 | -------------------------------------------------------------------------------- /library/src/main/res/layout/md_dialog_basic.xml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 19 | 20 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/dialog_customlistitem.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 19 | 20 |