Material Design tap target for Android. https://sjwall.github.io/MaterialTapTargetPrompt/

Overview

Material Tap Target Prompt

Build Status codecov Maintainability Download JavaDoc PRs Welcome

A Tap Target implementation in Android based on Material Design Onboarding guidelines. For more information on tap targets check out the guidelines.

JavaDocs, examples and a sample app with examples implemented are available.

FAB Example App Bar Example

Card Example Centre Example

The sample app is available to download on the Google Play Store: Get it on Google Play

Quick start

Gradle

Add the following to build.gradle:

repositories {
    jcenter()
}

dependencies {
    implementation 'uk.co.samuelwall:material-tap-target-prompt:3.1.0'
}

Supports Android minSdkVersion 14

Version 2.15.0 works with Android Support Library

Also available from GitHub packages

Usage

Basic usage is shown below with more examples in the sample app and documentation:

new MaterialTapTargetPrompt.Builder(MainActivity.this)
        .setTarget(R.id.fab)
        .setPrimaryText("Send your first email")
        .setSecondaryText("Tap the envelope to start composing your first email")
        .setPromptStateChangeListener(new MaterialTapTargetPrompt.PromptStateChangeListener()
        {
            @Override
            public void onPromptStateChanged(MaterialTapTargetPrompt prompt, int state)
            {
                if (state == MaterialTapTargetPrompt.STATE_FOCAL_PRESSED)
                {
                    // User has pressed the prompt target
                }
            }
        })
        .show();

Note

If a target is not set or the target view could not be found or both the primary and secondary text are null then builder.show and builder.create will return null.

Other shapes

The default shape is a circle but any other shape can be rendered by extending the PromptBackground and PromptFocal classes. Custom shapes such as a rectangle can be set by calling setPromptBackground and/or setPromptFocal. Documentation and examples are available here.

Rectangle Example

License

Copyright (C) 2016-2018 Samuel Wall

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • different device size issue

    different device size issue

    Hi, I have problem using this library with different screen sizes. on a 7" tablet, the texts falls outside the box from left or right, while there is no problem with a 5.7" device. How can i handle this issue. i have to mention that,this occurs rarely and only some text in some positions behave in this manner. thanks in advance.

    type: bug 
    opened by MahdiTaghipour 14
  • How to add tap target on option menu in toolbar?

    How to add tap target on option menu in toolbar?

    How to add tap target on option menu in toolbar? this option menu create on method onCreateOptionsMenu, and I want to show tap target on that option menu onCreate Activity.

    type: question 
    opened by ghopretz 13
  • Text in prompt on wrong position when activity smaller then screen and not centered

    Text in prompt on wrong position when activity smaller then screen and not centered

    When you have an activity like in your DialogActivity but it is not in the center of the screen (eg at the bottom) the prompt is shown ok but the text in it is positioned wrong.

    In my example the targetView is on the top right of my activity but my activity is at bottom center of the window. The targetView is still in the bottom right part of the window. Parameters tell met the text will be shown above/left of the target but that is not in my activity anymore.

    I'm searching for a solution in order to help you out :)

    type: bug 
    opened by ElineDeMeyer 11
  • Issue when building using Support Library 26

    Issue when building using Support Library 26

    When trying to build an app using the support library version 26.0.0-beta2, the following errors occur: C:\Users\derek\StudioProjects\Transpo\app\build\intermediates\res\merged\alpha\debug\values\values.xml Error:(631) Attribute "iconTint" already defined with incompatible format. Error:(34) Original attribute defined here. Error:(631) Attribute "iconTintMode" already defined with incompatible format. Error:(35) Original attribute defined here. Error:(631) Attribute "iconTint" already defined with incompatible format. Error:(34) Original attribute defined here. Error:(631) Attribute "iconTintMode" already defined with incompatible format. Error:(35) Original attribute defined here.

    When the library is removed, the project builds normally so it is definitely isolated to this library.

    type: bug 
    opened by dellisd 10
  • Wrong behavior with ActionBar

    Wrong behavior with ActionBar

    Hi Is this library compatible with Toolbar only? When targeting a MenuItem in an Action Bar (AppCompatActivity) the overlay is below the action bar.

    Thanks Nicola

    type: bug 
    opened by nicolabeghin 10
  • Add some TalkBack accessibility support

    Add some TalkBack accessibility support

    When prompt is opened TalkBack service will speak loud the primary text if any followed by the secondary text when exist.

    When accessibility is enabled with touch exploration we prevent selecting views behind the prompt when it is shown.

    This should close #126

    opened by azlekov 9
  • Grow outer circle / force side (instead of center) positioning?

    Grow outer circle / force side (instead of center) positioning?

    This screenshot best describes my problem: https://goo.gl/photos/qHuLLGe1hvqjvBrL6

    When focal is pulsating, it's touching outer circle. And also it would look better if the outer circle was stuck right-side, instead of being centered.

    Is there some smart way of forcing it to stick to side?

    Many many thanks for a great library!

    opened by mstawick 9
  • StatusBar Calculation Wrong

    StatusBar Calculation Wrong

    First of all thanks for this awesome library, I love it! :smile: :bowing_man:

    The latest version introduced a bug (probably by 91e95397a90b5f8812471bf811a16a48e424d53b).

    device-2016-10-02-173553

    This is how it looks with 1.4.0

    device-2016-10-02-173716

    type: bug 
    opened by grote 9
  • Show on an android.app.Dialog

    Show on an android.app.Dialog

    Hi, thanks for your incredible work. I tried to make a MaterialTapTargetPrompt on a Dialog, but the view appear behind the dialog and not on it.

                new MaterialTapTargetPrompt.Builder(activity)
                        .setTarget(_edit_text_)
                        .setPrimaryText(R.string....)
                        .setSecondaryText(R.string...)
                        .setPromptFocal(new RectanglePromptFocal())
                        .setCaptureTouchEventOnFocal(true)
                        .setCaptureTouchEventOutsidePrompt(true)
                        **.setClipToView(_main_dialog_card_view_)**
                        .show();
    

    photo_2022-02-13_23-34-10_B

    probably setClipToView is not working in my case?

    Could you help, me, please?

    type: question 
    opened by paolinho91 8
  • Titles show before animation

    Titles show before animation

    Describe the bug Labels (PrimaryText, SecondaryText) show before animation, hides and show with animation again.

    To Reproduce Video https://www.youtube.com/watch?v=8XRp8cZHN9o watch in slow mode ;-)

    Smartphone (please complete the following information):

    • Device: Nexus 6
    • OS: Android 7.1.1
    • Library version 2.14.0
    opened by kenumir 7
  • Prompt Sequence

    Prompt Sequence

    For an application I'm writing I've written some code that allows you to do something like this (example written in kotlin but would work in Java):

    val sequence = MaterialTapTargetSequence()
    sequence.add(MaterialTapTargetPrompt.Builder(this).setTaget(target1)) // create a new prompt
    sequence.add(MaterialTapTargetPrompt.Builder(this).setTaget(target2)) // create a new prompt
    // ...etc...
    sequence.show()
    

    This allows you to string prompts together in a sequence, simplifying what was described in #31

    Would you be interested in a PR that added this to the library?

    type: enhancement action: released 
    opened by rcraggs 7
  • chore(deps): bump nokogiri from 1.13.6 to 1.13.9 in /docs

    chore(deps): bump nokogiri from 1.13.6 to 1.13.9 in /docs

    Bumps nokogiri from 1.13.6 to 1.13.9.

    Release notes

    Sourced from nokogiri's releases.

    1.13.9 / 2022-10-18

    Security

    Dependencies

    • [CRuby] Vendored libxml2 is updated to v2.10.3 from v2.9.14.
    • [CRuby] Vendored libxslt is updated to v1.1.37 from v1.1.35.
    • [CRuby] Vendored zlib is updated from 1.2.12 to 1.2.13. (See LICENSE-DEPENDENCIES.md for details on which packages redistribute this library.)

    Fixed

    • [CRuby] Nokogiri::XML::Namespace objects, when compacted, update their internal struct's reference to the Ruby object wrapper. Previously, with GC compaction enabled, a segmentation fault was possible after compaction was triggered. [#2658] (Thanks, @​eightbitraptor and @​peterzhu2118!)
    • [CRuby] Document#remove_namespaces! now defers freeing the underlying xmlNs struct until the Document is GCed. Previously, maintaining a reference to a Namespace object that was removed in this way could lead to a segfault. [#2658]

    sha256 checksums:

    9b69829561d30c4461ea803baeaf3460e8b145cff7a26ce397119577a4083a02  nokogiri-1.13.9-aarch64-linux.gem
    e76ebb4b7b2e02c72b2d1541289f8b0679fb5984867cf199d89b8ef485764956  nokogiri-1.13.9-arm64-darwin.gem
    15bae7d08bddeaa898d8e3f558723300137c26a2dc2632a1f89c8574c4467165  nokogiri-1.13.9-java.gem
    f6a1dbc7229184357f3129503530af73cc59ceba4932c700a458a561edbe04b9  nokogiri-1.13.9-x64-mingw-ucrt.gem
    36d935d799baa4dc488024f71881ff0bc8b172cecdfc54781169c40ec02cbdb3  nokogiri-1.13.9-x64-mingw32.gem
    ebaf82aa9a11b8fafb67873d19ee48efb565040f04c898cdce8ca0cd53ff1a12  nokogiri-1.13.9-x86-linux.gem
    11789a2a11b28bc028ee111f23311461104d8c4468d5b901ab7536b282504154  nokogiri-1.13.9-x86-mingw32.gem
    01830e1646803ff91c0fe94bc768ff40082c6de8cfa563dafd01b3f7d5f9d795  nokogiri-1.13.9-x86_64-darwin.gem
    8e93b8adec22958013799c8690d81c2cdf8a90b6f6e8150ab22e11895844d781  nokogiri-1.13.9-x86_64-linux.gem
    96f37c1baf0234d3ae54c2c89aef7220d4a8a1b03d2675ff7723565b0a095531  nokogiri-1.13.9.gem
    

    1.13.8 / 2022-07-23

    Deprecated

    • XML::Reader#attribute_nodes is deprecated due to incompatibility between libxml2's xmlReader memory semantics and Ruby's garbage collector. Although this method continues to exist for backwards compatibility, it is unsafe to call and may segfault. This method will be removed in a future version of Nokogiri, and callers should use #attribute_hash instead. [#2598]

    Improvements

    • XML::Reader#attribute_hash is a new method to safely retrieve the attributes of a node from XML::Reader. [#2598, #2599]

    Fixed

    ... (truncated)

    Changelog

    Sourced from nokogiri's changelog.

    1.13.9 / 2022-10-18

    Security

    Dependencies

    • [CRuby] Vendored libxml2 is updated to v2.10.3 from v2.9.14.
    • [CRuby] Vendored libxslt is updated to v1.1.37 from v1.1.35.
    • [CRuby] Vendored zlib is updated from 1.2.12 to 1.2.13. (See LICENSE-DEPENDENCIES.md for details on which packages redistribute this library.)

    Fixed

    • [CRuby] Nokogiri::XML::Namespace objects, when compacted, update their internal struct's reference to the Ruby object wrapper. Previously, with GC compaction enabled, a segmentation fault was possible after compaction was triggered. [#2658] (Thanks, @​eightbitraptor and @​peterzhu2118!)
    • [CRuby] Document#remove_namespaces! now defers freeing the underlying xmlNs struct until the Document is GCed. Previously, maintaining a reference to a Namespace object that was removed in this way could lead to a segfault. [#2658]

    1.13.8 / 2022-07-23

    Deprecated

    • XML::Reader#attribute_nodes is deprecated due to incompatibility between libxml2's xmlReader memory semantics and Ruby's garbage collector. Although this method continues to exist for backwards compatibility, it is unsafe to call and may segfault. This method will be removed in a future version of Nokogiri, and callers should use #attribute_hash instead. [#2598]

    Improvements

    • XML::Reader#attribute_hash is a new method to safely retrieve the attributes of a node from XML::Reader. [#2598, #2599]

    Fixed

    • [CRuby] Calling XML::Reader#attributes is now safe to call. In Nokogiri <= 1.13.7 this method may segfault. [#2598, #2599]

    1.13.7 / 2022-07-12

    Fixed

    XML::Node objects, when compacted, update their internal struct's reference to the Ruby object wrapper. Previously, with GC compaction enabled, a segmentation fault was possible after compaction was triggered. [#2578] (Thanks, @​eightbitraptor!)

    Commits
    • 897759c version bump to v1.13.9
    • aeb1ac3 doc: update CHANGELOG
    • c663e49 Merge pull request #2671 from sparklemotion/flavorjones-update-zlib-1.2.13_v1...
    • 212e07d ext: hack to cross-compile zlib v1.2.13 on darwin
    • 76dbc8c dep: update zlib to v1.2.13
    • 24e3a9c doc: update CHANGELOG
    • 4db3b4d Merge pull request #2668 from sparklemotion/flavorjones-namespace-scopes-comp...
    • 73d73d6 fix: Document#remove_namespaces! use-after-free bug
    • 5f58b34 fix: namespace nodes behave properly when compacted
    • b08a858 test: repro namespace_scopes compaction issue
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Prompt not showing on dynamically created view

    Prompt not showing on dynamically created view

    Describe the bug I am creating bottom navigation in kotlin, and set id of every view dynamically. I want to set prompt on dynamic footer icons.

    To Reproduce Can't use on dynamically created views.

    Expected behavior in setTarget() method, I am setting view id(i.e., set in kotlin). But prompt not showing on bottom navigation icon.

    Screenshots 5 code image is attached.

    Stack trace No stack track needed.

    Smartphone (please complete the following information):

    • Device: Google Pixel 4a
    • OS: Android 13
    • Library version: 3.3.2
    opened by piyush921 0
  • chore(deps): bump tzinfo from 1.2.9 to 1.2.10 in /docs

    chore(deps): bump tzinfo from 1.2.9 to 1.2.10 in /docs

    Bumps tzinfo from 1.2.9 to 1.2.10.

    Release notes

    Sourced from tzinfo's releases.

    v1.2.10

    TZInfo v1.2.10 on RubyGems.org

    Changelog

    Sourced from tzinfo's changelog.

    Version 1.2.10 - 19-Jul-2022

    Commits
    • 0814dcd Fix the release date.
    • fd05e2a Preparing v1.2.10.
    • b98c32e Merge branch 'fix-directory-traversal-1.2' into 1.2
    • ac3ee68 Remove unnecessary escaping of + within regex character classes.
    • 9d49bf9 Fix relative path loading tests.
    • 394c381 Remove private_constant for consistency and compatibility.
    • 5e9f990 Exclude Arch Linux's SECURITY file from the time zone index.
    • 17fc9e1 Workaround for 'Permission denied - NUL' errors with JRuby on Windows.
    • 6bd7a51 Update copyright years.
    • 9905ca9 Fix directory traversal in Timezone.get when using Ruby data source
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
Releases(v3.3.2)
Owner
Sam Wall
Sam Wall
An Android Layout which has a same function like https://github.com/romaonthego/RESideMenu

ResideLayout An Android Layout which has a same function like https://github.com/romaonthego/RESideMenu. Can be used on Android 1.6(I haven't try it.)

Yang Hui 392 Oct 12, 2022
类似 iOS 带弹簧效果的左右滑动控件,可作为 AbsListView 和 RecyclerView 的 item(作为 AbsListView 的 item 时的点击事件参考代码家的 https://github.com/daimajia/AndroidSwipeLayout )

?? BGASwipeItemLayout-Android ?? 类似iOS带弹簧效果的左右滑动控件,可作为AbsListView和RecyclerView的item。支持给BGASwipeItemLayout和其子控件设置margin和padding属性 效果图 Gradle依赖 dependen

王浩 469 Dec 9, 2022
:octocat: 📃 FoldingCell is a material design expanding content cell inspired by folding paper material made by @Ramotion

FOLDING CELL [JAVA] Expanding content cell with animation inspired by folding paper card material design. We specialize in the designing and coding of

Ramotion 4.9k Dec 7, 2022
Android drawer icon with material design animation

LDrawer Android drawer icon with material design animation Note Basically same as appcompat_v7 version 21, you can use appcompat_v7 compile 'com.andro

Hasan Keklik 1.4k Dec 25, 2022
Android Sample Project with Material Design and Toolbar.

AndroidMaterialDesignToolbar -- PROJECT IS NOT SUPPORTED Android Sample Project with Material Design and Toolbar. Project use Appcompat library for ma

kemal selim tekinarslan 713 Nov 11, 2022
A layout to transition between two views using a Floating Action Button as shown in many Material Design concepts

⚠ This library is no longer maintained ⚠️ FABRevealLayout A layout to transition between two views using a Floating Action Button as shown in many Mat

Tomás Ruiz-López 901 Dec 9, 2022
Navigation Drawer Activity with material design style and simplified methods

MaterialNavigationDrawer Navigation Drawer Activity with material design style and simplified methods       It requires 10+ API and android support v7

Fabio Biola 1.6k Dec 30, 2022
Material Design Search View Layout, now implemented in Google Maps, Dialer, etc

THIS PROJECT IS DEPRECATED Component is not maintained anymore. Implementation of Lollipop+ Dialer and Google Maps. DEMO Add in View Add to your layou

Sahil Dave 1.1k Dec 22, 2022
A simple customised version of the TextInputLayout from the Android Design Support Library ⌨️

Buffer Text Input Layout (Coming to maven central soon!) This is a simple customisation of the TextInputLayout found in the Design Support Library. Wh

Buffer 988 Nov 24, 2022
Pixel perfect for design layout android

Pixelperfect Pixel perfect helps you design layouts according to the resolution of your users' device Follow the steps below to implement : dependen

null 10 Oct 23, 2022
Maetrial Design Delete Concept Implement

MaterialDeleteLayout 说明 早上逛github的时候,发现ParticleLayout这个开源项目,觉得这个创意还可以... 从说明中又点进去看IOS的效果,也从那里看到了原设计图... 原设计图是这样子的: IOS的效果是这样的: 那一刻感觉android的效果lower了好多

CJJ 355 Nov 19, 2022
Smooth version of Google Support Design AppBarLayout

smooth-app-bar-layout [Deprecated] ================ [DEPRECATED] The issue that is addressed in this library is fixed from support design 26.0.0 or ab

Henry Tao 1.8k Dec 13, 2022
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.

Draggable Panel DEPRECATED. This project is not maintained anymore. Draggable Panel is an Android library created to build a draggable user interface

Pedro Vicente Gómez Sánchez 3k Jan 5, 2023
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube New graphic component.

Please switch to DragView, for the best support, thank you DraggablePanel Download allprojects { repositories { ... maven { url 'https://jitp

Hoàng Anh Tuấn 103 Oct 12, 2022
FixedHeaderTableLayout is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells with scrolling and zooming features. FixedHeaderTableLayout is similar in construction and use as to Android's TableLayout

FixedHeaderTableLayout is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells with scrolling and zooming features. FixedHeaderTableLayout is similar in construction and use as to Android's TableLayout

null 33 Dec 8, 2022
A wave view of android,can be used as progress bar.

WaveView ![Gitter](https://badges.gitter.im/Join Chat.svg) A wave view of android,can be used as progress bar. Screenshot APK demo.apk What can be use

Kai Wang 1.3k Dec 28, 2022
An Android library that help you to build app with swipe back gesture.

SwipeBackLayout An Android library that help you to build app with swipe back gesture. Demo Apk GooglePlay Requirement The latest android-support-v4.j

ike_w0ng 6.1k Dec 29, 2022
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.

This project isn't maintained anymore. It is now recommended to use https://github.com/peterLaurence/MapView. MapView is maintained by Peter, one of o

Mike Dunn 1.5k Nov 21, 2022