diff --git a/.idea/appInsightsSettings.xml b/.idea/appInsightsSettings.xml new file mode 100644 index 0000000..371f2e2 --- /dev/null +++ b/.idea/appInsightsSettings.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml index 4ff2d42..0c0c338 100644 --- a/.idea/deploymentTargetDropDown.xml +++ b/.idea/deploymentTargetDropDown.xml @@ -1,17 +1,10 @@ - - - - - - - - - - - - + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 1eef794..62ac951 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,8 +4,6 @@ diff --git a/.idea/migrations.xml b/.idea/migrations.xml new file mode 100644 index 0000000..f8051a6 --- /dev/null +++ b/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/FloatingBubbleView/src/main/java/com/torrydo/floatingbubbleview/bubble/Bubble.kt b/FloatingBubbleView/src/main/java/com/torrydo/floatingbubbleview/bubble/Bubble.kt index f5ff483..d6a8807 100644 --- a/FloatingBubbleView/src/main/java/com/torrydo/floatingbubbleview/bubble/Bubble.kt +++ b/FloatingBubbleView/src/main/java/com/torrydo/floatingbubbleview/bubble/Bubble.kt @@ -71,16 +71,19 @@ open class Bubble( /** * - don't call remove if the view did not call show() previously * - call windowManager.removeViewImmediate() will make the view can't change when added again + * - add this line 'if (root.windowToken == null) return' will prevent the view from being removed in some cases * */ open fun remove() { - if (root.windowToken == null) return - windowManager.removeView(root) +// if (root.windowToken == null) return + try { + windowManager.removeView(root) - if (containCompose) { - composeOwner!!.onPause() - composeOwner!!.onStop() - composeOwner!!.onDestroy() - } + if (containCompose) { + composeOwner!!.onPause() + composeOwner!!.onStop() + composeOwner!!.onDestroy() + } + }catch (_: Exception){} } fun update() {