Intro Showcase View
source link: https://canopas.github.io/Intro-showcase-view/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Intro Showcase View Skip to the content.
Intro Showcase View
Highlight different features of the app using Jetpack Compose
View on GitHub Download .zip Download .tar.gz
Intro Showcase View
An android library to highlight different features of the app built using Jetpack Compose.
The library is inspired by the TapTargetView that is useful for legacy views.
Configuration
Available on Maven Central.
Add the dependency
implementation 'com.canopas.intro-showcase-view:introshowcaseview:1.0.5'
How to use ?
@Composable
fun ShowcaseSample() {
val targets = remember {
mutableStateMapOf<String, IntroShowcaseTargets>()
}
var showAppIntro by remember {
mutableStateOf(true)
}
Box {
FloatingActionButton(
onClick = {},
modifier = Modifier.onGloballyPositioned { coordinates ->
targets["email"] = IntroShowcaseTargets(
1, coordinates,
style = ShowcaseStyle.Default.copy(
backgroundColor = Color(0xFF1C0A00), // specify color of background
backgroundAlpha = 0.98f, // specify transparency of background
targetCircleColor = Color.White // specify color of target circle
),
// specify the content to show to introduce app feature
content = {
Column {
Text(
text = "Check emails",
color = Color.White,
fontSize = 24.sp,
fontWeight = FontWeight.Bold
)
Text(
text = "Click here to check/send emails",
color = Color.White,
fontSize = 16.sp
)
Spacer(modifier = Modifier.height(10.dp))
Icon(
painterResource(id = R.drawable.right_arrow),
contentDescription = null,
modifier = Modifier
.size(80.dp)
.align(Alignment.End),
tint = Color.White
)
}
}
)
},
backgroundColor = ThemeColor,
contentColor = Color.White,
elevation = FloatingActionButtonDefaults.elevation(6.dp)
) {
Icon(
Icons.Filled.Email,
contentDescription = "Email"
)
}
if (showAppIntro) {
IntroShowCase(targets) {
//App Intro finished!!
showAppIntro = false
}
}
}
}
Sample app demonstrates how simple the usage of the library actually is.
Interested in library implementation?
Checkout the Article
Bugs and Feedback
For bugs, questions and discussions please use the Github Issues.
Credits
Intro showcaseview is owned and maintained by the Canopas team. You can follow them on Twitter at @canopassoftware for project updates and releases.
Intro-showcase-view is maintained by canopas. This page was generated by GitHub Pages.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK