private void updateUI(boolean inProgress) {
    buttonStart.setEnabled(!inProgress);
    buttonStop.setEnabled(inProgress);

    if (inProgress) {
      progressBar.setVisibility(View.VISIBLE);
    } else {
      progressBar.setVisibility(View.INVISIBLE);
    }
  }
Пример #2
0
 private void updateUI(boolean enabled) {
   if (useOverlay.m_zoom >= 17) {
     zoomInButton.setEnabled(false);
     zoomOutButton.setEnabled(true & enabled);
   } else if (useOverlay.m_zoom <= 3) {
     zoomInButton.setEnabled(true & enabled);
     zoomOutButton.setEnabled(false);
   } else {
     zoomInButton.setEnabled(enabled);
     zoomOutButton.setEnabled(enabled);
   }
 }
  public void startTranscode() {

    try {
      transcode();

    } catch (Exception e) {

      buttonStart.setEnabled(false);

      String message = (e.getMessage() != null) ? e.getMessage() : e.toString();

      showMessageBox(
          message,
          new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialogInterface, int i) {}
          });
    }
  }
Пример #4
0
    @Override
    public DownloadStreamTask(Context _c) {
      mContext = new WeakReference<Context>(_c);
      // dialog = new ProgressDialog(myact.this);

      text1 = (TextView) findViewById(R.id.textView1);

      Button cancelbtn = (Button) findViewById(R.id.ButtonCancel);
      cancelbtn.setOnClickListener(
          new View.OnClickListener() {
            @Override
            public void onClick(View v) {
              // Do something in response to button click
              cancel(true);
            }
          });

      cancelbtn.setEnabled(true);
    }
Пример #5
0
 public void SetSinglePointButtonEnabled(boolean enabled) {
   Button buttonSinglePoint = (Button) findViewById(R.id.buttonSinglePoint);
   buttonSinglePoint.setEnabled(enabled);
 }