Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sephiroth74/android-target-tooltip
Create Toast like tooltips, but targets can be specified, plus custom properties and features
https://github.com/sephiroth74/android-target-tooltip
android-library android-tooltip java kotlin kotlin-android toast tooltip
Last synced: 25 days ago
JSON representation
Create Toast like tooltips, but targets can be specified, plus custom properties and features
- Host: GitHub
- URL: https://github.com/sephiroth74/android-target-tooltip
- Owner: sephiroth74
- License: mit
- Created: 2014-05-29T18:50:04.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-10-19T09:12:49.000Z (about 1 year ago)
- Last Synced: 2024-10-01T11:23:23.075Z (about 1 month ago)
- Topics: android-library, android-tooltip, java, kotlin, kotlin-android, toast, tooltip
- Language: Kotlin
- Size: 11 MB
- Stars: 1,499
- Watchers: 32
- Forks: 278
- Open Issues: 88
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-kotlin - android-target-tooltip - Create Toast like tooltips, but targets can be specified, plus custom properties and features (Libraries)
README
Android Tooltip
======================Create Toast like tooltips, physical targets can be specified, or even points on screen.
Many additional features and customizations. Just look at the samples Activities.[![Build Status](https://travis-ci.org/sephiroth74/android-target-tooltip.svg?branch=master)](https://travis-ci.org/sephiroth74/android-target-tooltip)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/it.sephiroth.android.library.targettooltip/target-tooltip-library/badge.svg)](https://maven-badges.herokuapp.com/maven-central/it.sephiroth.android.library.targettooltip/target-tooltip-library)
[![](https://jitpack.io/v/sephiroth74/android-target-tooltip.svg)](https://jitpack.io/#sephiroth74/android-target-tooltip)Installation
===## Maven
```gradle
implementation 'it.sephiroth.android.library.targettooltip:target-tooltip-library:**version**'
```
## JitPack**Step 1.** Add the JitPack repository to your build file:
```gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```**Step 2.** Add the dependency
```gradle
dependencies {
implementation 'com.github.sephiroth74:android-target-tooltip:Tag'
}
```Get the latest version on [JitPack](https://jitpack.io/#sephiroth74/android-target-tooltip)
Usage
===```kotlin
val tooltip = Tooltip.Builder(Context)
.anchor(View, Int, Int, Boolean)
.anchor(Int, Int)
.text(CharSequence)
.styleId(Int)
.typeface(Typeface)
.maxWidth(Int)
.arrow(Boolean)
.floatingAnimation(Tooltip.Animation)
.closePolicy(ClosePolicy)
.showDuration(Long)
.fadeDuration(Long)
.overlay(Boolean)
.create()
tooltip
.doOnHidden { }
.doOnFailure { }
.doOnShown { }
.show(View, Tooltip.Gravity, Boolean)
```See the inner [Builder][1] class for the complete set of options
Customization
===Tooltip style can be customized in your style object:
```xml
```And this is the style for the overlay touch:
```xml
```then pass the style in the Builder method **withStyleId(int resId)**
Screenshots
===
![Screen shot](./screenshots/video2.gif)[1]: https://github.com/sephiroth74/android-target-tooltip/blob/master/library/src/main/java/it/sephiroth/android/library/tooltip/Tooltip.java#L1471
License
===
The MIT LicenseSee [LICENSE](LICENSE)