private void updateUI(boolean inProgress) { buttonStart.setEnabled(!inProgress); buttonStop.setEnabled(inProgress); if (inProgress) { progressBar.setVisibility(View.VISIBLE); } else { progressBar.setVisibility(View.INVISIBLE); } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow() .setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.composer_transcode_core_activity); buttonStart = (Button) findViewById(R.id.buttonStart); buttonStop = (Button) findViewById(R.id.buttonStop); pathInfo = (TextView) findViewById(R.id.pathInfo); durationInfo = (TextView) findViewById(R.id.durationInfo); effectDetails = (TextView) findViewById(R.id.effectDetails); initVideoSpinners(); transcodeInfoView = (TextView) findViewById(R.id.transcodeInfo); progressBar = (ProgressBar) findViewById(R.id.progressBar); progressBar.setMax(100); //// TranscodeSurfaceView transcodeSurfaceView = (TranscodeSurfaceView) findViewById(R.id.transcodeSurfaceView); transcodeSurfaceView.getHolder().addCallback(this); //// getActivityInputs(); getFileInfo(); setupUI(); printFileInfo(); transcodeSurfaceView.setImageSize(videoWidthIn, videoHeightIn); updateUI(false); }