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); }