// Path: android-studio-version/AndroidMosaicLayoutExample/androidmosaiclayout/src/main/java/com/adhamenaya/androidmosaiclayout/listeners/OnItemClickListener.java
// public interface OnItemClickListener {
//  
// 	public void onClick(int position);
// 
// }
// 
// Path: android-studio-version/AndroidMosaicLayoutExample/androidmosaiclayout/src/main/java/com/adhamenaya/androidmosaiclayout/listeners/OnItemLongClickListener.java
// public interface OnItemLongClickListener {
// 
// 	public void onLongClick(int position);
// 
// }
// 
// Path: android-studio-version/AndroidMosaicLayoutExample/androidmosaiclayout/src/main/java/com/adhamenaya/androidmosaiclayout/views/BlockPattern.java
// public enum BLOCK_PATTERN {
// 	SMALL, BIG, VERTICAL, HORIZONTAL, EMPTY
// };


import java.util.ArrayList;
import java.util.List;
import android.app.Activity;
import android.content.Context;
import android.support.v4.widget.NestedScrollView;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.FrameLayout;
import com.adhamenaya.androidmosaiclayout.listeners.OnItemClickListener;
import com.adhamenaya.androidmosaiclayout.listeners.OnItemLongClickListener;
import com.adhamenaya.androidmosaiclayout.views.BlockPattern.BLOCK_PATTERN;
package com.adhamenaya.androidmosaiclayout.views;




public class MosaicLayout extends NestedScrollView {

	private ArrayList<Cell> cells = new ArrayList<Cell>();

	// The number of cells in each row
	private static final int NO_CESLLS = 4;
	private double d = 0.0;
// Path: android-studio-version/AndroidMosaicLayoutExample/androidmosaiclayout/src/main/java/com/adhamenaya/androidmosaiclayout/listeners/OnItemClickListener.java
// public interface OnItemClickListener {
//  
// 	public void onClick(int position);
// 
// }
// 
// Path: android-studio-version/AndroidMosaicLayoutExample/androidmosaiclayout/src/main/java/com/adhamenaya/androidmosaiclayout/listeners/OnItemLongClickListener.java
// public interface OnItemLongClickListener {
// 
// 	public void onLongClick(int position);
// 
// }
// 
// Path: android-studio-version/AndroidMosaicLayoutExample/androidmosaiclayout/src/main/java/com/adhamenaya/androidmosaiclayout/views/BlockPattern.java
// public enum BLOCK_PATTERN {
// 	SMALL, BIG, VERTICAL, HORIZONTAL, EMPTY
// };


// Path: android-studio-version/AndroidMosaicLayoutExample/androidmosaiclayout/src/main/java/com/adhamenaya/androidmosaiclayout/views/MosaicLayout.java
import java.util.ArrayList;
import java.util.List;
import android.app.Activity;
import android.content.Context;
import android.support.v4.widget.NestedScrollView;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.FrameLayout;
import com.adhamenaya.androidmosaiclayout.listeners.OnItemClickListener;
import com.adhamenaya.androidmosaiclayout.listeners.OnItemLongClickListener;
import com.adhamenaya.androidmosaiclayout.views.BlockPattern.BLOCK_PATTERN;

package com.adhamenaya.androidmosaiclayout.views;




public class MosaicLayout extends NestedScrollView {

	private ArrayList<Cell> cells = new ArrayList<Cell>();

	// The number of cells in each row
	private static final int NO_CESLLS = 4;
	private double d = 0.0;
	private int counter = 0, coorX = 0, coorY = 0;