Skip to content

🔦The ShowcaseView library is designed to highlight and showcase specific parts of apps to the user with a attractive and flat overlay.

Notifications You must be signed in to change notification settings

lordmen99/ShowCaseView-1

 
 

Repository files navigation

🔦ShowCaseView🔦

APK API Android Arsenal

How to use:question:

Sample usage in your activity:

 new GuideView.Builder(this)
         .setTitle("Guide Title Text")
         .setContentText("Guide Description Text\n .....Guide Description Text\n .....Guide Description Text .....")
         .setGravity(GuideView.Gravity.AUTO) //optional
         .setDismissType(GuideView.DismissType.anywhere) //optional - default GuideView.DismissType.targetView
         .setTargetView(view)
         .setContentTextSize(12)//optional
         .setTitleTextSize(14)//optional
         .build()
         .show();

Installation

maven:

<repositories>
   <repository>
     <id>jitpack.io</id>
     <url>https://jitpack.io</url>
   </repository>
</repositories>
Step 2. Add the dependency
<dependency>
   <groupId>com.github.mreram</groupId>
   <artifactId>ShowCaseView</artifactId>
   <version>1.0.5</version>
</dependency>

gradle:

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

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}
Step 2. Add the dependency
compile 'com.github.mreram:ShowCaseView:1.0.5'

Change type face

 new GuideView.Builder(this)
            .setTitle("Guide Title Text")
            .setContentText("Guide Description Text\n .....Guide Description Text\n .....Guide Description Text .....")
            .setTargetView(view)
            .setContentTypeFace(Typeface)//optional
            .setTitleTypeFace(Typeface)//optional
            .setDismissType(GuideView.DismissType.outSide) //optional - default dismissible by TargetView
            .build()
            .show();

Change title and Content text size

new GuideView.Builder(this)
            .setTitle("Guide Title Text")
            .setContentText("Guide Description Text\n .....Guide Description Text\n .....Guide Description Text .....")
            .setTargetView(view)
            .setContentTextSize(12)//optional
            .setTitleTextSize(14)//optional
	    .setDismissType(GuideView.DismissType.outSide) //optional - default dismissible by TargetView
            .build()
            .show();

Change Gravity

new GuideView.Builder(this)
         .setTitle("Guide Title Text")
         .setContentText("Guide Description Text\n .....Guide Description Text\n .....Guide Description Text .....")
         .setGravity(GuideView.Gravity.CENTER)//optional
         .setTargetView(view) 
         .setDismissType(GuideView.DismissType.outSide) //optional - default dismissible by TargetView
         .build()
         .show();

use Spannable for Content

 new GuideView.Builder(this)
            .setTitle("Guide Title Text")
            .setTargetView(view)
            .setContentSpan((Spannable) Html.fromHtml("<font color='red'>testing spannable</p>"))
            .setDismissType(GuideView.DismissType.outSide) //optional - default dismissible by TargetView
            .build()
            .show();

Set Listener

  new GuideView.Builder(MainActivity.this)
                  .setTitle("Guide Title Text")
                  .setContentText("Guide Description Text\n .....Guide Description Text\n .....Guide Description Text .....")
                  .setGravity(GuideView.Gravity.CENTER)
                  .setTargetView(view1)
	          .setDismissType(GuideView.DismissType.outSide) //optional - default dismissible by TargetView
                  .setGuideListener(new GuideView.GuideListener() {
                      @Override
                      public void onDismiss(View view) {
                         //TODO ...
                      }
                   })
                   .build()
                   .show();

DismissType Attribute

Type Description
outside Dismissing with click on outside of MessageView
anywhere Dismissing with click on anywhere
targetView Dismissing with click on targetView(targetView is assigned with setTargetView method)

Contribution 💥

Pull requests are welcome! 👏

You can improve/fix some part of it .

Add Tests:

Assuming that the code in question already has automated (unit) tests, do add tests for the code you submit. This isn't a hard rule. There are various cases where you may need to add code without test coverage (e.g. when adding a Object), but if it can be tested, it should be tested.

About

🔦The ShowcaseView library is designed to highlight and showcase specific parts of apps to the user with a attractive and flat overlay.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%