[Android] No config change anymore
Geoffrey Métais
git at videolan.org
Thu Feb 12 17:12:33 CET 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 12 11:56:56 2015 +0100| [25e1fad404890c4c0f46a20805e822cd96e63ad9] | committer: Geoffrey Métais
No config change anymore
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=25e1fad404890c4c0f46a20805e822cd96e63ad9
---
.../src/org/videolan/vlc/gui/MainActivity.java | 63 +++++++++-----------
.../videolan/vlc/gui/audio/EqualizerFragment.java | 39 ++++--------
.../videolan/vlc/gui/video/VideoGridFragment.java | 10 ----
3 files changed, 39 insertions(+), 73 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index a801213..b13b73c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -20,34 +20,6 @@
package org.videolan.vlc.gui;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-
-import org.videolan.libvlc.LibVlcException;
-import org.videolan.libvlc.LibVlcUtil;
-import org.videolan.vlc.MediaDatabase;
-import org.videolan.vlc.MediaLibrary;
-import org.videolan.vlc.R;
-import org.videolan.vlc.VLCApplication;
-import org.videolan.vlc.audio.AudioService;
-import org.videolan.vlc.audio.AudioServiceController;
-import org.videolan.vlc.gui.SidebarAdapter.SidebarEntry;
-import org.videolan.vlc.gui.audio.AudioAlbumsSongsFragment;
-import org.videolan.vlc.gui.audio.AudioPlayer;
-import org.videolan.vlc.gui.audio.EqualizerFragment;
-import org.videolan.vlc.gui.network.NetworkFragment;
-import org.videolan.vlc.gui.video.MediaInfoFragment;
-import org.videolan.vlc.gui.video.VideoGridFragment;
-import org.videolan.vlc.gui.video.VideoListAdapter;
-import org.videolan.vlc.interfaces.IRefreshable;
-import org.videolan.vlc.interfaces.ISortable;
-import org.videolan.vlc.util.AndroidDevices;
-import org.videolan.vlc.util.Util;
-import org.videolan.vlc.util.VLCInstance;
-import org.videolan.vlc.util.WeakHandler;
-import org.videolan.vlc.widget.SlidingPaneLayout;
-
import android.annotation.TargetApi;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -57,7 +29,6 @@ import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
-import android.content.res.Configuration;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
@@ -88,6 +59,34 @@ import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
+import org.videolan.libvlc.LibVlcException;
+import org.videolan.libvlc.LibVlcUtil;
+import org.videolan.vlc.MediaDatabase;
+import org.videolan.vlc.MediaLibrary;
+import org.videolan.vlc.R;
+import org.videolan.vlc.VLCApplication;
+import org.videolan.vlc.audio.AudioService;
+import org.videolan.vlc.audio.AudioServiceController;
+import org.videolan.vlc.gui.SidebarAdapter.SidebarEntry;
+import org.videolan.vlc.gui.audio.AudioAlbumsSongsFragment;
+import org.videolan.vlc.gui.audio.AudioPlayer;
+import org.videolan.vlc.gui.audio.EqualizerFragment;
+import org.videolan.vlc.gui.network.NetworkFragment;
+import org.videolan.vlc.gui.video.MediaInfoFragment;
+import org.videolan.vlc.gui.video.VideoGridFragment;
+import org.videolan.vlc.gui.video.VideoListAdapter;
+import org.videolan.vlc.interfaces.IRefreshable;
+import org.videolan.vlc.interfaces.ISortable;
+import org.videolan.vlc.util.AndroidDevices;
+import org.videolan.vlc.util.Util;
+import org.videolan.vlc.util.VLCInstance;
+import org.videolan.vlc.util.WeakHandler;
+import org.videolan.vlc.widget.SlidingPaneLayout;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
public class MainActivity extends ActionBarActivity implements OnItemClickListener {
public final static String TAG = "VLC/MainActivity";
@@ -580,12 +579,6 @@ public class MainActivity extends ActionBarActivity implements OnItemClickListen
}
@Override
- public void onConfigurationChanged(Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
- mDrawerToggle.onConfigurationChanged(newConfig);
- }
-
- @Override
public boolean onSearchRequested() {
if (mCurrentFragment != null && mCurrentFragment.equals("search"))
((SearchFragment)fetchSecondaryFragment("search")).onSearchKeyPressed();
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
index ffd272e..10bbdb8 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
@@ -19,19 +19,7 @@
*****************************************************************************/
package org.videolan.vlc.gui.audio;
-import org.videolan.libvlc.LibVLC;
-import org.videolan.libvlc.LibVlcException;
-import org.videolan.vlc.R;
-import org.videolan.vlc.VLCApplication;
-import org.videolan.vlc.interfaces.OnEqualizerBarChangeListener;
-import org.videolan.vlc.util.Preferences;
-import org.videolan.vlc.util.Util;
-import org.videolan.vlc.util.VLCInstance;
-import org.videolan.vlc.widget.EqualizerBar;
-
-import android.content.Context;
import android.content.SharedPreferences;
-import android.content.res.Configuration;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
@@ -51,6 +39,16 @@ import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.Spinner;
import android.widget.ToggleButton;
+import org.videolan.libvlc.LibVLC;
+import org.videolan.libvlc.LibVlcException;
+import org.videolan.vlc.R;
+import org.videolan.vlc.VLCApplication;
+import org.videolan.vlc.interfaces.OnEqualizerBarChangeListener;
+import org.videolan.vlc.util.Preferences;
+import org.videolan.vlc.util.Util;
+import org.videolan.vlc.util.VLCInstance;
+import org.videolan.vlc.widget.EqualizerBar;
+
public class EqualizerFragment extends Fragment {
public final static String TAG = "VLC/EqualizerFragment";
@@ -66,8 +64,7 @@ public class EqualizerFragment extends Fragment {
}
@Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
- {
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
((ActionBarActivity) getActivity()).getSupportActionBar().setTitle(getResources().getString(R.string.equalizer));
super.onCreateView(inflater, container, savedInstanceState);
@@ -85,20 +82,6 @@ public class EqualizerFragment extends Fragment {
}
@Override
- public void onConfigurationChanged(Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
-
- LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- View v = inflater.inflate(R.layout.equalizer, null);
- ViewGroup rootView = (ViewGroup) getView();
- rootView.removeAllViews();
- rootView.addView(v);
- saveViewChildren(v);
-
- fillViews();
- }
-
- @Override
public void onResume() {
super.onResume();
fillViews();
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index 8581c8c..991fc7a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -268,16 +268,6 @@ public class VideoGridFragment extends BrowserFragment implements ISortable, IVi
}
@Override
- public void onConfigurationChanged(Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
-
- if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE ||
- newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
- updateViewMode();
- }
- }
-
- @Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
MediaWrapper media = mVideoAdapter.getItem(position);
if (media instanceof MediaGroup) {
More information about the Android
mailing list