// Path: indicator/src/main/java/com/fuzz/indicator/cell/CutoutCell.java
// public interface CutoutCell {
// 
//     /**
//      * Perform some arbitrary action to represent the provided OffsetEvent.
//      *
//      * @param offsetEvent    whatever just happened
//      * @see OffSetters
//      */
//     void offsetContentBy(@NonNull IndicatorOffsetEvent offsetEvent);
// 
//     /**
//      * @return the actual view represented by this object
//      */
//     @NonNull
//     View getItemView();
// }
// 
// Path: indicator/src/main/java/com/fuzz/indicator/proxy/ProxyReference.java
// public interface ProxyReference {
//     /**
//      * Modifies the passed-in value to represent a valid child position in this
//      * {@link CutoutViewIndicator}.
//      * @param proposed    a proposed position index
//      * @return the corrected value
//      */
//     int fixPosition(int proposed);
// 
// }
// 
// Path: indicator/src/main/java/com/fuzz/indicator/proxy/ViewProvidingStateProxy.java
// public interface ViewProvidingStateProxy extends StateProxy {
//     /**
//      * In some use cases, it may be handy to have a reference to the original
//      * View when binding a representation thereof. See
//      * {@link CutoutCellGenerator#onBindChild(View, CutoutViewLayoutParams, View)}
//      * for details.
//      *
//      * @param cviPosition    position of a child within the CutoutViewIndicator
//      * @return the view which directly inspired the indicator's child
//      */
//     @Nullable
//     View getOriginalViewFor(int cviPosition);
// }


import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.database.Cursor;
import android.database.DataSetObserver;
import android.os.Build;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.fuzz.indicator.cell.CutoutCell;
import com.fuzz.indicator.cell.CutoutTextCell;
import com.fuzz.indicator.proxy.IndicatorOffsetEvent;
import com.fuzz.indicator.proxy.ProxyReference;
import com.fuzz.indicator.proxy.StateProxy;
import com.fuzz.indicator.proxy.UnavailableProxy;
import com.fuzz.indicator.proxy.ViewProvidingStateProxy;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
        } else {
            cellLength = lp.cellLength;
            perpendicularLength = lp.perpendicularLength;
            internalSpacing = lp.internalSpacing;
        }

        final int left, top;
        if (getOrientation() == HORIZONTAL) {
            lp.width = cellLength;
            lp.height = perpendicularLength;
            left = (position == 0) ? 0 : internalSpacing;
            top = 0;
        } else {
            lp.width = perpendicularLength;
            lp.height = cellLength;
            left = 0;
            top = (position == 0) ? 0 : internalSpacing;
        }
        lp.setMargins(left, top, 0, 0);
        lp.gravity = Gravity.CENTER;

        if (isInEditMode() && lp.cellBackgroundId <= 0 && lp.indicatorDrawableId <= 0) {
            String tag = "resources.unusual";
            String message = "Note that CutoutViewIndicator's generated views will not appear" +
                    " unless you provide it with a positive drawable id" +
                    " (i.e. for the attribute rcv_drawable).";
            logger.logToLayoutLib(tag, message);
        }

        View originator;
// Path: indicator/src/main/java/com/fuzz/indicator/cell/CutoutCell.java
// public interface CutoutCell {
// 
//     /**
//      * Perform some arbitrary action to represent the provided OffsetEvent.
//      *
//      * @param offsetEvent    whatever just happened
//      * @see OffSetters
//      */
//     void offsetContentBy(@NonNull IndicatorOffsetEvent offsetEvent);
// 
//     /**
//      * @return the actual view represented by this object
//      */
//     @NonNull
//     View getItemView();
// }
// 
// Path: indicator/src/main/java/com/fuzz/indicator/proxy/ProxyReference.java
// public interface ProxyReference {
//     /**
//      * Modifies the passed-in value to represent a valid child position in this
//      * {@link CutoutViewIndicator}.
//      * @param proposed    a proposed position index
//      * @return the corrected value
//      */
//     int fixPosition(int proposed);
// 
// }
// 
// Path: indicator/src/main/java/com/fuzz/indicator/proxy/ViewProvidingStateProxy.java
// public interface ViewProvidingStateProxy extends StateProxy {
//     /**
//      * In some use cases, it may be handy to have a reference to the original
//      * View when binding a representation thereof. See
//      * {@link CutoutCellGenerator#onBindChild(View, CutoutViewLayoutParams, View)}
//      * for details.
//      *
//      * @param cviPosition    position of a child within the CutoutViewIndicator
//      * @return the view which directly inspired the indicator's child
//      */
//     @Nullable
//     View getOriginalViewFor(int cviPosition);
// }


// Path: indicator/src/main/java/com/fuzz/indicator/CutoutViewIndicator.java
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.database.Cursor;
import android.database.DataSetObserver;
import android.os.Build;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.fuzz.indicator.cell.CutoutCell;
import com.fuzz.indicator.cell.CutoutTextCell;
import com.fuzz.indicator.proxy.IndicatorOffsetEvent;
import com.fuzz.indicator.proxy.ProxyReference;
import com.fuzz.indicator.proxy.StateProxy;
import com.fuzz.indicator.proxy.UnavailableProxy;
import com.fuzz.indicator.proxy.ViewProvidingStateProxy;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;

        } else {
            cellLength = lp.cellLength;
            perpendicularLength = lp.perpendicularLength;
            internalSpacing = lp.internalSpacing;
        }

        final int left, top;
        if (getOrientation() == HORIZONTAL) {
            lp.width = cellLength;
            lp.height = perpendicularLength;
            left = (position == 0) ? 0 : internalSpacing;
            top = 0;
        } else {
            lp.width = perpendicularLength;
            lp.height = cellLength;
            left = 0;
            top = (position == 0) ? 0 : internalSpacing;
        }
        lp.setMargins(left, top, 0, 0);
        lp.gravity = Gravity.CENTER;

        if (isInEditMode() && lp.cellBackgroundId <= 0 && lp.indicatorDrawableId <= 0) {
            String tag = "resources.unusual";
            String message = "Note that CutoutViewIndicator's generated views will not appear" +
                    " unless you provide it with a positive drawable id" +
                    " (i.e. for the attribute rcv_drawable).";
            logger.logToLayoutLib(tag, message);
        }

        View originator;
        if (stateProxy instanceof ViewProvidingStateProxy) {