Skip to content

SSComposeShowCaseView is a customizable show case view library in Jetpack compose which allows to showcase/highlight the particular features of the application with an engaging overlay. It also provides automatic showcase view feature with customised delay and opacity attributes. ๐ŸŽ‰๐Ÿ’ฅ

License

Notifications You must be signed in to change notification settings

SimformSolutionsPvtLtd/SSComposeShowCaseView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

alt text

SSComposeShowCaseView

Compose Version Kotlin Version API Platform

Introduction

SSComposeShowCaseView is a customizable show case view library which allows to showcase/highlight the particular features of the application with an engaging overlay. It also provides automatic showcase view feature with customised delay and opacity attributes.

Features

  • Simple rounded showcase view
  • Simple rectangle showcase view
  • Animated rounded showcase view
  • Animated rectangle showcase view
  • Automatic showcase view
  • Customise delay between showcase, background opacity

๐ŸŽฌ Preview

Simple Rounded Animated Rounded
Simple Rectangle Animated Rectangle

Gradle Dependency

  • Add it in your root build.gradle at the end of repositories:

    • For Gradle version 5.x.x or less
      allprojects {
          repositories {
          ...
          maven { url 'https://jitpack.io' }
          }
      }
      
    • For Gradle version 6.x.x and above, in settings.gradle file inside pluginManagement block
        pluginManagement {
          repositories {
          ...
          maven { url 'https://jitpack.io' }
          }
      }
      
  • Add the dependency in your app's build.gradle file

    dependencies {
        implementation 'com.github.SimformSolutionsPvtLtd:SSComposeShowCaseView:1.0'
    }
    

๐Ÿค” How to use it

  • Composable function which is used to start showcase view

       fun ShowCaseTarget(
         targets: SnapshotStateMap<String, ShowcaseProperty>,
         isEnableAutoShowCase: Boolean = false,
         showcaseDelay: Long = 2000,
         key: String,
         onShowCaseCompleted: () -> Unit
       )
  • Customise your showcase view using this data class

       data class ShowcaseProperty(
         val index: Int,
         val coordinates: LayoutCoordinates,
         val title: String,
         val titleColor: Color = Color.White,
         val subTitle: String,
         val subTitleColor: Color = Color.White,
         val showCaseType: ShowcaseType = ShowcaseType.SIMPLE_ROUNDED,
         val blurOpacity: Float = 0.8f
       )
  • To start showcase view call composable function ShowCaseTarget like below

       val targets = remember { mutableStateMapOf<String, ShowcaseProperty>() }
       ShowCaseTarget(targets = targets, isEnableAutoShowCase = true, key = "Dashboard") {
          CoroutineScope(Dispatchers.Main).launch {
              Toast.makeText(context, "Thank you! Intro Completed", Toast.LENGTH_SHORT).show()
          }
       }
  • On which ever component you need to showcase, take coordinates of that component using Modifier.onGloballyPositioned and use ShowcaseProperty like shown below

         Image(
              imageVector = Icons.Default.MoreVert,
              contentDescription = "More icon",
              modifier = Modifier
                  .padding(10.dp)
                  .onGloballyPositioned {
                      target["more"] = ShowcaseProperty(
                          index = 1,
                          coordinates = it,
                          title = "More options",
                          subTitle = "Click here to see options",
                          showCaseType = ShowcaseType.ANIMATED_RECTANGLE
                      )
                  }
          )

All Attributes


Attribute Description Default
index Set index to show showcase one by one None
coordinates Components coordinates for showcase None
title Showcase title None
titleColor Color for title White
subTitle Showcase subtitle None
subTitleColor Color for subtitle White
showCaseType Pass type of showcase (SIMPLE_ROUNDED,SIMPLE_RECTANGLE, ANIMATED_ROUNDED, ANIMATED_RECTANGLE) SIMPLE_ROUNDED
blurOpacity Pass opacity to blur background 0.08f
isEnableAutoShowCase To manage showcase automatically false
showcaseDelay Delay in-between showcase for automatic showcase view 2000
key To manage if showcase already shown or not None

Inspired by

Our Libraries in JetPackCompose

  • SSJetPackComposeProgressButton : SSJetPackComposeProgressButton is an elegant button with a different loading animations which makes your app attractive.
  • SSJetpackComposeSwipeableView : SSJetpackComposeSwipeableView is a small library which provides support for the swipeable views. You can use this in your lazyColumns or can add a simple view which contains swipe to edit/delete functionality.
  • SSComposeOTPPinView : A custom OTP view to enter a code usually used in authentication. It includes different types of OTPViews which is easy to use and configure your own view and character of OTP using all the attributes.

Official Documentations

Find this library useful? โค๏ธ

Support it by joining stargazers for this repository.โญ

How to Contribute๐Ÿค

Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! ๐Ÿ’ช Check out our Contributing Guide for ideas on contributing.

๐Ÿ› Bugs and Feedback

For bugs, feature requests, and discussion please use GitHub Issues.

Our Flutter Showcase View Library

Awesome Mobile Libraries

License

MIT License

Copyright (c) 2022 Simform Solutions

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

SSComposeShowCaseView is a customizable show case view library in Jetpack compose which allows to showcase/highlight the particular features of the application with an engaging overlay. It also provides automatic showcase view feature with customised delay and opacity attributes. ๐ŸŽ‰๐Ÿ’ฅ

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages