frakbot / GlowPadBackport

A backport of the Android 4.2 GlowPadView that works on the SDK on API levels 4+
246 stars 85 forks source link

Android P - non-SDK interfaces and StateListDrawable #18

Open behelit opened 6 years ago

behelit commented 6 years ago

TargetDrawable.java uses reflection to access the getStateCount, which causes an error to popup in Android P

mGetStateCount = StateListDrawable.class.getDeclaredMethod("getStateCount");

49 | mGetStateCount.setAccessible(true);

https://github.com/frakbot/GlowPadBackport/search?utf8=%E2%9C%93&q=StateListDrawable&type=

rock3r commented 6 years ago

Sounds likely, this uses a lot of reflection. I don't think you should be using this backport still, probably a clean reimplementation would be better after all these years :) But if you find a way to work around the issue, I'd really appreciate a PR :)