Been playing around after seeing iOS's TipKit. And...
# compose-android
b
Been playing around after seeing iOS's TipKit. Android meet TipKit
K 2
need to get rid of the casting to SampleTips and make that interface connection part of init
• All tip logic, and UI contents (as well as actions) are part of the
Tip
. • can be attached to any composable within the
TipScaffold
at any level of the node tree
• Asset support • Multiple criteria • actions and navigation • Styled more uniformly
• Now supports tip "flows" to allow chaining tips together (e.g onboarding guided tour)
Copy code
@Singleton
class Anchor2Tip @Inject constructor(
    eventEngine: EventEngine,
    tipEngine: TipsEngine
) : Tip(eventEngine, tipEngine) {

    init {
        flowPosition = 1
        flowId = "onboarding-flow"
    }

    [...]

    override suspend fun criteria(): List<EligibilityCriteria> {
        val priorTipSeen = flow.find { it.name == "anchortip" }?.hasBeenSeen() ?: false
        return listOf( { priorTipSeen } )
    }
}
• Now supporting inline tips
Screen Recording 2023-06-28 at 3.44.21 PM.mov
719 Views