Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
bradmartin committed Jul 9, 2018
1 parent a836061 commit e6319e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cardview.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export class CardView extends CardViewCommon {
this.nativeView.setClickable(false);
} else {
const attr = java.lang.Class.forName('android.support.v7.appcompat.R$attr');
const field = attr.getField('selectableItemBackground');

// https://developer.android.com/reference/java/lang/Class#getField(java.lang.String)
const field = attr.getField('selectableItemBackground') as java.lang.reflect.Field;

if (field && android.os.Build.VERSION.SDK_INT >= 23) {
const resId = field.getInt(null);
Expand Down

0 comments on commit e6319e8

Please sign in to comment.