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() {
351351 default :
352352 animationResource = R .anim .fade_in_custom ;
353353 }
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+ }
358361 }
359362 }
360363
@@ -378,10 +381,15 @@ private void hideWebView() {
378381 animationResource = R .anim .fade_out_custom ;
379382 }
380383
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+
385393 }
386394
387395 hideInAppBackground ();
You can’t perform that action at this time.
0 commit comments