[Android] [PATCH] upgrade ActionBarDrawerToggle to v7

Geoffrey Métais geoffrey.metais at gmail.com
Tue Nov 4 11:11:52 CET 2014


v4 is deprecated
---
 vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index caaccca..649eb16 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -65,7 +65,6 @@ import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
 import android.preference.PreferenceManager;
-import android.support.v4.app.ActionBarDrawerToggle;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentActivity;
 import android.support.v4.app.FragmentManager;
@@ -74,6 +73,7 @@ import android.support.v4.view.GravityCompat;
 import android.support.v4.widget.DrawerLayout;
 import android.support.v7.app.ActionBar;
 import android.support.v7.app.ActionBarActivity;
+import android.support.v7.app.ActionBarDrawerToggle;
 import android.text.InputType;
 import android.util.Log;
 import android.view.KeyEvent;
@@ -222,8 +222,7 @@ public class MainActivity extends ActionBarActivity {
 
         /* Set up the sidebar click listener
          * no need to invalidate menu for now */
-        mDrawerToggle = new ActionBarDrawerToggle(this, mRootContainer,
-                R.drawable.ic_drawer, R.string.drawer_open, R.string.drawer_close) {};
+        mDrawerToggle = new ActionBarDrawerToggle(this, mRootContainer, R.string.drawer_open, R.string.drawer_close);
 
         // Set the drawer toggle as the DrawerListener
         mRootContainer.setDrawerListener(mDrawerToggle);
-- 
1.9.1



More information about the Android mailing list