[Android] Format bitrate display in MediaInfoFragment
Geoffrey Métais
git at videolan.org
Mon Jan 18 11:09:23 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 18 11:08:31 2016 +0100| [86cfe10f0600fa0b6ed9089b521a4bd1427f7eab] | committer: Geoffrey Métais
Format bitrate display in MediaInfoFragment
> https://code.videolan.org/videolan/vlc-android/commit/86cfe10f0600fa0b6ed9089b521a4bd1427f7eab
---
vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java
index 0965b02..87186e0 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java
@@ -30,6 +30,7 @@ import android.widget.TextView;
import org.videolan.libvlc.Media;
import org.videolan.vlc.R;
+import org.videolan.vlc.util.Strings;
public class MediaInfoAdapter extends ArrayAdapter<Media.Track> {
@@ -83,7 +84,7 @@ public class MediaInfoAdapter extends ArrayAdapter<Media.Track> {
private void appendCommon(StringBuilder textBuilder, Resources res, Media.Track track) {
if (track.bitrate != 0)
- textBuilder.append(res.getString(R.string.track_bitrate_info, track.bitrate));
+ textBuilder.append(res.getString(R.string.track_bitrate_info, Strings.readableSize(track.bitrate)));
textBuilder.append(res.getString(R.string.track_codec_info, track.codec));
if (track.language != null && !track.language.equalsIgnoreCase("und"))
textBuilder.append(res.getString(R.string.track_language_info, track.language));
More information about the Android
mailing list