[Android] Video : Save Aspect Ratio
Alexandre Perraud
git at videolan.org
Thu Sep 22 15:17:53 CEST 2016
vlc-android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Thu Sep 15 15:58:50 2016 +0200| [bb03ff966051e95691c7ed1fa390e65d0c7af8cc] | committer: Alexandre Perraud
Video : Save Aspect Ratio
> https://code.videolan.org/videolan/vlc-android/commit/bb03ff966051e95691c7ed1fa390e65d0c7af8cc
---
.../src/org/videolan/vlc/gui/preferences/PreferencesActivity.java | 1 +
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesActivity.java b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesActivity.java
index 7b75cfe..5df8b96 100644
--- a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesActivity.java
@@ -44,6 +44,7 @@ public class PreferencesActivity extends AppCompatActivity implements PlaybackSe
public final static String VIDEO_BACKGROUND = "video_background";
public final static String VIDEO_RESTORE = "video_restore";
public final static String VIDEO_RATE = "video_rate";
+ public final static String VIDEO_RATIO = "video_ratio";
public final static String AUTO_RESCAN = "auto_rescan";
public final static String LOGIN_STORE = "store_login";
public static final String KEY_AUDIO_PLAYBACK_RATE = "playback_rate";
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 11f24bc..250252f 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -193,7 +193,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
private static final int SURFACE_16_9 = 4;
private static final int SURFACE_4_3 = 5;
private static final int SURFACE_ORIGINAL = 6;
- private int mCurrentSize = SURFACE_BEST_FIT;
+ private int mCurrentSize;
private SharedPreferences mSettings;
private int mTouchControls = 0;
@@ -439,6 +439,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mLock = (ImageView) findViewById(R.id.lock_overlay_button);
mSize = (ImageView) findViewById(R.id.player_overlay_size);
+ mCurrentSize = mSettings.getInt(PreferencesActivity.VIDEO_RATIO, SURFACE_BEST_FIT);
mNavMenu = (ImageView) findViewById(R.id.player_overlay_navmenu);
@@ -2571,6 +2572,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
showInfo(R.string.surface_original, 1000);
break;
}
+ SharedPreferences.Editor editor = mSettings.edit();
+ editor.putInt(PreferencesActivity.VIDEO_RATIO, mCurrentSize);
+ editor.apply();
showOverlay();
}
More information about the Android
mailing list