Skip to content

Commit ea05d5d

Browse files
committed
Possible nullpointer bug with layoutBackground
1 parent 5587234 commit ea05d5d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bubbleshowcase/deploy.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ apply from: 'keystore.gradle'
77
ext{
88
groupId = 'com.elconfidencial.bubbleshowcase'
99
artifactId = 'bubbleshowcase'
10-
libraryVersion = '1.2.1'
10+
libraryVersion = '1.2.2'
1111
}
1212

1313
version = libraryVersion

bubbleshowcase/src/main/java/com/elconfidencial/bubbleshowcase/BubbleShowCase.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class BubbleShowCase(builder: BubbleShowCaseBuilder){
116116
if(isFirstOfSequence){
117117
//Add the foreground layout above the root view
118118
val animation = AnimationUtils.getFadeInAnimation(0, DURATION_BACKGROUND_ANIMATION)
119-
rootView.addView(AnimationUtils.setAnimationToView(foregroundLayoutWithBlur!!, animation))
119+
foregroundLayoutWithBlur?.let { rootView.addView(AnimationUtils.setAnimationToView(foregroundLayoutWithBlur!!, animation)) }
120120
}
121121
}
122122

@@ -379,11 +379,11 @@ class BubbleShowCase(builder: BubbleShowCaseBuilder){
379379
}
380380

381381
private fun getScreenVerticalOffset(): Int{
382-
return ScreenUtils.getAxisYpositionOfViewOnScreen(foregroundLayoutWithBlur!!)
382+
return if(foregroundLayoutWithBlur!=null) ScreenUtils.getAxisYpositionOfViewOnScreen(foregroundLayoutWithBlur!!) else 0
383383
}
384384

385385
private fun getScreenHorizontalOffset(): Int{
386-
return ScreenUtils.getAxisXpositionOfViewOnScreen(foregroundLayoutWithBlur!!)
386+
return if(foregroundLayoutWithBlur!=null) ScreenUtils.getAxisXpositionOfViewOnScreen(foregroundLayoutWithBlur!!) else 0
387387
}
388388

389389
private fun getMessageViewWidthOnTablet(availableSpace: Int): Int{

0 commit comments

Comments
 (0)