Aidan Follestad пре 10 година
родитељ
комит
90108f5ea6

+ 5 - 0
README.md

@@ -6,6 +6,11 @@ The code you see below is also found in the sample project. You can download a A
 
 ### What's New
 
+###### Version 0.3.4
+
+> 1. Crash fix when updating list items after they had previosly been set.
+> 2. The ability to set the content color when constructing a dialog builder.
+
 ###### Version 0.3.3
 
 > 1. Support down to API 8, thanks [acappelli](https://github.com/acappelli)

+ 2 - 2
library/build.gradle

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

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

@@ -215,20 +215,20 @@ public class MaterialDialog extends DialogBase implements View.OnClickListener,
                 title.setGravity(Gravity.RIGHT);
             }
         }
-        
+
         //Content color is set here.
         if (builder.contentColor != -1) {
-                content.setTextColor(builder.contentColor);
-            } else {
-                content.setTextColor(DialogUtils.resolveColor(getContext(), android.R.attr.textColorSecondary));
-            }
+            content.setTextColor(builder.contentColor);
+        } else {
+            content.setTextColor(DialogUtils.resolveColor(getContext(), android.R.attr.textColorSecondary));
+        }
 
         invalidateActions();
         setOnShowListenerInternal();
         setViewInternal(view);
 
         if (builder.theme == Theme.LIGHT && Build.VERSION.SDK_INT <=
-            Build.VERSION_CODES.GINGERBREAD_MR1) {
+                Build.VERSION_CODES.GINGERBREAD_MR1) {
             setInverseBackgroundForced(true);
             title.setTextColor(Color.BLACK);
             content.setTextColor(Color.BLACK);
@@ -372,8 +372,8 @@ public class MaterialDialog extends DialogBase implements View.OnClickListener,
         if (titleFrame.getVisibility() == View.VISIBLE || icon.getVisibility() == View.VISIBLE) {
             final int customFramePadding = (int) getContext().getResources().getDimension(R.dimen.md_title_margin_plainlist);
             title.setPadding(customFramePadding, dialogFramePadding, customFramePadding, title.getPaddingBottom());
-            View titleFrame = (View) title.getParent();
-            customFrame.removeView(titleFrame);
+            ViewGroup titleFrame = (ViewGroup) title.getParent();
+            titleFrame.removeView(titleFrame);
             listViewContainer.addView(titleFrame, 0);
         } else {
             listView.setPadding(listView.getPaddingLeft(), mainFramePadding,