private void onRecord(boolean start){
  if (start) {
    onPlay(STOP_PLAYING);
    mPlayPause.setImageResource(R.drawable.ic_play);
    startRecordingAsync();
    startAnimate();
  }
 else {
    if (!mIsRecording) {
      recordingAsync.cancel(true);
    }
    stopRecording();
    stopAnimating();
    try {
      long size=0;
      File forSize=new File(mFilePath);
      if (forSize.exists()) {
        size=forSize.length();
        String text=getString(R.string.OK) + ", " + Tools.readableFileSize(size);
        okButton.setText(text);
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    ;
  }
}

private void onRecord ( boolean start ) { if ( start ) { onPlay ( STOP_PLAYING ) ; mPlayPause . setImageResource ( R . drawable . ic_play ) ; startRecordingAsync ( ) ; startAnimate ( ) ; } else { if ( ! mIsRecording ) { recordingAsync . cancel ( true ) ; } stopRecording ( ) ; stopAnimating ( ) ; try { long size = 0 ; File forSize = new File ( mFilePath ) ; if ( forSize . exists ( ) ) { size = forSize . length ( ) ; String text = getString ( R . string . OK ) + ", " + Tools . readableFileSize ( size ) ; okButton . setText ( text ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } ; } }
start or stop recording
