Skip to content

Commit

Permalink
fix(android): amend ShapeDrawable workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
garymathews authored and ewanharris committed Nov 17, 2021
1 parent 29502ac commit 58037db
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -203,9 +203,9 @@ protected Drawable generateSelectedDrawable(KrollDict properties, Drawable drawa
stateDrawable.addState(new int[] { android.R.attr.state_activated }, new ColorDrawable(COLOR_SELECTED));
}

// NOTE: Android 6.0 and below require ShapeDrawable to have non-null Shape.
// This bug is fixed on Android 7.0 and above.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
// NOTE: Android 7.1 and below require ShapeDrawable to have non-null Shape.
// This bug is fixed on Android 8.0 and above.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
Drawable currentDrawable = drawable;

if (currentDrawable instanceof RippleDrawable) {
Expand Down

0 comments on commit 58037db

Please sign in to comment.