Aidan Follestad 10 năm trước cách đây
mục cha
commit
9e46325e72

+ 9 - 4
README.md

@@ -24,7 +24,7 @@ Easily reference the library in your Android projects using this dependency in y
 
 ```Gradle
 dependencies {
-    compile 'com.afollestad:material-dialogs:0.7.3.0'
+    compile 'com.afollestad:material-dialogs:0.7.3.1'
 }
 ```
 
@@ -40,6 +40,9 @@ repositories {
 }
 ```
 
+This will reference Bintray's Maven repository that contains material-dialogs directly, rather
+than going through jCenter first.
+
 ---
 
 # What's New
@@ -778,7 +781,7 @@ There's also a global theming attribute as shown in the Global Theming section o
 The code below will show a little indicator in the input dialog that tells the user how many characters they've
 typed, and how many more they can type before reaching a certain limit. If they go over that limit,
 the dialog won't allow them to submit the input. It will also color the input field and length indicator
-with an error color of your choosing.
+with an error color of your choosing (or the default if you don't specify one).
 
 ```java
 new MaterialDialog.Builder(this)
@@ -792,8 +795,10 @@ new MaterialDialog.Builder(this)
         }).show();
 ```
 
-**Note that `inputMaxLengthRes(int, int)` takes a color resource ID for the second parameter, while
-`inputMaxLength(int, int)` takes a literal color integer for the second parameter. You can use either one.**
+*Note that `inputMaxLengthRes(int, int)` takes a color resource ID for the second parameter, while
+`inputMaxLength(int, int)` takes a literal color integer for the second parameter. You can use either one.
+If you want to use the default error color from the guidelines, you can use `inputMaxLength(int)` which doesn't
+take the second error color parameter*
 
 ---
 

+ 2 - 2
library/build.gradle

@@ -9,7 +9,7 @@ android {
         minSdkVersion 8
         targetSdkVersion 22
         versionCode 1
-        versionName "0.7.3.0"
+        versionName "0.7.3.1"
     }
     lintOptions {
         abortOnError false
@@ -29,7 +29,7 @@ publish {
     userOrg = 'drummer-aidan'
     groupId = 'com.afollestad'
     artifactId = 'material-dialogs'
-    version = '0.7.3.0'
+    version = '0.7.3.1'
     description = 'A library for implementing Material design styled dialogs across all versions of Android.'
     website = 'https://github.com/afollestad/material-dialogs'
     issueTracker = "${website}/issues"

+ 2 - 2
sample/build.gradle

@@ -17,8 +17,8 @@ android {
         applicationId "com.afollestad.materialdialogssample"
         minSdkVersion 9
         targetSdkVersion 22
-        versionCode 118
-        versionName "0.7.3.0"
+        versionCode 119
+        versionName "0.7.3.1"
     }
     lintOptions {
         abortOnError false

BIN
sample/sample.apk


+ 5 - 5
sample/src/main/java/com/afollestad/materialdialogssample/MainActivity.java

@@ -506,10 +506,10 @@ public class MainActivity extends AppCompatActivity implements
 
         int widgetColor = ThemeSingleton.get().widgetColor;
         MDTintHelper.setTint(checkbox,
-                widgetColor == 0 ? getResources().getColor(R.color.material_pink_500) : widgetColor);
+                widgetColor == 0 ? getResources().getColor(R.color.material_teal_500) : widgetColor);
 
         MDTintHelper.setTint(passwordInput,
-                widgetColor == 0 ? getResources().getColor(R.color.material_pink_500) : widgetColor);
+                widgetColor == 0 ? getResources().getColor(R.color.material_teal_500) : widgetColor);
 
         dialog.show();
         positiveAction.setEnabled(false); // disabled by default
@@ -518,7 +518,7 @@ public class MainActivity extends AppCompatActivity implements
     private void showCustomWebView() {
         int accentColor = ThemeSingleton.get().widgetColor;
         if (accentColor == 0)
-            accentColor = getResources().getColor(R.color.material_pink_500);
+            accentColor = getResources().getColor(R.color.material_teal_500);
 
         ChangelogDialog.create(false, accentColor)
                 .show(getSupportFragmentManager(), "changelog");
@@ -556,7 +556,7 @@ public class MainActivity extends AppCompatActivity implements
                 .titleColorRes(R.color.material_red_400)
                 .contentColorRes(android.R.color.white)
                 .backgroundColorRes(R.color.material_blue_grey_800)
-                .dividerColorRes(R.color.material_pink_500)
+                .dividerColorRes(R.color.material_teal_500)
                 .btnSelector(R.drawable.md_btn_selector_custom, DialogAction.POSITIVE)
                 .positiveColor(Color.WHITE)
                 .negativeColorAttr(android.R.attr.textColorSecondaryInverse)
@@ -599,7 +599,7 @@ public class MainActivity extends AppCompatActivity implements
                 .inputType(InputType.TYPE_CLASS_TEXT |
                         InputType.TYPE_TEXT_VARIATION_PERSON_NAME |
                         InputType.TYPE_TEXT_FLAG_CAP_WORDS)
-                .inputMaxLength(16, 0)
+                .inputMaxLength(16)
                 .positiveText(R.string.submit)
                 .input(R.string.input_hint, R.string.input_hint, false, new MaterialDialog.InputCallback() {
                     @Override

+ 1 - 1
sample/src/main/res/values-v21/styles.xml

@@ -4,7 +4,7 @@
     <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
         <item name="colorPrimary">@color/material_indigo_500</item>
         <item name="colorPrimaryDark">@color/material_indigo_600</item>
-        <item name="colorAccent">@color/material_pink_500</item>
+        <item name="colorAccent">@color/material_teal_500</item>
 
         <item name="android:navigationBarColor">@color/material_indigo_500</item>
     </style>

+ 1 - 1
sample/src/main/res/values/colors.xml

@@ -4,7 +4,7 @@
     <!-- http://www.google.com/design/spec/style/color.html#color-color-palette -->
     <color name="material_indigo_500">#3F51B5</color>
     <color name="material_indigo_600">#3949AB</color>
-    <color name="material_pink_500">#E91E63</color>
+    <color name="material_teal_500">#009688</color>
     <color name="material_red_400">#EF5350</color>
 
 </resources>

+ 1 - 1
sample/src/main/res/values/styles.xml

@@ -4,7 +4,7 @@
     <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
         <item name="colorPrimary">@color/material_indigo_500</item>
         <item name="colorPrimaryDark">@color/material_indigo_600</item>
-        <item name="colorAccent">@color/material_pink_500</item>
+        <item name="colorAccent">@color/material_teal_500</item>
     </style>
 
 </resources>