我想在我的android應用中實現導航抽屜。我用這個教程:http://manishkpr.webheavens.com/android-navigation-drawer-example-using-fragments/ 它顯示了使用片段實現導航抽屜。但我的應用程序組關閉,因爲我試圖運行它在API 10(薑餅)導航抽屜2.3薑餅
但它只適用於3.0蜂窩+。我如何使它在2.3薑餅+和全屏模式下工作。請我需要幫助!
提前致謝!
堆棧跟蹤
01-09 16:01:07.971 16470-16470/com.Chinmay.navigationdrawer E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.NoSuchMethodError: com.Chinmay.navigationdrawer.MainActivity.getActionBar
at com.Chinmay.navigationdrawer.MainActivity.onCreate(MainActivity.java:25)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
請爲崩潰添加您的堆棧跟蹤。 – keyboardsurfer
谷歌它有點之前問..看看這個http://developer.android.com/training/implementing-navigation/nav-drawer.html – bogdan
嘗試使用操作欄Sherlock支持此功能在較低的版本。你可以找到演示[這裏](https://github.com/JakeWharton/ActionBarSherlock/tree/master/actionbarsherlock-samples) – AndyN