From 747f1e005e219d42a7a1cbc2e9e5cab8fe547bfa Mon Sep 17 00:00:00 2001 From: razerdp Date: Thu, 8 Dec 2016 12:03:14 +0800 Subject: [PATCH] =?UTF-8?q?//=20=E5=8D=95=E5=9B=BE=E7=9A=84=E5=AE=BD?= =?UTF-8?q?=E9=AB=98=E8=AE=BE=E5=AE=9A=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- .../main/java/razerdp/github/com/widget/PhotoContents.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index bd510e1..9a0e6c8 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.2.2' + classpath 'com.android.tools.build:gradle:2.2.3' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/lib/src/main/java/razerdp/github/com/widget/PhotoContents.java b/lib/src/main/java/razerdp/github/com/widget/PhotoContents.java index 875e687..dc75776 100644 --- a/lib/src/main/java/razerdp/github/com/widget/PhotoContents.java +++ b/lib/src/main/java/razerdp/github/com/widget/PhotoContents.java @@ -3,6 +3,7 @@ import android.content.Context; import android.support.annotation.NonNull; import android.util.AttributeSet; +import android.util.Log; import android.util.SparseArray; import android.view.View; import android.view.ViewGroup; @@ -214,7 +215,9 @@ private ImageView obtainView(int position) { protected LayoutParams generateDefaultMultiLayoutParams(boolean isSingle) { LayoutParams p; if (isSingle) { - p = new PhotoContents.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); +// p = new PhotoContents.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); + p = new PhotoContents.LayoutParams(maxSingleWidth, maxSingleHeight); + } else { p = new PhotoContents.LayoutParams(multiChildSize, multiChildSize); }