[Android] Immediately show progress on activity display
Geoffrey Métais
git at videolan.org
Fri Oct 12 17:57:38 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Oct 12 17:57:14 2018 +0200| [ad406c796469a75503e9b00e6dc600f380e12f6a] | committer: Geoffrey Métais
Immediately show progress on activity display
> https://code.videolan.org/videolan/vlc-android/commit/ad406c796469a75503e9b00e6dc600f380e12f6a
---
vlc-android/res/layout/scan_progress.xml | 3 +--
.../src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java | 6 +++++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/vlc-android/res/layout/scan_progress.xml b/vlc-android/res/layout/scan_progress.xml
index 2fd1da0de..46ee3f737 100644
--- a/vlc-android/res/layout/scan_progress.xml
+++ b/vlc-android/res/layout/scan_progress.xml
@@ -2,8 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scan_progress_layout"
android:layout_width="match_parent"
- android:layout_height="@dimen/progress_layout_height"
- android:visibility="gone">
+ android:layout_height="@dimen/progress_layout_height" >
<ProgressBar
android:id="@+id/scan_progress_bar"
android:layout_width="match_parent"
diff --git a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
index 36d09f205..78ad62c2d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
@@ -55,7 +55,6 @@ import org.videolan.vlc.MediaParsingServiceKt;
import org.videolan.vlc.PlaybackService;
import org.videolan.vlc.R;
import org.videolan.vlc.ScanProgress;
-import org.videolan.vlc.VLCApplication;
import org.videolan.vlc.gui.audio.AudioPlayer;
import org.videolan.vlc.gui.browser.StorageBrowserFragment;
import org.videolan.vlc.gui.helpers.BottomSheetBehavior;
@@ -306,6 +305,11 @@ public class AudioPlayerContainerActivity extends BaseActivity {
}
} else if (mScanProgressLayout != null)
mScanProgressLayout.setVisibility(View.VISIBLE);
+ final ScanProgress sp = MediaParsingService.Companion.getProgress().getValue();
+ if (sp != null) {
+ if (mScanProgressText != null) mScanProgressText.setText(sp.getDiscovery());
+ if (mScanProgressBar != null) mScanProgressBar.setProgress(sp.getParsing());
+ }
}
protected void updateContainerPadding(boolean show) {
More information about the Android
mailing list