private void setOrder() {
   count = 0;
   if (CalculatorSettings.hexPanel(mParent.getContext())) {
     SmallPanel.HEX.setOrder(count);
     count++;
   }
   if (CalculatorSettings.advancedPanel(mParent.getContext())) {
     SmallPanel.ADVANCED.setOrder(count);
     count++;
   }
   if (CalculatorSettings.functionPanel(mParent.getContext())) {
     SmallPanel.FUNCTION.setOrder(count);
     count++;
   }
 }
 @Override
 public Object instantiateItem(View container, int position) {
   if (position == SmallPanel.FUNCTION.getOrder()
       && CalculatorSettings.functionPanel(mParent.getContext())) {
     ((ViewGroup) container).addView(mFunctionPage);
     return mFunctionPage;
   } else if (position == SmallPanel.ADVANCED.getOrder()
       && CalculatorSettings.advancedPanel(mParent.getContext())) {
     ((ViewGroup) container).addView(mAdvancedPage);
     return mAdvancedPage;
   } else if (position == SmallPanel.HEX.getOrder()
       && CalculatorSettings.hexPanel(mParent.getContext())) {
     ((ViewGroup) container).addView(mHexPage);
     return mHexPage;
   }
   return null;
 }