Beispiel #1
0
 public void setJavascriptEnabled(boolean jsEnabled) {
   Log.d(L.TAG, "Control bar: Javascript " + (jsEnabled ? "enabled" : "disabled"));
   if (jsToggle.isChecked() != jsEnabled) {
     jsToggle.setOnCheckedChangeListener(null);
     jsToggle.setChecked(jsEnabled);
     jsToggle.setOnCheckedChangeListener(this);
   }
   jsToggle.setEnabled(true);
 }
Beispiel #2
0
  @Override
  public void onCheckedChanged(CompoundButton view, boolean isChecked) {
    if (view == this.jsToggle) {

      if (this.pageLoadController == null) return;

      jsToggle.setEnabled(false);
      pageLoadController.restart(isChecked);
    }
  }
Beispiel #3
0
  @Override
  public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    // TODO Auto-generated method stub
    int selected = 0;

    if (isChecked) {
      buttonView.setEnabled(false);
      for (int index = 0; index < mSwitches.size(); index++) {
        if (mSwitches.get(index) != buttonView) {
          turnOn(mSwitches.get(index));
        } else {
          mSelected = index;
        }
      }

      // TODO listener;
      if (mListener != null) {
        mListener.onSegmentChanged(mSelected, mSwitches.get(selected));
      }
    }
  }
Beispiel #4
0
 public void disableJavascriptToggle() {
   jsToggle.setEnabled(false);
 }