Commit451 / ForegroundViews

Views that supports a foreground, like FrameLayout does
Apache License 2.0
213 stars 29 forks source link

NPE on Android 6.0+ #2

Closed jaredrummler closed 8 years ago

jaredrummler commented 8 years ago

In Android 6.0+ the foreground drawable is set when the view is instantiated (see lines 4278-4282). The ForegroundDelegate is null here, causing a NullPointerException to be thrown when the view is inflated.

Jawnnypoo commented 8 years ago

Thanks for finding and fixing this! 2.0.3 has the fix

jaredrummler commented 8 years ago

Your welcome. A better approach might be to call the super methods on Android 6.0+.

Jawnnypoo commented 8 years ago

Thanks for the suggestion, I went ahead and updated 2.1.0 to work this way :smile: