JavaCV-0.5-Stream-Test
JavaCV-0.5-Stream-Test copied to clipboard
Adding a ProgressDialogue appears late
Why do a progress dialogue appears late when I try to add that to onClick function. I want to show user a dialogue that recording is getting started...please wait through progress dialogue
@Override public void onClick(View v) {
if (!recording) {
pDialog = new ProgressDialog(context);
pDialog.setMessage("loading");
pDialog.setIndeterminate(false);
pDialog.setCancelable(false);
pDialog.show();
startRecording();
Log.w(LOG_TAG, "Start Button Pushed");
recordButton.setText("Stop");
} else {
stopRecording();
Log.w(LOG_TAG, "Stop Button Pushed");
recordButton.setText("Start");
}
}
However, it does not get appeared, I thought its because of any thread intervention, so I moved the code to runonuithread but it does not run there either. I want to start that there and end that in anywhere in startRecording()