File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
OneSignalSDK/onesignal/src/main/java/com/onesignal Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -362,7 +362,7 @@ private CardView createCardView(Context context) {
362
362
// Set the initial elevation of the CardView to 0dp if using Android 6 API 23
363
363
// Fixes bug when animating a elevated CardView class
364
364
if (Build .VERSION .SDK_INT == Build .VERSION_CODES .M )
365
- cardView .setCardElevation (dpToPx ( 0 ) );
365
+ cardView .setCardElevation (0 );
366
366
else
367
367
cardView .setCardElevation (dpToPx (5 ));
368
368
@@ -486,7 +486,10 @@ private void dereferenceViews() {
486
486
487
487
private void animateInAppMessage (WebViewManager .Position displayLocation , View messageView , View backgroundView ) {
488
488
final CardView messageViewCardView = messageView .findViewWithTag (IN_APP_MESSAGE_CARD_VIEW_TAG );
489
- Animation .AnimationListener cardViewAnimCallback = createAnimationListenerForAndroidApi23Elevation (messageViewCardView );
489
+
490
+ Animation .AnimationListener cardViewAnimCallback = null ;
491
+ if (Build .VERSION .SDK_INT == Build .VERSION_CODES .M )
492
+ cardViewAnimCallback = createAnimationListenerForAndroidApi23Elevation (messageViewCardView );
490
493
491
494
// Based on the location of the in app message apply and animation to match
492
495
switch (displayLocation ) {
You can’t perform that action at this time.
0 commit comments