@@ -0,0 +1,1202 @@
+package uk.co.sftrabbit.stacksync.view;%0A%0Aimport android.content.Context;%0Aimport android.graphics.Rect;%0Aimport android.util.AttributeSet;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.Gravity;%0Aimport android.widget.FrameLayout;%0Aimport android.widget.ImageButton;%0Aimport android.widget.Toast;%0Aimport uk.co.sftrabbit.stacksync.R;%0A%0Apublic class SquareLayout extends FrameLayout %7B%0A  private final Context context;%0A%0A  public SquareLayout(Context context) %7B%0A    this(context, null);%0A  %7D%0A%0A  public SquareLayout(Context context, AttributeSet attrs) %7B%0A    super(context, attrs);%0A%0A    this.context = context;%0A  %7D%0A%0A  @Override%0A  protected void onMeasure(int widthMeasureSpec,%0A      int heightMeasureSpec) %7B%0A    final int height = getDefaultSize(getSuggestedMinimumHeight(),%0A      heightMeasureSpec);%0A    setMeasuredDimension(height, height);%0A%0A    final int count = getChildCount();%0A    for (int i = 0; i %3C count; i++) %7B%0A      final View child = getChildAt(i);%0A      child.measure(%0A        MeasureSpec.makeMeasureSpec(getMeasuredWidth(),%0A          MeasureSpec.EXACTLY),%0A        MeasureSpec.makeMeasureSpec(getMeasuredHeight(),%0A          MeasureSpec.EXACTLY)%0A      );%0A    %7D%0A  %7D%0A%7D%0A

Add SquareLayout for square images in lists