private void initWorkspaceGridSize(View view) {
    // TextView
    final int x = mSharePrefManager.getWorkspaceCountCellX();
    final int y = mSharePrefManager.getWorkspaceCountCellY();

    if (mWorkspaceGridContainer != null) {
      int count = mWorkspaceGridContainer.getChildCount();
      for (int i = 0; i < count; i++) {
        final View child = mWorkspaceGridContainer.getChildAt(i);
        child.setEnabled(true);
        child.setActivated(false);
      }

      String strSize = x + "x" + y;
      TextView checkView = (TextView) mWorkspaceGridContainer.findViewWithTag(strSize);
      if (checkView != null) {
        checkView.setActivated(true);
        final Drawable[] dr = checkView.getCompoundDrawables();
        ((TextView) view).setCompoundDrawablesWithIntrinsicBounds(dr[0], dr[1], dr[2], dr[3]);
      }
    }

    //        final IResConfigManager resources = mLauncher.getResConfigManager();
    //        final String[] strArrays =
    // resources.getStringArray(IResConfigManager.ARRAY_WORKSPACE_GRID_SIZE_VALUES);
    //        int index = -1;
    //        if(strArrays != null){
    //
    //            index = getSelectWorkspaceGridSize(strArrays, x, y);
    //            if(index < 0)
    //                index = strArrays.length-1;
    //
    ////            android.util.Log.i("QsLog", "initWorkspaceGridSize====="
    ////                    +"==index:"+index
    ////                    +"==x:"+x
    ////                    +"==y:"+y);
    //
    //            Drawable icon = null;
    //            final TypedArray array =
    // resources.obtainTypedArray(IResConfigManager.ARRAY_WORKSPACE_GRID_SIZE_PREVIEWS);
    //            if(array != null){
    //                int n = array.length();
    //                if(index < n){
    //                    icon = array.getDrawable(index);
    //                }
    //                array.recycle();
    //            }
    //
    //            if(icon != null){
    //                ((TextView)view).setCompoundDrawablesWithIntrinsicBounds(null, icon, null,
    // null);
    //            }
    //        }
  }
        @Override
        public void run() {
          // TODO Auto-generated method stub
          if (!mIsAttached) return;

          boolean visiable =
              mSharePrefManager.getBoolean(
                  ISharedPrefSettingsManager.KEY_WORKSPACE_SHOW_LABEL,
                  ResConfigManager.CONFIG_SHOW_WORKSPACE_LABEL,
                  true);

          mSharePrefManager.setBoolean(
              ISharedPrefSettingsManager.KEY_WORKSPACE_SHOW_LABEL, !visiable);

          View view = mAppearanceContainer.findViewWithTag("label");
          if (view != null) view.setEnabled(true);
        }
  protected void changeWorkspaceGridSize(int x, int y) {
    //        android.util.Log.i("QsLog", "changeWorkspaceGridSize====="
    //                +"==x:"+mSharePrefManager.getWorkspaceCountCellX()
    //                +"==y:"+mSharePrefManager.getWorkspaceCountCellY()
    //                +"==x:"+x
    //                  +"==y:"+y);

    if (x > 0
        && y > 0
        && (x != mSharePrefManager.getWorkspaceCountCellX()
            || y != mSharePrefManager.getWorkspaceCountCellY())) {

      mLauncher.changeWorkspaceGridSize(mSharePrefManager, x, y, mUpdateGridComplete);

      int count = mWorkspaceGridContainer.getChildCount();
      for (int i = 0; i < count; i++) {
        final View child = mWorkspaceGridContainer.getChildAt(i);
        child.setEnabled(false);
      }
    }
  }
  private void initStatus() {
    View view = mAppearanceContainer.findViewWithTag("cycleslide");
    if (view != null && mWorkspace != null) {
      view.setActivated(mWorkspace.isSupportCycleSlidingScreen());
      view.setOnClickListener(this);
      view.setEnabled(true);
    }

    view = mAppearanceContainer.findViewWithTag("appicons");
    if (view != null) {
      view.setOnClickListener(this);
      view.setEnabled(true);
    }

    view = mAppearanceContainer.findViewWithTag("hotseat");
    if (view != null) {
      view.setActivated(mLauncher.isHotseatVisiable());
      view.setOnClickListener(this);
      view.setEnabled(true);
    }

    view = mAppearanceContainer.findViewWithTag("indicator");
    if (view != null && mWorkspace != null) {
      view.setActivated(mWorkspace.isScrollingIndicatorEnabled());
      view.setOnClickListener(this);
      view.setEnabled(true);
    }

    view = mAppearanceContainer.findViewWithTag("label");
    if (view != null) {
      boolean visiable =
          mSharePrefManager.getBoolean(
              ISharedPrefSettingsManager.KEY_WORKSPACE_SHOW_LABEL,
              ResConfigManager.CONFIG_SHOW_WORKSPACE_LABEL,
              true);
      view.setActivated(visiable);
      view.setOnClickListener(this);
      view.setEnabled(true);
    }

    view = mAppearanceContainer.findViewWithTag("grid");
    if (view != null) {
      view.setActivated(true);
      view.setOnClickListener(this);
      // view.setEnabled(true);
      initWorkspaceGridSize(view);
    }

    view = mAppearanceContainer.findViewWithTag("statusbar");
    if (view != null) {
      boolean isFull =
          mSharePrefManager.getBoolean(
              ISharedPrefSettingsManager.KEY_IS_FULLSCREEN,
              ResConfigManager.CONFIG_IS_FULLSCREEN,
              false);
      // android.util.Log.i("QsLog", "initStatus======isfull:"+isFull);
      view.setActivated(!isFull);
      view.setOnClickListener(this);
      view.setEnabled(true);
    }

    view = mAppearanceContainer.findViewWithTag("lock");
    if (view != null) {
      view.setActivated(mWorkspace.isEnableStaticWallpaper());
      view.setOnClickListener(this);
      view.setEnabled(true);
    }

    if (mWorkspaceGridContainer != null) {
      int count = mWorkspaceGridContainer.getChildCount();
      for (int i = 0; i < count; i++) {
        view = mWorkspaceGridContainer.getChildAt(i);
        view.setOnClickListener(mGridContainerClickListener);
        view.setEnabled(true);
      }
    }
  }
  @Override
  public void onClick(View v) {
    // TODO Auto-generated method stub
    String tag = String.valueOf(v.getTag());
    if (tag != null) {
      if (tag.equals("appicons")) {
        mLauncher.showAppIconAndTitleCustomActivity();
        Runnable processIntent =
            new Runnable() {
              public void run() {
                mLauncher.hideCustomSettingsScreen(false);
              }
            };
        super.post(processIntent);
      } else if (tag.equals("cycleslide")) {
        if (mWorkspace != null) {
          boolean enable = !mWorkspace.isSupportCycleSlidingScreen();
          mWorkspace.setSupportCycleSlidingScreen(enable);
          mSharePrefManager.setWorkspaceSupportCycleSliding(enable);
          v.setActivated(enable);
        }

      } else if (tag.equals("hotseat")) {
        boolean enable = mLauncher.isHotseatVisiable();
        if (enable) mLauncher.hideHotseat(false);
        else mLauncher.showHotseat(false);
        mSharePrefManager.setWorkspaceShowHotseatBar(!enable);
        mWorkspace.updateLayoutCustomSettingsChanged(true, null);
        v.setActivated(!enable);
        refreshPreviewView();

      } else if (tag.equals("indicator")) {
        if (mWorkspace != null) {
          boolean enable = !mWorkspace.isScrollingIndicatorEnabled();
          mWorkspace.setScrollingIndicatorEnabled(enable);
          mSharePrefManager.setWorkspaceEnableScreenIndicatorBar(enable);
          v.setActivated(enable);
          mWorkspace.updateLayoutCustomSettingsChanged(true, null);
          refreshPreviewView();
        }
      } else if (tag.equals("label")) {

        boolean visiable =
            mSharePrefManager.getBoolean(
                ISharedPrefSettingsManager.KEY_WORKSPACE_SHOW_LABEL,
                ResConfigManager.CONFIG_SHOW_WORKSPACE_LABEL,
                true);

        mLauncher.setShortcutLableVisiable(!visiable, mUpdateLabelComplete);
        v.setActivated(!visiable);
        v.setEnabled(false);

        //			    mSharePrefManager.setBoolean(ISharedPrefSettingsManager.KEY_WORKSPACE_SHOW_LABEL,
        // !visiable);
        //
        //				refreshPreviewView();
      } else if (tag.equals("grid")) {

        //			    mLauncher.changeWorkspaceGridSize(mUpdateGridComplete);
        // v.setEnabled(false);
        mWorkspaceGridContainer.setVisibility(View.VISIBLE);
        mAppearanceContainer.setVisibility(View.GONE);

      } else if (tag.equals("statusbar")) {
        final boolean isfull =
            mSharePrefManager.getBoolean(ISharedPrefSettingsManager.KEY_IS_FULLSCREEN, false);
        // android.util.Log.i("QsLog", "onClick======isfull:"+isfull);
        mLauncher.setFullscreen(!isfull);
        // android.util.Log.i("QsLog", "onClick===2===isfull:"+isfull);
        v.setActivated(isfull);
        mSharePrefManager.setBoolean(ISharedPrefSettingsManager.KEY_IS_FULLSCREEN, !isfull);
      } else if (tag.equals("lock")) {
        if (mWorkspace != null) {
          boolean enable = !mWorkspace.isEnableStaticWallpaper();
          mWorkspace.setEnableStaticWallpaper(enable);
          mSharePrefManager.setEnableStaticWallpaper(enable);
          v.setActivated(enable);
          mWorkspace.syncWallpaperOffsetWithScroll();
        }
      }
    }
  }