I recently included the appcompat v7 library to my project. In trying to get rid of bunch of errors, I updated most of my SDK files and changed my target SDK version to 23 from 21. The problem is, my old code for designing the Navigation Drawer Toggle (the hamburger sign/arrow sign) now doesn't work and throws and shows errors on the files through eclipse.
Here's the code:
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">false</item>
<item name="barSize">16sp</item>
<item name="gapBetweenBars">4sp</item>
<item name="color">@android:color/white</item>
</style>
Here is its implementation in my custom theme:
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
Eclipse error reads: No resource found that matches the given name: attr "barSize".
When I comment that out, the app runs but crashes with the error log:
09-20 01:09:39.852: E/AndroidRuntime(1662): FATAL EXCEPTION: main
09-20 01:09:39.852: E/AndroidRuntime(1662): Process: com.site.app, PID: 1662
09-20 01:09:39.852: E/AndroidRuntime(1662): java.lang.NoSuchMethodError: No static method getLayoutDirection(Landroid/graphics/drawable/Drawable;)I in class Landroid/support/v4/graphics/drawable/DrawableCompat; or its super classes (declaration of 'android.support.v4.graphics.drawable.DrawableCompat' appears in /data/app/com.site.app-2/base.apk)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.support.v7.graphics.drawable.DrawerArrowDrawable.draw(DrawerArrowDrawable.java:337)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.widget.ImageView.onDraw(ImageView.java:1209)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.view.View.draw(View.java:15210)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.view.View.updateDisplayListIfDirty(View.java:14144)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.view.View.getDisplayList(View.java:14167)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.view.View.draw(View.java:14934)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.view.ViewGroup.drawChild(ViewGroup.java:3410)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3204)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.view.View.updateDisplayListIfDirty(View.java:14139)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.view.View.getDisplayList(View.java:14167)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.view.View.draw(View.java:14934)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.view.ViewGroup.drawChild(ViewGroup.java:3410)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3204)
09-20 01:09:39.852: E/AndroidRuntime(1662): at android.view.View.draw(View.java:15213)
...
This same code worked when I was compiling with API 21. Any ideas on how to style the Drawer Toggle Arrow with API 23?