canopas / compose-intro-showcase Goto Github PK
View Code? Open in Web Editor NEWHighlight different features of the app using Jetpack Compose
Home Page: https://canopas.github.io/compose-intro-showcase/
License: Other
Highlight different features of the app using Jetpack Compose
Home Page: https://canopas.github.io/compose-intro-showcase/
License: Other
In FancyShowcaseView, we could design a "tutorial" mode, where a chosen clicked UI element would show its tutorial.
The process was as follow :
Is there any way to make compose-intro-showcase fit this workflow ?
Thank you.
Showcase is offset when using :
WindowCompat.setDecorFitsSystemWindows(window, false)
setContent {
Surface(
modifier = Modifier
.background(colorResource(id = R.color.colorSurface))
.systemBarsPadding()
) {
// IntroShowCaseScaffold( ....
}
}
using lib with 1.07 version
The target element is the settings icon :
Currently dismissing a target just results in it blipping out of existence rather than a revers of the entrance animation.
There are quite a few things that are not in the library,
fun Modifier.introShowCaseTarget
, fun rememberIntroShowCaseState
, fun IntroShowCaseScaffold
, etc.
I'm trying com.canopas.intro-showcase-view:introshowcaseview:1.0.5
.
Hello. I am getting the following exception:
java.lang.IllegalStateException: LayoutCoordinate operations are only valid when isAttached is true
at androidx.compose.ui.node.NodeCoordinator.getParentLayoutCoordinates(NodeCoordinator.kt:256)
at androidx.compose.ui.layout.LayoutCoordinatesKt.findRootCoordinates(LayoutCoordinates.kt:180)
at androidx.compose.ui.layout.LayoutCoordinatesKt.boundsInWindow(LayoutCoordinates.kt:134)
at com.canopas.lib.showcase.component.ShowcaseContentKt.ShowcaseContent(ShowcaseContent.kt:76)
at com.canopas.lib.showcase.component.ShowcaseContentKt$ShowcasePopup$1$1.invoke(ShowcaseContent.kt:55)
at com.canopas.lib.showcase.component.ShowcaseContentKt$ShowcasePopup$1$1.invoke(ShowcaseContent.kt:54)
If I debug into the code I can confirm that the 'targetCords.isAttached' is false and the call of 'targetCords.boundsInWindow()' leads to the exception.
My guess is it has something to do with the fact that I am using a LazyColum. But anyway.. It might be better to handle the 'isAttached == false' case in the library than letting the app crash?
java.lang.IllegalArgumentException: red = 0.0, green = 0.0, blue = 0.0, alpha = 4.29273037E9 outside the range for sRGB IEC61966-2.1 (id=0, model=Rgb)
at androidx.compose.ui.graphics.ColorKt.Color(Color.kt:406)
at androidx.compose.ui.graphics.Color.copy-wmQWz5c(Color.kt:254)
at androidx.compose.ui.graphics.Color.copy-wmQWz5c$default(Color.kt:249)
at androidx.compose.ui.graphics.drawscope.CanvasDrawScope.modulate-5vOe2sY(CanvasDrawScope.kt:727)
at androidx.compose.ui.graphics.drawscope.CanvasDrawScope.configurePaint-2qPWKa0(CanvasDrawScope.kt:657)
at androidx.compose.ui.graphics.drawscope.CanvasDrawScope.configurePaint-2qPWKa0$default(CanvasDrawScope.kt:646)
at androidx.compose.ui.graphics.drawscope.CanvasDrawScope.drawCircle-VaOC9Bg(CanvasDrawScope.kt:351)
at androidx.compose.ui.node.LayoutNodeDrawScope.drawCircle-VaOC9Bg(Unknown Source:23)
at androidx.compose.ui.graphics.drawscope.DrawScope.drawCircle-VaOC9Bg$default(DrawScope.kt:626)
at androidx.compose.ui.graphics.drawscope.DrawScope$DefaultImpls.drawCircle-VaOC9Bg$default(DrawScope.kt:626)
at com.canopas.lib.showcase.IntroShowCaseKt$TargetContent$3$2.invoke(IntroShowCase.kt:136)
at com.canopas.lib.showcase.IntroShowCaseKt$TargetContent$3$2.invoke(IntroShowCase.kt:123)
at androidx.compose.ui.draw.DrawBackgroundModifier.draw(DrawModifier.kt:114)
at androidx.compose.ui.node.LayoutNodeDrawScope.draw-x_KDEd0$ui_release(LayoutNodeDrawScope.kt:92)
at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:370)
at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:58)
at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:396)
at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:395)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2200)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:234)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:230)
at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341)
at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:1)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:230)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:120)
at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:395)
at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:58)
at androidx.compose.ui.platform.RenderNodeApi29.record(RenderNodeApi29.android.kt:209)
at androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList(RenderNodeLayer.android.kt:301)
at androidx.compose.ui.platform.RenderNodeLayer.drawLayer(RenderNodeLayer.android.kt:242)
at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:354)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:367)
at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:359)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:367)
at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:359)
at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:866)
at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:367)
at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:359)
at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:866)
at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:367)
at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:58)
at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:396)
at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:395)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2200)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:234)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:230)
at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341)
at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:1)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:230)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:120)
at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:395)
at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:58)
at androidx.compose.ui.platform.RenderNodeApi29.record(RenderNodeApi29.android.kt:209)
at androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList(RenderNodeLayer.android.kt:301)
at androidx.compose.ui.platform.RenderNodeLayer.drawLayer(RenderNodeLayer.android.kt:242)
at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:354)
at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:866)
at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:367)
at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:359)
at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:866)
at androidx.compose.ui.platform.AndroidComposeView.dispatchDraw(AndroidComposeView.android.kt:1041)
at android.view.View.draw(View.java:23197)
at android.view.View.updateDisplayListIfDirty(View.java:22061)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486)
at android.view.View.updateDisplayListIfDirty(View.java:22017)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486)
at android.view.View.updateDisplayListIfDirty(View.java:22017)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486)
at android.view.View.updateDisplayListIfDirty(View.java:22017)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486)
at android.view.View.updateDisplayListIfDirty(View.java:22017)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486)
at android.view.View.updateDisplayListIfDirty(View.java:22017)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486)
at android.view.View.updateDisplayListIfDirty(View.java:22017)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486)
at android.view.View.updateDisplayListIfDirty(View.java:22017)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486)
at android.view.View.updateDisplayListIfDirty(View.java:22017)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4513)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4486)
at android.view.View.updateDisplayListIfDirty(View.java:22017)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:689)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:695)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:793)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:4670)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4381)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3600)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2328)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9087)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1231)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
at android.view.Choreographer.doCallbacks(Choreographer.java:899)
at android.view.Choreographer.doFrame(Choreographer.java:832)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Hello. I can not find a solution to restart the intro on users demand. I tried to reassign the state via
rememberIntroShowcaseState and implemented some other ideas but it does not work. Any ideas how to achieve that with the latest version?
Currently this library only dismisses targets if the user clicks the exact target space, but this isn't normal behavior when the target being showcased isn't normally clickable. It would be ideal if the library allowed dismissal of targets when tapping outside of the target area.
FATAL EXCEPTION: main
Process: de.payback.client.android.debug, PID: 23852
java.lang.IllegalStateException: LayoutCoordinate operations are only valid when isAttached is true
at androidx.compose.ui.node.NodeCoordinator.getParentLayoutCoordinates(NodeCoordinator.kt:277)
at androidx.compose.ui.layout.LayoutCoordinatesKt.findRootCoordinates(LayoutCoordinates.kt:180)
at androidx.compose.ui.layout.LayoutCoordinatesKt.boundsInRoot(LayoutCoordinates.kt:128)
at payback.core.helpinghand.HelpingHandKt.TargetContent(HelpingHand.kt:81)
at payback.core.helpinghand.HelpingHandKt.access$TargetContent(HelpingHand.kt:1)
at payback.core.helpinghand.HelpingHandKt$TargetContent$4.invoke(Unknown Source:17)
at payback.core.helpinghand.HelpingHandKt$TargetContent$4.invoke(Unknown Source:10)
at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:162)
at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2486)
at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2754)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3385)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3363)
at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341)
at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:1)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3363)
at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:3328)
at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:772)
at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:1047)
at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:124)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:541)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:510)
at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:34)
at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1035)
at android.view.Choreographer.doCallbacks(Choreographer.java:845)
at android.view.Choreographer.doFrame(Choreographer.java:775)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7842)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@e4aa546, androidx.compose.ui.platform.MotionDurationScaleImpl@e47e307, StandaloneCoroutine{Cancelling}@a31fc34, AndroidUiDispatcher@6586a5d]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.