Commit 3f5b52d4 by 霍志良

feat:fm模块升级

parent 5e6232ae
...@@ -7,7 +7,7 @@ ext { ...@@ -7,7 +7,7 @@ ext {
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.17", "m-confide" : "0.0.49.17",
"m-consultant" : "0.0.59.93", "m-consultant" : "0.0.59.93",
"m-fm" : "0.0.30.06", "m-fm" : "0.0.30.07",
"m-user" : "0.0.61.71", "m-user" : "0.0.61.71",
"m-home" : "0.0.22.74", "m-home" : "0.0.22.74",
"m-im" : "0.0.19.80", "m-im" : "0.0.19.80",
...@@ -90,7 +90,7 @@ ext { ...@@ -90,7 +90,7 @@ ext {
"m-confide" : "0.0.49.17", "m-confide" : "0.0.49.17",
"m-consultant" : "0.0.59.93", "m-consultant" : "0.0.59.93",
"m-fm" : "0.0.30.06", "m-fm" : "0.0.30.07",
"m-user" : "0.0.61.71", "m-user" : "0.0.61.71",
"m-home" : "0.0.22.74", "m-home" : "0.0.22.74",
"m-im" : "0.0.19.80", "m-im" : "0.0.19.80",
......
...@@ -128,6 +128,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -128,6 +128,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
@Override @Override
protected void onNewIntent(Intent intent) { protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
if (null == intent) { if (null == intent) {
finish(); finish();
return; return;
...@@ -311,7 +312,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -311,7 +312,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
@Override @Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
allTime = Integer.parseInt(String.valueOf(AudioPlayer.Companion.get().getDuration())); // allTime = Integer.parseInt(String.valueOf(AudioPlayer.Companion.get().getDuration()));
int current = seekBar.getProgress() * allTime / 1000; int current = seekBar.getProgress() * allTime / 1000;
tv_allTime.setText(formatter.format(allTime)); tv_allTime.setText(formatter.format(allTime));
tv_currentTime.setText(formatter.format(current)); tv_currentTime.setText(formatter.format(current));
...@@ -326,7 +327,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -326,7 +327,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
@Override @Override
public void onStopTrackingTouch(SeekBar seekBar) { public void onStopTrackingTouch(SeekBar seekBar) {
allTime = Integer.parseInt(String.valueOf(AudioPlayer.Companion.get().getDuration())); // allTime = Integer.parseInt(String.valueOf(AudioPlayer.Companion.get().getDuration()));
int current = seekBar.getProgress() * allTime / 1000; int current = seekBar.getProgress() * allTime / 1000;
tv_allTime.setText(formatter.format(allTime)); tv_allTime.setText(formatter.format(allTime));
tv_currentTime.setText(formatter.format(current)); tv_currentTime.setText(formatter.format(current));
...@@ -538,12 +539,11 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -538,12 +539,11 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
public void updateThread() { public void updateThread() {
runOnUiThread(() -> { runOnUiThread(() -> {
allTime = Integer.parseInt(String.valueOf(AudioPlayer.Companion.get().getDuration())); // allTime = Integer.parseInt(String.valueOf(AudioPlayer.Companion.get().getDuration()));
currentTime.setTime(time - 8 * 60 * 60 * 1000); currentTime.setTime(time - 8 * 60 * 60 * 1000);
int percent = (int) (1000.0 * time / allTime); int percent = (int) (1000.0 * time / allTime);
fm_progress.setProgress(percent); fm_progress.setProgress(percent);
tv_currentTime.setText(formatter.format(currentTime)); tv_currentTime.setText(formatter.format(currentTime));
tv_allTime.setText(formatter.format(allTime));
}); });
} }
...@@ -622,7 +622,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -622,7 +622,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
@Override @Override
public void onPrepared(long duration) { public void onPrepared(long duration) {
this.allTime = Integer.parseInt(String.valueOf(duration)); this.allTime = Integer.parseInt(String.valueOf(duration));
tv_allTime.setText(formatter.format(allTime));
iv_play.setVisibility(View.VISIBLE); iv_play.setVisibility(View.VISIBLE);
refresh_icon.setVisibility(View.GONE); refresh_icon.setVisibility(View.GONE);
anim.cancel(); anim.cancel();
......
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