Commit fcb5a4d5 authored by Edward Wang's avatar Edward Wang
Browse files

src: Be consistent with desktop VLC in the speed label

parent 7d9f2119
......@@ -46,7 +46,7 @@ public class SpeedSelectorDialog extends Dialog {
final TextView speedLabel = (TextView)findViewById(R.id.current_speed);
Button resetButton = (Button)findViewById(R.id.reset);
speedLabel.setText(String.format("%.2fx", LibVLC.getExistingInstance().getRate()));
speedLabel.setText(String.format(java.util.Locale.US, "%.2fx", LibVLC.getExistingInstance().getRate()));
seekbar.setProgress( (int)( ((Math.log(LibVLC.getExistingInstance().getRate()) / Math.log(4)) + 1) * 100) );
seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
......@@ -54,7 +54,7 @@ public class SpeedSelectorDialog extends Dialog {
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
float rate = (float) Math.pow((double)4, ((double)progress/(double)100) - (double)1);
speedLabel.setText(String.format("%.2fx", rate));
speedLabel.setText(String.format(java.util.Locale.US, "%.2fx", rate));
LibVLC.getExistingInstance().setRate(rate);
}
......
......@@ -184,7 +184,7 @@ public class AudioPlayerActivity extends Activity implements IAudioPlayer {
mPrevious.setVisibility(ImageButton.VISIBLE);
else
mPrevious.setVisibility(ImageButton.INVISIBLE);
mSpeed.setText(String.format("%.2fx", LibVLC.getExistingInstance().getRate()));
mSpeed.setText(String.format(java.util.Locale.US, "%.2fx", LibVLC.getExistingInstance().getRate()));
mTimeline.setOnSeekBarChangeListener(mTimelineListner);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment