Skip to content

Commit

Permalink
[MaterialCardView] Fixed NPE if android:onClick is defined in the layout
Browse files Browse the repository at this point in the history
Resolves #1054
Resolves #1614

GIT_ORIGIN_REV_ID=b19044de3093f19313e362d378f5cc3b810c5727
PiperOrigin-RevId: 326486876

(cherry picked from commit 1b0cfae)
  • Loading branch information
wcshi authored and dsn5ft committed Aug 28, 2020
1 parent 53d49e3 commit 475e63b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ public ColorStateList getCardForegroundColor() {
@Override
public void setClickable(boolean clickable) {
super.setClickable(clickable);
cardViewHelper.updateClickable();
if (cardViewHelper != null){
cardViewHelper.updateClickable();
}
}

@Override
Expand Down

0 comments on commit 475e63b

Please sign in to comment.