// Path: app/src/main/java/com/gigabytedevelopersinc/app/calculator/Calculator.java
// public enum SmallPanel {
//     HEX, ADVANCED, FUNCTION;
// 
//     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 android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.gigabytedevelopersinc.app.calculator.Calculator.SmallPanel;
import com.gigabytedevelopersinc.app.calculator.view.CalculatorViewPager;
        case BINARY:
            mHexPage.findViewById(R.id.bin).setBackgroundResource(R.color.pressed_color);
            for(int i : mLogic.mBaseModule.bannedResourceInBinary) {
                View v = mHexPage.findViewById(i);
                if(v != null) v.setEnabled(false);
            }
            break;
        case DECIMAL:
            mHexPage.findViewById(R.id.dec).setBackgroundResource(R.color.pressed_color);
            for(int i : mLogic.mBaseModule.bannedResourceInDecimal) {
                View v = mHexPage.findViewById(i);
                if(v != null) v.setEnabled(false);
            }
            break;
        case HEXADECIMAL:
            mHexPage.findViewById(R.id.hex).setBackgroundResource(R.color.pressed_color);
            break;
        }
    }

    @Override
    public int getCount() {
        return count;
    }

    @Override
    public void startUpdate(View container) {}

    @Override
    public Object instantiateItem(View container, int position) {
// Path: app/src/main/java/com/gigabytedevelopersinc/app/calculator/Calculator.java
// public enum SmallPanel {
//     HEX, ADVANCED, FUNCTION;
// 
//     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/SmallPageAdapter.java
import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.gigabytedevelopersinc.app.calculator.Calculator.SmallPanel;
import com.gigabytedevelopersinc.app.calculator.view.CalculatorViewPager;

        case BINARY:
            mHexPage.findViewById(R.id.bin).setBackgroundResource(R.color.pressed_color);
            for(int i : mLogic.mBaseModule.bannedResourceInBinary) {
                View v = mHexPage.findViewById(i);
                if(v != null) v.setEnabled(false);
            }
            break;
        case DECIMAL:
            mHexPage.findViewById(R.id.dec).setBackgroundResource(R.color.pressed_color);
            for(int i : mLogic.mBaseModule.bannedResourceInDecimal) {
                View v = mHexPage.findViewById(i);
                if(v != null) v.setEnabled(false);
            }
            break;
        case HEXADECIMAL:
            mHexPage.findViewById(R.id.hex).setBackgroundResource(R.color.pressed_color);
            break;
        }
    }

    @Override
    public int getCount() {
        return count;
    }

    @Override
    public void startUpdate(View container) {}

    @Override
    public Object instantiateItem(View container, int position) {
        if(position == SmallPanel.FUNCTION.getOrder() && CalculatorSettings.functionPanel(mParent.getContext())) {