show-case-card-view
dimorinny
131
Visit GitHub RepoShowcase Views

Demo

Dependency

Firstly, add Jitpack repository in your root build.gradle file (not your module build.gradle file):

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

Add dependency to your module's build.gradle file:

dependencies {
    implementation 'com.github.dimorinny:show-case-card-view:0.0.4'
}

Usage

You can display a ShowCase on your activity or fragment using the below code.

To display a list of (click-through) steps:

new ShowCaseStepDisplayer.Builder(MainActivity.this)
    .addStep(new ShowCaseStep(new Center(), "Message at center"))
    .addStep(new ShowCaseStep(view, "Message at View"))
    .build().start();

Use withScrollView() if some step's target Views could be inside a ScrollView, they will be auto-scrolled to:

new ShowCaseStepDisplayer.Builder(MainActivity.this)
    .withScrollView(scrollView)
    .addStep(new ShowCaseStep(view, "Message at View to scroll to"))
    .addStep(new ShowCaseStep(new TopLeft(), "Message at TopLeft"))
    .build().start();

To display a single item:

new ShowCaseView.Builder(MainActivity.this)
    .withTypedPosition(new TopLeft())
    .withTypedRadius(new Radius(186F))
    .withContent("This is hello world!")
    .build()
    .show(this);

Available positions:

  • Position(PointF position)
  • TopLeft()
  • TopRight()
  • BottomLeft()
  • BottomRight()
  • TopLeftToolbar()
  • TopRightToolbar()
  • ViewPosition(View view)
  • Center()
  • BottomCenter()

Available radiuses:

  • Radius(float radius)
  • ViewRadius(View view)

For more complicated usage - see example.

Become a better Android Developer
Millions of developers are learning at MindOrks

Online Training Program

Featured Blogs

Our Team

MindOrks is Certainly one of the best online blog to stay on top of all the Android development news, coding and design patterns. Finally a blog I can count on to keep myself updated with latest and greatest things happening in Android world.

Vipul Shah
Android Developer
Microsoft

Become Pro in Android by watching videos

OUR LEARNERS WORK AT