release
jhengazuki 2 months ago
parent d80c6d26d5
commit 33c3c8616f
  1. 10
      app/src/main/java/com/fongmi/android/tv/ui/custom/CustomWallView.java

@ -70,6 +70,11 @@ public class CustomWallView extends FrameLayout implements DefaultLifecycleObser
if (event.getType() == RefreshEvent.Type.WALL) refresh(); if (event.getType() == RefreshEvent.Type.WALL) refresh();
} }
private void refresh() {
stop();
load();
}
private void stop() { private void stop() {
if (player.isPlaying()) { if (player.isPlaying()) {
player.stop(); player.stop();
@ -85,11 +90,6 @@ public class CustomWallView extends FrameLayout implements DefaultLifecycleObser
} }
} }
private void refresh() {
stop();
load();
}
private void load() { private void load() {
File file = FileUtil.getWall(Setting.getWall()); File file = FileUtil.getWall(Setting.getWall());
cache = Drawable.createFromPath(FileUtil.getWallCache().getAbsolutePath()); cache = Drawable.createFromPath(FileUtil.getWallCache().getAbsolutePath());

Loading…
Cancel
Save