private void updateUI(boolean inProgress) { buttonStart.setEnabled(!inProgress); buttonStop.setEnabled(inProgress); if (inProgress) { progressBar.setVisibility(View.VISIBLE); } else { progressBar.setVisibility(View.INVISIBLE); } }
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) {} }); } }
@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); }
public void SetSinglePointButtonEnabled(boolean enabled) { Button buttonSinglePoint = (Button) findViewById(R.id.buttonSinglePoint); buttonSinglePoint.setEnabled(enabled); }