Browse Source

Release 0.5.6, quick fix.

Aidan Follestad 10 years ago
parent
commit
213a74ad2d

+ 3 - 1
CHANGELOG.md

@@ -1,11 +1,13 @@
 # Changelog
 
-###### Version 0.5.5
+###### Version 0.5.5 - 0.5.6
 
 > 1. Added `itemColor` and `itemColorRes` methods to the Builder for changing default list item color.
 > 2. Added `accentColor` and `accentColorRes` methods as a convenience method to the three methods `positiveColor`, `negativeColor`, and `neutralColor` (and their 'res' variants).
 > 3. Added `ThemeSingleton`, for internal use only right now unless you really think your app needs it. Used for dynamic global theming (changing at/after runtime).
 > 4. In the Builder, the `icon` method for a drawable resource ID was renamed to `iconRes` for consistency.
+>
+> Quick fix in 0.5.6.
 
 ###### Version 0.5.4
 

+ 4 - 2
README.md

@@ -8,12 +8,14 @@ The code you see below is also found in the sample project. You can download a A
 
 For the full history, see the [Changelog](https://github.com/afollestad/material-dialogs/blob/master/CHANGELOG.md).
 
-###### Version 0.5.5
+###### Version 0.5.5 - 0.5.6
 
 > 1. Added `itemColor` and `itemColorRes` methods to the Builder for changing default list item color.
 > 2. Added `accentColor` and `accentColorRes` methods as a convenience method to the three methods `positiveColor`, `negativeColor`, and `neutralColor` (and their 'res' variants).
 > 3. Added `ThemeSingleton`, for internal use only right now unless you really think your app needs it. Used for dynamic global theming (changing at/after runtime).
 > 4. In the Builder, the `icon` method for a drawable resource ID was renamed to `iconRes` for consistency.
+>
+> Quick fix in 0.5.6.
 
 ###### Version 0.5.4
 
@@ -57,7 +59,7 @@ Easily reference the library in your Android projects using this dependency in y
 
 ```Groovy
 dependencies {
-    compile 'com.afollestad:material-dialogs:0.5.5'
+    compile 'com.afollestad:material-dialogs:0.5.6'
 }
 ```
 

+ 2 - 2
library/build.gradle

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

+ 7 - 7
library/src/main/java/com/afollestad/materialdialogs/MaterialDialog.java

@@ -154,7 +154,7 @@ public class MaterialDialog extends DialogBase implements View.OnClickListener {
             content.setTextColor(contentColor);
         }
 
-        if (builder.itemColor != -1) {
+        if (builder.itemColor != 0) {
             defaultItemColor = builder.itemColor;
         } else if (builder.theme == Theme.LIGHT) {
             defaultItemColor = Color.BLACK;
@@ -893,19 +893,19 @@ public class MaterialDialog extends DialogBase implements View.OnClickListener {
             if (ThemeSingleton.get(false) == null) return;
             ThemeSingleton s = ThemeSingleton.get();
             theme(s.darkTheme ? Theme.DARK : Theme.LIGHT);
-            if (s.titleColor != -1)
+            if (s.titleColor != 0)
                 titleColor(s.titleColor);
-            if (s.contentColor != -1)
+            if (s.contentColor != 0)
                 contentColor(s.contentColor);
-            if (s.accentColor != -1)
+            if (s.accentColor != 0)
                 accentColor(s.accentColor);
-            if (s.itemColor != -1)
+            if (s.itemColor != 0)
                 itemColor(s.itemColor);
             if (s.icon != null)
                 icon(s.icon);
-            if (s.backgroundColor != -1)
+            if (s.backgroundColor != 0)
                 backgroundColor(s.backgroundColor);
-            if (s.dividerColor != -1)
+            if (s.dividerColor != 0)
                 dividerColor(s.dividerColor);
         }
 

+ 6 - 6
library/src/main/java/com/afollestad/materialdialogs/ThemeSingleton.java

@@ -29,11 +29,11 @@ public class ThemeSingleton {
 //    <attr name="md_divider_color" format="color" />
 
     public boolean darkTheme = false;
-    public int titleColor = -1;
-    public int contentColor = -1;
-    public int accentColor = -1;
-    public int itemColor = -1;
+    public int titleColor = 0;
+    public int contentColor = 0;
+    public int accentColor = 0;
+    public int itemColor = 0;
     public Drawable icon = null;
-    public int backgroundColor = -1;
-    public int dividerColor = -1;
+    public int backgroundColor = 0;
+    public int dividerColor = 0;
 }

+ 2 - 2
sample/build.gradle

@@ -8,8 +8,8 @@ android {
         applicationId "com.afollestad.materialdialogssample"
         minSdkVersion 14
         targetSdkVersion 21
-        versionCode 60
-        versionName "0.5.5"
+        versionCode 61
+        versionName "0.5.6"
     }
     lintOptions {
         abortOnError false

+ 1 - 1
sample/src/main/java/com/afollestad/materialdialogssample/ColorChooserDialog.java

@@ -51,7 +51,7 @@ public class ColorChooserDialog extends DialogFragment implements View.OnClickLi
                 .customView(R.layout.dialog_color_chooser, false)
                 .build();
 
-        final TypedArray ta = getActivity().getResources().obtainTypedArray(R.array.material_colors_500);
+        final TypedArray ta = getActivity().getResources().obtainTypedArray(R.array.colors);
         mColors = new int[ta.length()];
         for (int i = 0; i < ta.length(); i++)
             mColors[i] = ta.getColor(i, 0);

+ 13 - 12
sample/src/main/res/values/arrays.xml

@@ -1,27 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
 
-    <array name="material_colors_500">
-        <item>#F44336</item>
+    <array name="colors">
+        <item>#3F51B5</item>
+        <item>#9E9E9E</item>
+        <item>#424242</item>
+        <item>#1F1F1F</item>
+        <item>#607D8B</item>
+        <item>#795548</item>
+        <item>#D32F2F</item>
         <item>#E91E63</item>
         <item>#9C27B0</item>
-        <item>#673AB7</item>
-        <item>#3F51B5</item>
-        <item>#2196F3</item>
+        <item>#5E35B1</item>
+        <item>#1E88E5</item>
         <item>#03A9F4</item>
         <item>#00BCD4</item>
         <item>#009688</item>
         <item>#4CAF50</item>
         <item>#8BC34A</item>
         <item>#CDDC39</item>
-        <item>#FDD835</item>
-        <item>#FFB300</item>
-        <item>#FB8C00</item>
+        <item>#FFEB3B</item>
+        <item>#FFC107</item>
+        <item>#FF9800</item>
         <item>#FF5722</item>
-        <item>#795548</item>
-        <item>#9E9E9E</item>
-        <item>#607D8B</item>
-        <item>#424242</item>
     </array>
 
 </resources>