{"id":3484,"url":"https://github.com/KeepSafe/TapTargetView","last_synced_at":"2025-08-12T01:31:11.354Z","repository":{"id":41384220,"uuid":"67920599","full_name":"KeepSafe/TapTargetView","owner":"KeepSafe","description":"An implementation of tap targets from the Material Design guidelines for feature discovery.","archived":false,"fork":false,"pushed_at":"2024-10-08T20:23:47.000Z","size":4429,"stargazers_count":5393,"open_issues_count":54,"forks_count":592,"subscribers_count":123,"default_branch":"master","last_synced_at":"2024-12-09T05:00:23.394Z","etag":null,"topics":["android","feature-discovery","material","material-components","material-design","ui"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KeepSafe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-11T09:07:36.000Z","updated_at":"2024-12-03T02:42:53.000Z","dependencies_parsed_at":"2022-08-26T12:11:33.150Z","dependency_job_id":"7402940b-5076-45a6-8570-2b1a7fba4424","html_url":"https://github.com/KeepSafe/TapTargetView","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeepSafe%2FTapTargetView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeepSafe%2FTapTargetView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeepSafe%2FTapTargetView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeepSafe%2FTapTargetView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KeepSafe","download_url":"https://codeload.github.com/KeepSafe/TapTargetView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229624729,"owners_count":18100638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","feature-discovery","material","material-components","material-design","ui"],"created_at":"2024-01-05T20:16:42.809Z","updated_at":"2024-12-13T22:30:40.229Z","avatar_url":"https://github.com/KeepSafe.png","language":"Java","readme":"\u003ch1 align=\"center\"\u003e\n\u003cimg src=\"/.github/video.gif\" width=\"280\" height=\"498\" alt=\"Video 1\"/\u003e\n\u003cimg src=\"/.github/screenshot1.png\" width=\"280\" height=\"498\" alt=\"Screenshot 1\"/\u003e\n\u003cimg src=\"/.github/screenshot2.png\" width=\"280\" height=\"498\" alt=\"Screenshot 2\"/\u003e\u003cbr/\u003e\n\n    TapTargetView\n\u003c/h1\u003e\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.getkeepsafe.taptargetview/taptargetview/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.getkeepsafe.taptargetview/taptargetview)\n[![Release](https://img.shields.io/github/tag/KeepSafe/TapTargetView.svg?label=jitpack)](https://jitpack.io/#KeepSafe/TapTargetView)\n\n\nAn implementation of tap targets from [Google's Material Design guidelines on feature discovery](https://material.io/archive/guidelines/growth-communications/feature-discovery.html).\n\n **Min SDK:** 14\n\n [JavaDoc](https://javadoc.jitpack.io/com/github/KeepSafe/TapTargetView/latest/javadoc/)\n\n## Installation\n\nTapTargetView is distributed using [MavenCentral](https://search.maven.org/artifact/com.getkeepsafe.taptargetview/taptargetview).\n\n```groovy\n   repositories { \n        mavenCentral()\n   }\n   \n   dependencies {\n         implementation 'com.getkeepsafe.taptargetview:taptargetview:x.x.x'\n   }\n```\n\nIf you wish, you may also use TapTargetView with [jitpack](https://jitpack.io/#KeepSafe/TapTargetView).\nFor snapshots, please follow the instructions [here](https://jitpack.io/#KeepSafe/TapTargetView/-SNAPSHOT).\n\n## Usage\n\n### Simple usage\n\n```java\nTapTargetView.showFor(this,                 // `this` is an Activity\n    TapTarget.forView(findViewById(R.id.target), \"This is a target\", \"We have the best targets, believe me\")\n        // All options below are optional\n        .outerCircleColor(R.color.red)      // Specify a color for the outer circle\n\t.outerCircleAlpha(0.96f)            // Specify the alpha amount for the outer circle\n        .targetCircleColor(R.color.white)   // Specify a color for the target circle\n        .titleTextSize(20)                  // Specify the size (in sp) of the title text\n        .titleTextColor(R.color.white)      // Specify the color of the title text\n        .descriptionTextSize(10)            // Specify the size (in sp) of the description text\n        .descriptionTextColor(R.color.red)  // Specify the color of the description text\n        .textColor(R.color.blue)            // Specify a color for both the title and description text\n        .textTypeface(Typeface.SANS_SERIF)  // Specify a typeface for the text\n        .dimColor(R.color.black)            // If set, will dim behind the view with 30% opacity of the given color\n        .drawShadow(true)                   // Whether to draw a drop shadow or not\n        .cancelable(false)                  // Whether tapping outside the outer circle dismisses the view\n        .tintTarget(true)                   // Whether to tint the target view's color\n        .transparentTarget(false)           // Specify whether the target is transparent (displays the content underneath)\n        .icon(Drawable)                     // Specify a custom drawable to draw as the target\n        .targetRadius(60),                  // Specify the target radius (in dp)\n    new TapTargetView.Listener() {          // The listener can listen for regular clicks, long clicks or cancels\n        @Override\n        public void onTargetClick(TapTargetView view) {\n            super.onTargetClick(view);      // This call is optional\n            doSomething();\n        }\n    });\n```\n\nYou may also choose to target your own custom `Rect` with `TapTarget.forBounds(Rect, ...)`\n\nAdditionally, each color can be specified via a `@ColorRes` or a `@ColorInt`. Functions that have the suffix `Int` take a `@ColorInt`.\n\n*Tip: When targeting a Toolbar item, be careful with Proguard and ensure you're keeping certain fields. See [#180](https://github.com/KeepSafe/TapTargetView/issues/180)*\n\n### Sequences\n\nYou can easily create a sequence of tap targets with `TapTargetSequence`:\n\n```java\nnew TapTargetSequence(this)\n    .targets(\n        TapTarget.forView(findViewById(R.id.never), \"Gonna\"),\n        TapTarget.forView(findViewById(R.id.give), \"You\", \"Up\")\n                .dimColor(android.R.color.never)\n                .outerCircleColor(R.color.gonna)\n                .targetCircleColor(R.color.let)\n                .textColor(android.R.color.you),\n        TapTarget.forBounds(rickTarget, \"Down\", \":^)\")\n                .cancelable(false)\n                .icon(rick))\n    .listener(new TapTargetSequence.Listener() {\n        // This listener will tell us when interesting(tm) events happen in regards\n        // to the sequence\n        @Override\n        public void onSequenceFinish() {\n            // Yay\n        }\n        \n        @Override\n        public void onSequenceStep(TapTarget lastTarget, boolean targetClicked) {\n            // Perform action for the current target\n        }\n\n        @Override\n        public void onSequenceCanceled(TapTarget lastTarget) {\n            // Boo\n        }\n    });\n```\n\nA sequence is started via a call to `start()` on the `TapTargetSequence` instance\n\nFor more examples of usage, please look at the included sample app.\n\n### Tutorials\n- [raywenderlich.com](https://www.raywenderlich.com/5194-taptargetview-for-android-tutorial)\n\n## Third Party Bindings\n\n### React Native\nThanks to @prscX, you may now use this library with [React Native](https://github.com/facebook/react-native) via the module [here](https://github.com/prscX/react-native-taptargetview)\n\n### NativeScript\nThanks to @hamdiwanis, you may now use this library with [NativeScript](https://nativescript.org) via the plugin [here](https://github.com/hamdiwanis/nativescript-app-tour)\n\n### Xamarin\nThanks to @btripp, you may now use this library via a Xamarin Binding located [here](https://www.nuget.org/packages/Xamarin.TapTargetView).\n\n## License\n\n    Copyright 2016 Keepsafe Software Inc.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","funding_links":[],"categories":["Libraries","Index `(light-weight pages)`","Index","用户引导","Java"],"sub_categories":["GUI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKeepSafe%2FTapTargetView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKeepSafe%2FTapTargetView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKeepSafe%2FTapTargetView/lists"}