// Path: app/src/main/java/com/gigabytedevelopersinc/app/calculator/Calculator.java
// public enum Panel {
//     GRAPH, FUNCTION, HEX, BASIC, ADVANCED, MATRIX;
// 
//     int order;
// 
//     public void setOrder(int order) {
//         this.order = order;
//     }
// 
//     public int getOrder() {
//         return order;
//     }
// }
// 
// Path: app/src/main/java/com/gigabytedevelopersinc/app/calculator/view/CalculatorViewPager.java
// public class CalculatorViewPager extends ViewPager {
//     private boolean enabled;
// 
//     public CalculatorViewPager(Context context) {
//         this(context, null);
//     }
// 
//     public CalculatorViewPager(Context context, AttributeSet attrs) {
//         super(context, attrs);
//         this.enabled = true;
//     }
// 
//     /**
//      * ViewPager inherits ViewGroup's default behavior of delayed clicks on its
//      * children, but in order to make the calc buttons more responsive we
//      * disable that here.
//      */
//     public boolean shouldDelayChildPressedState() {
//         return false;
//     }
// 
//     @Override
//     public boolean onTouchEvent(MotionEvent event) {
//         if(this.enabled) {
//             return super.onTouchEvent(event);
//         }
// 
//         return false;
//     }
// 
//     @Override
//     public boolean onInterceptTouchEvent(MotionEvent event) {
//         if(this.enabled) {
//             return super.onInterceptTouchEvent(event);
//         }
// 
//         return false;
//     }
// 
//     public void setPagingEnabled(boolean enabled) {
//         this.enabled = enabled;
//     }
// 
//     public boolean getPagingEnabled() {
//         return enabled;
//     }
// }


import org.achartengine.GraphicalView;
import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.gigabytedevelopersinc.app.calculator.Calculator.Panel;
import com.gigabytedevelopersinc.app.calculator.view.CalculatorViewPager;
    public void finishUpdate(View container) {}

    @Override
    public boolean isViewFromObject(View view, Object object) {
        return view == object;
    }

    @Override
    public Parcelable saveState() {
        return null;
    }

    @Override
    public void restoreState(Parcelable state, ClassLoader loader) {}

    @Override
    public void notifyDataSetChanged() {
        super.notifyDataSetChanged();

        setOrder();
    }

    private void setOrder() {
        count = 0;
        if(CalculatorSettings.graphPanel(mParent.getContext())) {
            Panel.GRAPH.setOrder(count);
            count++;
        }
        if(CalculatorSettings.functionPanel(mParent.getContext())) {
            Panel.FUNCTION.setOrder(count);
// Path: app/src/main/java/com/gigabytedevelopersinc/app/calculator/Calculator.java
// public enum Panel {
//     GRAPH, FUNCTION, HEX, BASIC, ADVANCED, MATRIX;
// 
//     int order;
// 
//     public void setOrder(int order) {
//         this.order = order;
//     }
// 
//     public int getOrder() {
//         return order;
//     }
// }
// 
// Path: app/src/main/java/com/gigabytedevelopersinc/app/calculator/view/CalculatorViewPager.java
// public class CalculatorViewPager extends ViewPager {
//     private boolean enabled;
// 
//     public CalculatorViewPager(Context context) {
//         this(context, null);
//     }
// 
//     public CalculatorViewPager(Context context, AttributeSet attrs) {
//         super(context, attrs);
//         this.enabled = true;
//     }
// 
//     /**
//      * ViewPager inherits ViewGroup's default behavior of delayed clicks on its
//      * children, but in order to make the calc buttons more responsive we
//      * disable that here.
//      */
//     public boolean shouldDelayChildPressedState() {
//         return false;
//     }
// 
//     @Override
//     public boolean onTouchEvent(MotionEvent event) {
//         if(this.enabled) {
//             return super.onTouchEvent(event);
//         }
// 
//         return false;
//     }
// 
//     @Override
//     public boolean onInterceptTouchEvent(MotionEvent event) {
//         if(this.enabled) {
//             return super.onInterceptTouchEvent(event);
//         }
// 
//         return false;
//     }
// 
//     public void setPagingEnabled(boolean enabled) {
//         this.enabled = enabled;
//     }
// 
//     public boolean getPagingEnabled() {
//         return enabled;
//     }
// }


// Path: app/src/main/java/com/gigabytedevelopersinc/app/calculator/PageAdapter.java
import org.achartengine.GraphicalView;
import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.gigabytedevelopersinc.app.calculator.Calculator.Panel;
import com.gigabytedevelopersinc.app.calculator.view.CalculatorViewPager;

    public void finishUpdate(View container) {}

    @Override
    public boolean isViewFromObject(View view, Object object) {
        return view == object;
    }

    @Override
    public Parcelable saveState() {
        return null;
    }

    @Override
    public void restoreState(Parcelable state, ClassLoader loader) {}

    @Override
    public void notifyDataSetChanged() {
        super.notifyDataSetChanged();

        setOrder();
    }

    private void setOrder() {
        count = 0;
        if(CalculatorSettings.graphPanel(mParent.getContext())) {
            Panel.GRAPH.setOrder(count);
            count++;
        }
        if(CalculatorSettings.functionPanel(mParent.getContext())) {
            Panel.FUNCTION.setOrder(count);
            count++;