private void setupViews() {
    //        mSixteenText.setOnClickListener(this);
    //        mThirthtytwoText.setOnClickListener(this);
    mSixtyfourLinearLayout.setOnClickListener(this);
    mOneTwoEightLinearLayout.setOnClickListener(this);
    mTwoFiveSixLinearLayout.setOnClickListener(this);
    mStartSearchButton.setOnClickListener(this);
    mCancelButton.setOnClickListener(this);
    mDefaultTransponder =
        TransponderUtil.getDefaultTransponder(
            this, DefaultParameter.DefaultTransponderType.DEFAULT_TRANSPONDER_TYPE_MANUAL);
    mFrequencyEditText.setText("" + mDefaultTransponder.getFrequency() / 1000);
    mSymbolRateEditText.setText("" + mDefaultTransponder.getSymbolRate());
    switch (mDefaultTransponder.getModulation()) {
        /*case 0:
            mSixteenImage.setVisibility(View.VISIBLE);
            break;
        case 1:
            mThirthtytwoImage.setVisibility(View.VISIBLE);
            break;*/
      case DefaultParameter.ModulationType.MODULATION_64QAM:
        mSixtyfourImage.setVisibility(View.VISIBLE);
        break;
      case DefaultParameter.ModulationType.MODULATION_128QAM:
        mOneTwoEightImage.setVisibility(View.VISIBLE);
        break;
      case DefaultParameter.ModulationType.MODULATION_256QAM:
        mTwoFiveSixImage.setVisibility(View.VISIBLE);
        break;
    }
    //        mFrequencyEditText.setRange(
    //                DefaultParameter.SearchParameterRange.FREQUENCY_MIN,
    //                DefaultParameter.SearchParameterRange.FREQUENCY_MAX);
    mFrequencyEditText.setOnInputDataErrorListener(
        new OnInputDataErrorListener() {

          public void onInputDataError(int errorType) {
            switch (errorType) {
              case MyEditText.INPUT_DATA_ERROR_TYPE_NULL:
                // 弹出对话框提示输入错误。
                //
                // SearchManualActivity.this.showDialog(DialogId.DIALOG_ALERT_FREQUENCY_NULL);
                AdapterViewSelectionUtil.showToast(
                    SearchManualActivity.this, R.string.frequency_null);
                mFrequencyEditText.setText("" + mDefaultTransponder.getFrequency() / 1000);
                break;
              case MyEditText.INPUT_DATA_ERROR_TYPE_OUT:
                //
                // SearchManualActivity.this.showDialog(DialogId.DIALOG_ALERT_FREQUENCY);
                //                        mFrequencyEditText.setText("" +
                // mDefaultTransponder.getFrequency() / 1000);
                break;
              case MyEditText.INPUT_DATA_ERROR_TYPE_NORMAL:
                break;
            }
          }
        });

    mSymbolRateEditText.setText("" + mDefaultTransponder.getSymbolRate());

    mSymbolRateEditText.setOnInputDataErrorListener(
        new OnInputDataErrorListener() {

          public void onInputDataError(int errorType) {
            switch (errorType) {
              case MyEditText.INPUT_DATA_ERROR_TYPE_NULL:
                //
                // SearchManualActivity.this.showDialog(DialogId.DIALOG_ALERT_SYMBOL_NULL);
                AdapterViewSelectionUtil.showToast(
                    SearchManualActivity.this, R.string.symbol_rate_null);
                mSymbolRateEditText.setText("" + mDefaultTransponder.getSymbolRate());
                break;
              case MyEditText.INPUT_DATA_ERROR_TYPE_OUT:
                //
                // SearchManualActivity.this.showDialog(DialogId.DIALOG_ALERT_SYMBOL);
                //                        mSymbolRateEditText.setText("" +
                // mDefaultTransponder.getSymbolRate());
                break;
              case MyEditText.INPUT_DATA_ERROR_TYPE_NORMAL:
                break;
            }
          }
        });
    mTwoFiveSixLinearLayout.setOnKeyListener(
        new View.OnKeyListener() {
          @Override
          public boolean onKey(View v, int keyCode, KeyEvent event) {
            if (event.getAction() == KeyEvent.ACTION_DOWN
                && keyCode == KeyEvent.KEYCODE_DPAD_DOWN) {
              mStartSearchButton.requestFocus();
              return true;
            }
            return false;
          }
        });
  }
  private void setupViews() {

    mSaveButton.setOnClickListener(this);
    mCancleButton.setOnClickListener(this);

    stringExtra = getIntent().getStringExtra(SEARCHTYPE);
    if (SearchMainActivity.FULLSEARCH.equals(stringExtra)) {
      mDefaultTransponder =
          TransponderUtil.getDefaultTransponder(
              this, DefaultParameter.DefaultTransponderType.DEFAULT_TRANSPONDER_TYPE_MAINTP);
      mAutoSearchTitle.setText(R.string.full_search_advanced_title);
    } else {
      mDefaultTransponder =
          TransponderUtil.getDefaultTransponder(
              this, DefaultParameter.DefaultTransponderType.DEFAULT_TRANSPONDER_TYPE_AUTO);
    }
    mFrequencyEditText.setText("" + mDefaultTransponder.getFrequency() / 1000);
    mSymbolRateEditText.setText("" + mDefaultTransponder.getSymbolRate());

    switch (mDefaultTransponder.getModulation()) {
      case DefaultParameter.ModulationType.MODULATION_64QAM:
        mSpinner.setSelection(0);
        break;
      case DefaultParameter.ModulationType.MODULATION_128QAM:
        mSpinner.setSelection(1);
        break;
      case DefaultParameter.ModulationType.MODULATION_256QAM:
        mSpinner.setSelection(2);
        break;
      default:
        break;
    }

    mFrequencyEditText.setRange(
        DefaultParameter.SearchParameterRange.FREQUENCY_MIN,
        DefaultParameter.SearchParameterRange.FREQUENCY_MAX);
    mSymbolRateEditText.setRange(
        DefaultParameter.SearchParameterRange.SYMBOLRATE_MIN,
        DefaultParameter.SearchParameterRange.SYMBOLRATE_MAX);

    mFrequencyEditText.setOnInputDataErrorListener(
        new OnInputDataErrorListener() {

          public void onInputDataError(int errorType) {
            switch (errorType) {
              case MyEditText.INPUT_DATA_ERROR_TYPE_NULL:
                // 弹出对话框提示输入错误。
                //
                // SearchAdvancedSettingActivity.this.showDialog(DialogId.DIALOG_ALERT_FREQUENCY_NULL);
                AdapterViewSelectionUtil.showToast(
                    SearchAdvancedSettingActivity.this, R.string.frequency_null);
                mFrequencyEditText.setText("" + mDefaultTransponder.getFrequency() / 1000);
                break;

              case MyEditText.INPUT_DATA_ERROR_TYPE_OUT:
                //
                // SearchAdvancedSettingActivity.this.showDialog(DialogId.DIALOG_ALERT_FREQUENCY);
                AdapterViewSelectionUtil.showToast(
                    SearchAdvancedSettingActivity.this, R.string.frequency_out_of_range);
                mFrequencyEditText.setText("" + mDefaultTransponder.getFrequency() / 1000);
                break;

              case MyEditText.INPUT_DATA_ERROR_TYPE_NORMAL:
                break;
            }
          }
        });
    mSymbolRateEditText.setText("" + mDefaultTransponder.getSymbolRate());

    mSymbolRateEditText.setOnInputDataErrorListener(
        new OnInputDataErrorListener() {

          public void onInputDataError(int errorType) {
            switch (errorType) {
              case MyEditText.INPUT_DATA_ERROR_TYPE_NULL:
                AdapterViewSelectionUtil.showToast(
                    SearchAdvancedSettingActivity.this, R.string.symbol_rate_null);
                mSymbolRateEditText.setText("" + mDefaultTransponder.getSymbolRate());
                break;
              case MyEditText.INPUT_DATA_ERROR_TYPE_OUT:
                AdapterViewSelectionUtil.showToast(
                    SearchAdvancedSettingActivity.this, R.string.symbol_rate_out_of_range);
                mSymbolRateEditText.setText("" + mDefaultTransponder.getSymbolRate());
                break;
              case MyEditText.INPUT_DATA_ERROR_TYPE_NORMAL:
                break;
            }
          }
        });
  }