// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/utils/ViewUtility.java
// public class ViewUtility {
//     @SuppressWarnings({"unchecked", "UnusedDeclaration"})
//     public static <T extends View> T findViewById(View view, int id) {
//         return (T) view.findViewById(id);
//     }
// 
//     @SuppressWarnings({"unchecked", "UnusedDeclaration"})
//     public static <T extends View> T findViewById(Activity activity, int id) {
//         return (T) activity.findViewById(id);
//     }
// 
// 
//     public final static int getWindowsWidth(Activity activity) {
//         DisplayMetrics dm = new DisplayMetrics();
//         activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
//         return dm.widthPixels;
//     }
// 
//     public static int dip2px(Context context, float dpValue) {
//         final float scale = context.getResources().getDisplayMetrics().density;
//         return (int) (dpValue * scale + 0.5f);
//     }
// 
//     public static int px2dip(Context context, float pxValue) {
//         final float scale = context.getResources().getDisplayMetrics().density;
//         return (int) (pxValue / scale + 0.5f);
//     }
// 
//     /** 获取手机的密度*/
//     public static float getDensity(Context context) {
//         DisplayMetrics dm = context.getResources().getDisplayMetrics();
//         return dm.density;
//     }
// }


import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.huijimuhe.commonlayout.utils.ViewUtility;
import java.util.List;
package com.huijimuhe.commonlayout.widget;




/**
 * @ClassName MultiImageView.java
 * @author shoyu
 * @version 
 * @Description: 显示1~N张图片的View
 */

public class NineGridLayout extends LinearLayout {
	public static int MAX_WIDTH = 0;

	// 照片的Url列表
	private List<String> imagesList;

	/** 长度 单位为Pixel **/
	private int pxOneMaxWandH;  // 单张图最大允许宽高
	private int pxMoreWandH = 0;// 多张图的宽高
// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/utils/ViewUtility.java
// public class ViewUtility {
//     @SuppressWarnings({"unchecked", "UnusedDeclaration"})
//     public static <T extends View> T findViewById(View view, int id) {
//         return (T) view.findViewById(id);
//     }
// 
//     @SuppressWarnings({"unchecked", "UnusedDeclaration"})
//     public static <T extends View> T findViewById(Activity activity, int id) {
//         return (T) activity.findViewById(id);
//     }
// 
// 
//     public final static int getWindowsWidth(Activity activity) {
//         DisplayMetrics dm = new DisplayMetrics();
//         activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
//         return dm.widthPixels;
//     }
// 
//     public static int dip2px(Context context, float dpValue) {
//         final float scale = context.getResources().getDisplayMetrics().density;
//         return (int) (dpValue * scale + 0.5f);
//     }
// 
//     public static int px2dip(Context context, float pxValue) {
//         final float scale = context.getResources().getDisplayMetrics().density;
//         return (int) (pxValue / scale + 0.5f);
//     }
// 
//     /** 获取手机的密度*/
//     public static float getDensity(Context context) {
//         DisplayMetrics dm = context.getResources().getDisplayMetrics();
//         return dm.density;
//     }
// }


// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/widget/NineGridLayout.java
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.huijimuhe.commonlayout.utils.ViewUtility;
import java.util.List;

package com.huijimuhe.commonlayout.widget;




/**
 * @ClassName MultiImageView.java
 * @author shoyu
 * @version 
 * @Description: 显示1~N张图片的View
 */

public class NineGridLayout extends LinearLayout {
	public static int MAX_WIDTH = 0;

	// 照片的Url列表
	private List<String> imagesList;

	/** 长度 单位为Pixel **/
	private int pxOneMaxWandH;  // 单张图最大允许宽高
	private int pxMoreWandH = 0;// 多张图的宽高
	private int pxImagePadding = ViewUtility.dip2px(getContext(), 3);// 图片间的间距