• Stars
    star
    1,467
  • Rank 30,904 (Top 0.7 %)
  • Language
    Kotlin
  • License
    MIT License
  • Created almost 10 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Create Toast like tooltips, but targets can be specified, plus custom properties and features

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

Maven Central

Installation

Maven

implementation 'it.sephiroth.android.library.targettooltip:target-tooltip-library:**version**'

JitPack

Step 1. Add the JitPack repository to your build file:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.sephiroth74:android-target-tooltip:Tag'
}

Get the latest version on JitPack

Usage

    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 class for the complete set of options

Customization

Tooltip style can be customized in your style object:

    <!-- default style -->
    <declare-styleable name="TooltipLayout">
        <attr name="ttlm_padding" format="dimension" />
        <attr name="ttlm_strokeColor" format="color" />
        <attr name="ttlm_backgroundColor" format="color" />
        <attr name="ttlm_strokeWeight" format="dimension" />
        <attr name="ttlm_cornerRadius" format="dimension" />
        <attr name="ttlm_arrowRatio" format="float" />
        <attr name="android:textAppearance" />
        <attr name="ttlm_overlayStyle" format="reference" />
        <attr name="ttlm_elevation" format="dimension" />

        <!-- font file path inside your assets folder -->
        <attr name="ttlm_font" format="string" />

        <!-- textview text gravity -->
        <attr name="android:gravity" />
    </declare-styleable>

And this is the style for the overlay touch:

    <declare-styleable name="TooltipOverlay">
        <attr name="android:color" />
        <attr name="android:alpha" />
        <attr name="ttlm_repeatCount" format="integer" />
        <attr name="ttlm_duration" format="integer" />
        <attr name="android:layout_margin" />
    </declare-styleable>

then pass the style in the Builder method withStyleId(int resId)

Screenshots

Screen shot

License

The MIT License

See LICENSE

More Repositories

1

ImageViewZoom

Android ImageView widget with zoom and pan capabilities
Java
1,893
star
2

Material-BottomNavigation

Bottom Navigation widget component inspired by the Google Material Design Guidelines at https://www.google.com/design/spec/components/bottom-navigation.html
Kotlin
1,461
star
3

HorizontalVariableListView

Horizontal list view for Android which allows variable items widths
Java
859
star
4

AndroidWheel

Custom wheel widget for android
Java
385
star
5

NumberSlidingPicker

Android Number Picker with gestures
Kotlin
352
star
6

ViewRevealAnimator

ViewAnimator view with a lollipop style reveal effect
Java
338
star
7

android-floating-action-menu

Floating Action Menu for Android. Inspired by the Google Plus floating menu
Java
239
star
8

purePDF

A complete actionscript PDF library
ActionScript
141
star
9

AndroidUIGestureRecognizer

AndroidGestureRecognizer is an Android implementation of the Apple's UIGestureRecognizer framework
Kotlin
134
star
10

Android-Exif-Extended

Exif extended library for Android, based on jhead c library (http://www.sentex.net/~mwandel/jhead/)
Java
134
star
11

OverlayMenu

Android Overlay Menu
Java
120
star
12

Android-Easing

Ligh weight android easing
Java
105
star
13

RangeSeekBar

A Range Slider for Android.
Java
99
star
14

Tri-State-Checkbox

3 State Checkbox for android in pure Material Style
Java
59
star
15

RxBroadcast

Reactive Broadcast for Android
Java
12
star
16

ABTest

Simple library for ab testing in android
Java
11
star
17

vignette_demo

Simple demo on how to create a "Vignette" effect in Android
Java
10
star
18

SubtleRater

Discreet AppRater for Android
Java
10
star
19

HListViewAnimations

Based on ListViewAnimations, but target to the HListView instead
Java
10
star
20

Android-MultiSharing

Example on how to do multiple sharing in Android
Java
9
star
21

Appunti

Source code for the Note app available at https://play.google.com/store/apps/details?id=it.sephiroth.android.app.appunti
Kotlin
8
star
22

AlertDialogCustomStyleDemo

Demonstrate how to effectively customize the Android AlertDialog
Java
8
star
23

SBB-Tactile

SBB Tactile Demo App
Kotlin
7
star
24

TwitterAndroidSDK

Twitter SDK for Android, using Twitter4j
Java
7
star
25

python-adb-client

Pure python adb client
Python
5
star
26

android-disk-multi-cache

Multi Cache purpose based on DiskLruCache
Java
5
star
27

radb_client

adb client written in rust
Rust
4
star
28

DiskLruImageCache

Simple file based image cache
Java
4
star
29

ascii_generator

simple python script to print and convert images to ascii art
Python
4
star
30

material_drawable

Provides material background drawables to views
Kotlin
4
star
31

go_adb_client

Go adb client
Go
3
star
32

SimpleLogger

Simple Android logger
Java
2
star
33

git-owners

Simple python utility to generate a report about owners of files inside a git repository
Python
2
star
34

SimpleLruCache

Simple LruCache
Kotlin
2
star
35

kotlin_extensions

Misc Kotlin Extensions for Android
Kotlin
2
star
36

lollipop-transitions

Generic Transitions to be used with the Android 5.0 Transition Framework
1
star
37

Intellij-Settings

1
star
38

AndroidStudio-Settings

Java
1
star
39

JavaCheckStyle

java checkstyle
1
star