BlurTutorial
Hurry to check our newest library that helps to blur the background in Android apps. BlurTutorial highlights the needed UI elements and brings users' attention to the app's parts you're introducing. You can easily apply a blurred view behind the dialog window and context menu, singling out the important elements.
Want to play around with BlurTutorial animation? Check Appetize!
We’ve created the library to help users enhance their app's usability and appearance. BlurTutorial handles both the tasks.
Setup
To use BlurTutorial add dependency to your project:
Usage
BlurTutorial
The main component of library is the BlurTutorial interface.
TutorialState
TutorialState is an interface, that describes UI item to explain. There are a few data classes, that implement this interface:
- ViewState - describes the View to highlight.
- MenuState - describes the menu item to highlight.
- RecyclerItemState - describes the RecyclerView item to highlight.
- PathState - describes the geometric figure to highlight.
By using this state you can highlight a part of view or a part of visible screen area.
TutorialBuilder
To create an instance of BlurTutorial you have to use TutorialBuilder.
Builder method name | parameter description | is required |
---|---|---|
withParent | Root of your layout. Will be blurred or dimmed. | yes |
withPopupLayout | Layout of popup window. | yes |
withPopupAppearAnimation | Popup appear animation resource | no |
withPopupDisappearAnimation | Popup disappear animation resource | no |
withPopupAppearAnimator | Popup appear animator resource | no |
withPopupDisappearAnimator | Popup disappear animator resource | no |
withPopupXOffset | X offset of popup window | no |
withPopupYOffset | Y offset of popup window | no |
withPopupCornerRadius | Radius of popup corners | no |
withBlurRadius | Radius of blur. Must be in a range (0.0; 25.0]. By default, it's 10.0 | no |
withOverlayColor | Color of overlay, that will be displayed above blurred or dimmed background. | no |
withHighlightType | Type of highlight: Blur or Dim. By default, it's Blur. | no |
withListener | Listener of tutorial process | yes |
TutorialListener
Also you have to set listener of tutorial process:
Fragment/Activity usage
Proguard
Also depending on your Proguard config, you have to setup your proguard-rules.pro file: