@Override
  protected void onResume() {
    super.onResume();

    cb_show_Switch.setChecked(isShow);
    cb_show_Switch.setOnCheckedChangeListener(this);

    switch_type = GTPref.getGTPref().getInt(GTPref.AC_SWITCH, GW);

    switch (switch_type) {
      case PROFILER:
        {
          show_profiler.setChecked(true);
          break;
        }
      case GW:
      default:
        {
          show_gw.setChecked(true);
          break;
        }
    }

    // 监听放在上面初始setChecked后面,避免提前触发监听造成逻辑混乱
    this.show_quickswitch.setOnCheckedChangeListener(new OnCheckedChangeListenerImp());
  }
Exemple #2
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.gw_showapp);
   proDialog =
       ProgressDialog.show(
           GTShowPackageActivity.this, "Searching..", "searching..wait....", true, true);
   Thread loginThread = new Thread(new ShowappHandler());
   loginThread.start();
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.gt_floatview_setting);
    TextView tv_back = (TextView) findViewById(R.id.tv_back);
    tv_back.setOnClickListener(back);

    show_quickswitch = (RadioGroup) findViewById(R.id.show_quickswitch);
    show_profiler = (RadioButton) findViewById(R.id.show_profiler);
    show_gw = (RadioButton) findViewById(R.id.show_gw);

    cb_show_Switch = (GTCheckBox) findViewById(R.id.cb_switch);
    isShow = GTPref.getGTPref().getBoolean(GTPref.AC_SWITCH_FLAG, true);
  }
 @Override
 protected void onPause() {
   super.onResume();
   cb_show_Switch.setOnCheckedChangeListener(null);
   this.show_quickswitch.setOnCheckedChangeListener(null);
 }
Exemple #5
0
 protected void onResume() {
   super.onResume();
 }