JavaCV-0.5-Stream-Test icon indicating copy to clipboard operation
JavaCV-0.5-Stream-Test copied to clipboard

Adding a ProgressDialogue appears late

Open satyamub opened this issue 9 years ago • 0 comments

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()

satyamub avatar Nov 05 '15 10:11 satyamub