瀏覽代碼

Added information about progress dialog proguard rules

Aidan Follestad 10 年之前
父節點
當前提交
bd9aaf266e
共有 2 個文件被更改,包括 19 次插入5 次删除
  1. 17 5
      README.md
  2. 2 0
      sample/proguard-rules.pro

+ 17 - 5
README.md

@@ -39,11 +39,12 @@
     2. [Limiting Input Length](https://github.com/afollestad/material-dialogs#limiting-input-length)
     3. [Custom Invalidation](https://github.com/afollestad/material-dialogs#custom-invalidation)
 21. [Progress Dialogs](https://github.com/afollestad/material-dialogs#progress-dialogs)
-    1. [Indeterminate Progress Dialogs](https://github.com/afollestad/material-dialogs#indeterminate-progress-dialogs)
-    2. [Determinate (Seek Bar) Progress Dialogs](https://github.com/afollestad/material-dialogs#determinate-seek-bar-progress-dialogs)
-    3. [Make an Indeterminate Dialog Horizontal](https://github.com/afollestad/material-dialogs#make-an-indeterminate-dialog-horizontal)
-    4. [Coloring the Progress Bar](https://github.com/afollestad/material-dialogs#coloring-the-progress-bar)
-    5. [Custom Number and Progress Formats](https://github.com/afollestad/material-dialogs#custom-number-and-progress-formats)
+    1. [Proguard](https://github.com/afollestad/material-dialogs#proguard)
+    2. [Indeterminate Progress Dialogs](https://github.com/afollestad/material-dialogs#indeterminate-progress-dialogs)
+    3. [Determinate (Seek Bar) Progress Dialogs](https://github.com/afollestad/material-dialogs#determinate-seek-bar-progress-dialogs)
+    4. [Make an Indeterminate Dialog Horizontal](https://github.com/afollestad/material-dialogs#make-an-indeterminate-dialog-horizontal)
+    5. [Coloring the Progress Bar](https://github.com/afollestad/material-dialogs#coloring-the-progress-bar)
+    6. [Custom Number and Progress Formats](https://github.com/afollestad/material-dialogs#custom-number-and-progress-formats)
 22. [Color Chooser Dialog](https://github.com/afollestad/material-dialogs#color-chooser-dialog)
 24. [Tint Helper](https://github.com/afollestad/material-dialogs#tint-helper)
 25. [Misc](https://github.com/afollestad/material-dialogs#misc)
@@ -900,6 +901,17 @@ dialog.getActionButton(DialogAction.POSITIVE).setEnabled(false);
 This library allows you to display progress dialogs with Material design that even use your app's
 accent color to color the progress bars (if you use AppCompat to theme your app, or the Material theme on Lollipop).
 
+## Proguard
+
+On Android 4.0 and above, custom Progress drawables are used from [MaterialProgressBar](https://github.com/DreaminginCodeZH/MaterialProgressBar)
+in order to provide consistent progress bars across all Android versions and flavors. Since it uses
+`ObjectAnimators` which call by reflection, you need to add a rule to your app's Proguard file. If you don't,
+the progress drawables will be invisible on some devices.
+
+```Gradle
+-keep class com.afollestad.materialdialogs.internal.progress.** { *; }
+```
+
 ## Indeterminate Progress Dialogs
 
 This will display the classic progress dialog with a spinning circle, see the sample project to see it in action:

+ 2 - 0
sample/proguard-rules.pro

@@ -16,6 +16,8 @@
 #   public *;
 #}
 
+-keep class com.afollestad.materialdialogs.internal.progress.** { *; }
+
 -keep class !android.support.v7.internal.view.menu.**,** {*;}
 -dontwarn
 -ignorewarnings