Releases: sjwall/MaterialTapTargetPrompt
Releases · sjwall/MaterialTapTargetPrompt
v2.1.0
Features
- 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.
Bug Fixes
- Fixed STATE_DISMISSING state change incorrectly occurring when auto dismiss is disabled. Fixes null pointer exception in sample. (#82)
v2.0.1
v2.0.0
- Minimum sdk is now 14.
- Back button dismiss is now enabled by default.
Bug Fixes
- Attributes are prefixed with mttp to be compatible with API 26.
Removed
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)
v1.12.1
v1.12.0
v1.11.0
Features
- 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.
Bug Fixes
- Fixed prompt not working correctly with dialogs by using
DialogResourceFinder
.
Deprecated
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)