Exemplo n.º 1
0
 @Override
 protected RectF doInBackground(Void... params) {
   //		final Rect rect = parent.getContentRect();
   //		Log.i("DEBUG_ITD", "content_rect = " + String.valueOf(rect));
   // TODO: должен получать и content и viewport и рисовать сам то что нужно на холсте.
   return CodecWrapper.getInstance()
       .initData(parent.getPath(), parent.getWaveformContentRect(), parent.getParentViewport());
   //		return null;
 }
Exemplo n.º 2
0
 @Override
 protected void onProgressUpdate(Integer... values) {
   // TODO Auto-generated method stub
   if (dialog != null) {
     String message = null;
     switch (values[0]) {
       case 0:
         message = parent.getResources().getString(R.string.progress_what_zero);
         break;
       case 1:
         message = parent.getResources().getString(R.string.progress_what_one);
         break;
       case 2:
         message = parent.getResources().getString(R.string.progress_what_two);
         break;
       case 3:
         message = parent.getResources().getString(R.string.progress_what_three);
         break;
       case 4:
         message = parent.getResources().getString(R.string.progress_what_fore);
         break;
       case 5:
         message = parent.getResources().getString(R.string.progress_what_five);
         break;
       case 6:
         message = parent.getResources().getString(R.string.progress_what_six);
         break;
       case 7:
         message = parent.getResources().getString(R.string.progress_what_seven);
         break;
       case 8:
         message = parent.getResources().getString(R.string.progress_what_eight);
         break;
       case 9:
         message = parent.getResources().getString(R.string.progress_what_nine);
         break;
       default:
         message = "";
     }
     dialog.postProgress(message);
   }
 }
Exemplo n.º 3
0
 @Override
 protected void onPostExecute(RectF result) {
   dialog.dismiss();
   progress = false;
   try {
     progressUpdateThread.join();
   } catch (InterruptedException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
   // TODO: parse track is finish. can draw content in waveform
   //		if (result != null) {
   parent.onDataReady();
   //		}
 }
Exemplo n.º 4
0
 @Override
 protected void onPreExecute() {
   dialog = ProgressDialogFragment.newInstance();
   dialog.setCancelable(false);
   dialog.show(
       ((FragmentActivity) parent.getContext()).getSupportFragmentManager(),
       ProgressDialogFragment.TAG);
   progress = true;
   showTime = 0;
   progressUpdateThread.start();
   //				;ProgressDialog
   //				.show(parent.getContext(),
   //						parent.getContext().getString(R.string.codec_wrapper_init_data_progress_dialog_title),
   //						parent.getContext().getString(R.string.codec_wrapper_please_wait_meassage));
 }