Open KuaQ opened 9 years ago
Could you share your xml code? And please checkout which version are u using
A using 2.0 version ('com.github.ozodrukh:RippleDrawable:2.0.0)
XML code: <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/accent_material_dark">
<item android:id="@android:id/mask">
<color android:color="@color/accent"/>
</item>
Of course I mean I have this error when I try to run app, have no error when building Of course in XML is added ignore="newapi"
I think i have a same issue. Mostly on Samsung (maybe little more manufacturers), on other devices all is ok.
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/simple_highlight_light_ripple.xml from drawable resource ID #0x7f020164
at android.content.res.Resources.loadDrawable(Resources.java:3063)
at android.content.res.Resources.getDrawable(Resources.java:1624)
at codetail.graphics.drawables.LollipopDrawablesCompat.loadDrawableForCookie(LollipopDrawablesCompat.java:272)
at codetail.graphics.drawables.LollipopDrawablesCompat.loadDrawable(LollipopDrawablesCompat.java:234)
at codetail.graphics.drawables.LollipopDrawablesCompat.getDrawable(LollipopDrawablesCompat.java:177)
at com.medicine.ima._old.congress.activity.GalleryActivity.initialise(GalleryActivity.java:97)
at com.medicine.ima._old.congress.activity.GalleryActivity.onCreate(GalleryActivity.java:49)
at android.app.Activity.performCreate(Activity.java:5451)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386)
at android.app.ActivityThread.access$900(ActivityThread.java:169)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5476)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #2: invalid drawable tag ripple
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:986)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:930)
at android.content.res.Resources.loadDrawable(Resources.java:3059)
at android.content.res.Resources.getDrawable(Resources.java:1624)
at codetail.graphics.drawables.LollipopDrawablesCompat.loadDrawableForCookie(LollipopDrawablesCompat.java:272)
at codetail.graphics.drawables.LollipopDrawablesCompat.loadDrawable(LollipopDrawablesCompat.java:234)
at codetail.graphics.drawables.LollipopDrawablesCompat.getDrawable(LollipopDrawablesCompat.java:177)
at com.medicine.ima._old.congress.activity.GalleryActivity.initialise(GalleryActivity.java:97)
at com.medicine.ima._old.congress.activity.GalleryActivity.onCreate(GalleryActivity.java:49)
at android.app.Activity.performCreate(Activity.java:5451)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386)
at android.app.ActivityThread.access$900(ActivityThread.java:169)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5476)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(NativeStart.java)
simple_highlight_light_ripple.xml:
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:color="@color/main_higlight_on_dark"
tools:ignore="NewApi">
<item android:id="@android:id/mask"
android:drawable="@drawable/simple_highlight_light"/>
</ripple>
Maybe problem is in @android:id/mask?
Version of RippleDrawable 2.0.0.
Anyway, Thanks for your great job)
Same error is happening here on a Samsung Galaxy Tab. With this drwable xml:
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/gris_sombra">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="2dp" />
<solid android:color="@android:color/white" />
<stroke android:width="1dp" android:color="@color/ColorPrimary"/>
</shape>
</item>
</ripple>
It is working right with other devices
Same issue here
Going to fix it in this weekend๐
Edit looked to source of VectorDrawableCompat (in order to fix issues) looks like i will have hot weekends ๐ Open for help or pull requests
same issue here, any updates?
same issue here. To fix it I use my own colors, try this drawable:
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#000">
<item>
<shape android:shape="oval">
<solid android:color="#6c6"/>
</shape>
</item>
</ripple>
When I try to build app with this liblary I have error: invaild drawable tag ripple I based on the samples and I dont know what is wrong ๐ถ๐ถ