File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed
iterableapi/src/main/java/com/iterable/iterableapi Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -351,10 +351,13 @@ private void showAndAnimateWebView() {
351
351
default :
352
352
animationResource = R .anim .fade_in_custom ;
353
353
}
354
-
355
- Animation anim = AnimationUtils .loadAnimation (getContext (), animationResource );
356
- anim .setDuration (IterableConstants .ITERABLE_IN_APP_ANIMATION_DURATION );
357
- webView .startAnimation (anim );
354
+ try {
355
+ Animation anim = AnimationUtils .loadAnimation (getContext (), animationResource );
356
+ anim .setDuration (IterableConstants .ITERABLE_IN_APP_ANIMATION_DURATION );
357
+ webView .startAnimation (anim );
358
+ } catch (Exception e ) {
359
+ IterableLogger .e (TAG , "Failed to show inapp with animation" );
360
+ }
358
361
}
359
362
}
360
363
@@ -378,10 +381,15 @@ private void hideWebView() {
378
381
animationResource = R .anim .fade_out_custom ;
379
382
}
380
383
381
- Animation anim = AnimationUtils .loadAnimation (getContext (),
382
- animationResource );
383
- anim .setDuration (IterableConstants .ITERABLE_IN_APP_ANIMATION_DURATION );
384
- webView .startAnimation (anim );
384
+ try {
385
+ Animation anim = AnimationUtils .loadAnimation (getContext (),
386
+ animationResource );
387
+ anim .setDuration (IterableConstants .ITERABLE_IN_APP_ANIMATION_DURATION );
388
+ webView .startAnimation (anim );
389
+ } catch (Exception e ) {
390
+ IterableLogger .e (TAG , "Failed to hide inapp with animation" );
391
+ }
392
+
385
393
}
386
394
387
395
hideInAppBackground ();
You can’t perform that action at this time.
0 commit comments