Forráskód Böngészése

Quick fix, release 0.6.1.1

Aidan Follestad 10 éve
szülő
commit
ef196e2bf0

+ 2 - 2
library/build.gradle

@@ -9,7 +9,7 @@ android {
         minSdkVersion 8
         targetSdkVersion 21
         versionCode 1
-        versionName "0.6.1"
+        versionName "0.6.1.1"
     }
     lintOptions {
         abortOnError false
@@ -27,7 +27,7 @@ publish {
     userOrg = 'drummer-aidan'
     groupId = 'com.afollestad'
     artifactId = 'material-dialogs'
-    version = '0.6.1'
+    version = '0.6.1.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"

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

@@ -157,11 +157,10 @@ public class MaterialDialog extends DialogBase implements View.OnClickListener {
             if (mBuilder.wrapCustomViewInScroll) {
                 /* Apply the frame padding to the content, this allows the ScrollView to draw it's
                    overscroll glow without clipping */
-                Resources r = getContext().getResources();
-                int frameMargin = r.getDimensionPixelSize(R.dimen.md_dialog_frame_margin);
-                innerView.setPadding(frameMargin, 0, frameMargin, 0);
+                final Resources r = getContext().getResources();
+                final int frameMargin = r.getDimensionPixelSize(R.dimen.md_dialog_frame_margin);
 
-                ScrollView sv = new ScrollView(getContext());
+                final ScrollView sv = new ScrollView(getContext());
                 int paddingTop;
                 int paddingBottom;
                 if (titleFrame.getVisibility() != View.GONE)
@@ -174,7 +173,7 @@ public class MaterialDialog extends DialogBase implements View.OnClickListener {
                 else
                     paddingBottom = r.getDimensionPixelSize(R.dimen.md_dialog_frame_margin);
 
-                sv.setPadding(0, paddingTop, 0, paddingBottom);
+                sv.setPadding(frameMargin, paddingTop, frameMargin, paddingBottom);
                 sv.setClipToPadding(false);
                 sv.addView(innerView,
                         new ScrollView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,