This project adheres to Semantic Versioning.
- Added PromptBackground, PromptFocal and PromptText to enable overriding the default implementation.
- Added RectanglePromptBackground, RectanglePromptFocal, CirclePromptBackground and CirclePromptFocal background and focal implementations.
- Added PromptOptions class as base for Builder class.
- Expanded unit testing.
- Added support for primary and secondary text being CharSequence. (#82)
- Added STATE_FINISHING for state change after the finish method has been called.
- Added STATE_NON_FOCAL_PRESSED for state change after the user has pressed the prompt somewhere other than the target or the system back button has been pressed.
- Fixed STATE_DISMISSING state change incorrectly occurring when auto dismiss is disabled. Fixes null pointer exception in sample. (#82)
- Fix user being unable to leave Activity with back button if setAutoDismiss(false) (#81)
- Minimum sdk is now 14.
- Back button dismiss is now enabled by default.
- Attributes are prefixed with mttp to be compatible with API 26.
ResourceFinder.getWindow()
OnHidePromptListener
- Replaced withPromptStateChangeListener
.OnHidePromptListener.onHidePrompt
- Replaced withPromptStateChangeListener(MaterialTapTargetPrompt prompt, boolean state)
where the state is eitherMaterialTapTargetPrompt.STATE_DISMISSING
orMaterialTapTargetPrompt.STATE_FOCAL_PRESSED
.OnHidePromptListener.onHidePromptComplete
- Replaced withPromptStateChangeListener(MaterialTapTargetPrompt prompt, boolean state)
where the state is eitherMaterialTapTargetPrompt.STATE_DISMISSED
orMaterialTapTargetPrompt.STATE_FINISHED
.builder.setBackgroundColourAlpha
- Alpha is taken frombuilder.setBackgroundColour(int)
builder.setBackgroundColourFromRes(int)
- Use a constructor with a theme for exampleBuilder(Activity, int)
builder.setFocalColourAlpha(int)
- Alpha value is taken frombuilder.setFocalColour(int)
builder.setFocalColourFromRes(int)
- Use a constructor with a theme for exampleBuilder(Activity, int)
builder.setFocalToTextPadding(float)
- Renamed tosetFocalPadding(float)
builder.setFocalToTextPadding(int)
- Rename tosetFocalPadding(int)
builder.setIconDrawableColourFilterFromRes(int)
- Use a constructor with a theme for exampleBuilder(Activity, int)
builder.setOnHidePromptListener(MaterialTapTargetPrompt.OnHidePromptListener
- Replaced withbuilder.setPromptStateChangeListener(PromptStateChangeListener)
builder.setPrimaryTextColourFromRes(int)
- Use a constructor with a theme for exampleBuilder(Activity, int)
builder.setSecondaryTextColourFromRes(int)
- Use a constructor with a theme for exampleBuilder(Activity, int)
- Fixed prompt not working with window app bar
- Fixed incorrect positioning of prompt when target view gets removed from window.
ResourceFinder.getWindow()
no longer required, will be removed in v2.0.0
- Added
setBackButtonDismissEnabled(boolean)
to allow the system back button to dismiss the prompt. - Added bottom sheet dialog fragment example.
- Added
PromptStateChangeListener
to listen for prompt being shown and hidden. Possible states are: STATE_REVEALING
- Prompt reveal animation is running.STATE_REVEALED
- Prompt reveal animation has finished and the prompt is displayed.STATE_FOCAL_PRESSED
- The prompt target has been pressed.STATE_FINISHED
- The prompt has been removed from view after the prompt target has been pressed.STATE_DISMISSING
- The prompt has been pressed somewhere other than the prompt target or the system back button has been pressed.STATE_DISMISSED
- The prompt has been removed from view after the prompt has either been pressed somewhere other than the prompt target or the system back button has been pressed.- Replaced dependency on
Activity
withResourceFinder
interface. Now usesActivityResourceFinder
orDialogResourceFinder
. - Primary text is no longer required, either primary or secondary text must be set.
- Fixed prompt not working correctly with dialogs by using
DialogResourceFinder
.
OnHidePromptListener
- Replaced withPromptStateChangeListener
.OnHidePromptListener.onHidePrompt
- Replaced withPromptStateChangeListener(MaterialTapTargetPrompt prompt, boolean state)
where the state is eitherMaterialTapTargetPrompt.STATE_DISMISSING
orMaterialTapTargetPrompt.STATE_FOCAL_PRESSED
.OnHidePromptListener.onHidePromptComplete
- Replaced withPromptStateChangeListener(MaterialTapTargetPrompt prompt, boolean state)
where the state is eitherMaterialTapTargetPrompt.STATE_DISMISSED
orMaterialTapTargetPrompt.STATE_FINISHED
.builder.setBackgroundColourAlpha
- Alpha value will be taken frombuilder.setBackgroundColour(int)
in v2.0.0builder.setBackgroundColourFromRes(int)
- Will be removed in v2.0.0, use a constructor with a theme for exampleBuilder(Activity, int)
builder.setFocalColourAlpha(int)
- Alpha value will be taken frombuilder.setFocalColour(int)
in v2.0.0builder.setFocalColourFromRes(int)
- Will be removed in v2.0.0, use a constructor with a theme for exampleBuilder(Activity, int)
builder.setFocalToTextPadding(float)
- Renamed tosetFocalPadding(float)
builder.setFocalToTextPadding(int)
- Rename tosetFocalPadding(int)
builder.setIconDrawableColourFilterFromRes(int)
- Will be removed in v2.0.0, use a constructor with a theme for exampleBuilder(Activity, int)
builder.setOnHidePromptListener(MaterialTapTargetPrompt.OnHidePromptListener
- Replaced withbuilder.setPromptStateChangeListener(PromptStateChangeListener)
builder.setPrimaryTextColourFromRes(int)
- Will be removed in v2.0.0, use a constructor with a theme for exampleBuilder(Activity, int)
builder.setSecondaryTextColourFromRes(int)
- Will be removed in v2.0.0, use a constructor with a theme for exampleBuilder(Activity, int)
- Added id to prompt view
- Fixed null text causing crash when layout direction is right to left
- Fixed right to left text positioning
- Improved text and background positioning calculations
- Added side nav target example
- Fixed right to left text drawing outside the background
- Added check for primary text layout being created before drawing
- Fixed background not covering text in certain scenarios
- Prompts greater than 88dp from the top or bottom now use an optimized background
- Fixed onHidePromptComplete event being triggered twice
- Fixed background being too small in certain use cases
- Fixed null target view not being handled gracefully
- Fixed point in background calculation
- Added card example
- Fixed background not showing when animations are disabled
- Added following guidelines on centre positioned targets
- Added setting background colour alpha
- Added setting focal colour alpha
- Fixed incorrect text positioning on centre positioned targets
The fix for the target activity not having a view group as its first child view changed the default view that is clipped to. This means that for the dialog activity sample the view that is clipped to needs to be set.
builder.setClipToView(findViewById(R.id.dialog_view))
- Added ability to set the view that the prompt is clipped to
- Added app bar action icon examples
- Fixed crash that occurred when target activity did not have a view group as its first child view
- Improved text position calculations
- Improved background radius calculations
- Fixed prompt icon sharing its state with other drawables
- Improved ActionMode example
- Fixed crash when running on Gingerbread and below that was introduced in v1.6.1
- Fixed prompt being shown behind ActionMode (removed drawing behind DrawerLayout)
- Added ActionMode example
- Added RTL layout support
- Added methods to change text gravity
- Added disabling idle animation
- Added method to change the view that is rendered as the target
- Improved dialog style sample
- Fixed prompt text positioning not taking clip bounds into account
- Fixed clip bounds being incorrectly calculated on KitKat and lower
- Fixed status bar height being incorrectly applied to clip bounds
- Changed how status bar height is obtained
- Fixed clip bounds being incorrectly calculated
- Added tinting icon drawable
- Fixed icon drawable being incorrectly tinted
- Added changing primary and secondary text typeface
- Reduced number of generated methods
- Removed incorrect delay in starting the prompt display animation
- Added style attribute for controlling capturing focal touch events
- Added option to capture touch events outside prompt
- Added options to disable auto dismiss and auto finish prompt
- Fixed prompt view position not changing on target view position change
- Fixed null pointer exception in Builder.show when create returns null
- Fixed crash if secondary text not set
- Fixed incorrectly named method getTextSeparation, renamed to setTextSeparation
- Fixed incorrect text positioning when view is clipped
- Fixed incorrect margin use
- Added loading prompt theme from style
- Fixed prompt being drawn outside activity bounds
- Initial release