diff --git a/app/src/main/java/org/ntlab/amaryllis/client/VoiceActivity.java b/app/src/main/java/org/ntlab/amaryllis/client/VoiceActivity.java index cfb1e9b..edd547a 100644 --- a/app/src/main/java/org/ntlab/amaryllis/client/VoiceActivity.java +++ b/app/src/main/java/org/ntlab/amaryllis/client/VoiceActivity.java @@ -129,15 +129,16 @@ } catch (Exception e) { e.printStackTrace(); } - totalTime = mp.getDuration(); - String S_totalTime = createTimeLabel(totalTime);//createTimeLabelにtotalTimeを渡す。 - TextView voiceTime = (TextView)findViewById(R.id.VoiceTime); - voiceTime.setText(S_totalTime); + mp.seekTo(0); mp.start();//再生スタート Playing.setAlpha(1.0f); Stoping.setAlpha(0.0f); } + totalTime = mp.getDuration(); + String S_totalTime = createTimeLabel(totalTime);//createTimeLabelにtotalTimeを渡す。 + TextView voiceTime = (TextView)findViewById(R.id.VoiceTime); + voiceTime.setText(S_totalTime); } //totalTimeを分、秒に変換