• Stars
    star
    791
  • Rank 57,558 (Top 2 %)
  • Language
    Java
  • License
    MIT License
  • Created over 8 years ago
  • Updated 3 months ago

Reviews

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

Repository Details

A simple library based on PopupWindow to create Tooltips on Android. 💚

Android Simple Tooltip

PT

Licence MIT Build Status Release Downloads Android Arsenal

A simple library based on PopupWindow to create Tooltips on Android.

Features

  • Working from Android 4.0 (API 14)
  • Simple to use: few parameters in a single line of code
  • Animation with speed and size control
  • Option to close with touch inside or outside of the tooltip.
  • Modal mode (prevents touch in the background)
  • Overlay (darkens the background highlighting the anchor)
  • Customizable arrow
  • Inflatable content from a View or XML layout.
  • Colors and dimensions customized by Builder or XML resources

Demo

Demo

Usage

Basic

View yourView = findViewById(R.id.your_view);

new SimpleTooltip.Builder(this)
    .anchorView(yourView)
    .text("Texto do Tooltip")
    .gravity(Gravity.END)
    .animated(true)
    .transparentOverlay(false)
    .build()
    .show();

Resources

<color name="simpletooltip_background">@color/colorAccent</color>
<color name="simpletooltip_text">@android:color/primary_text_light</color>
<color name="simpletooltip_arrow">@color/colorAccent</color>
<dimen name="simpletooltip_max_width">150dp</dimen>
<dimen name="simpletooltip_overlay_offset">10dp</dimen>
<dimen name="simpletooltip_margin">10dp</dimen>
<dimen name="simpletooltip_padding">8dp</dimen>
<dimen name="simpletooltip_arrow_width">30dp</dimen>
<dimen name="simpletooltip_arrow_height">15dp</dimen>
<dimen name="simpletooltip_animation_padding">4dp</dimen>
<integer name="simpletooltip_overlay_alpha">120</integer>
<integer name="simpletooltip_animation_duration">800</integer>
<style name="simpletooltip_default" parent="@android:style/TextAppearance.Medium"></style>

More info on the sample project and javadoc.

Download

Release

  1. Add it in your root build.gradle at the end of repositories:

    allprojects {
    	repositories {
    		...
    		maven { url "https://jitpack.io" }
    	}
    }
  2. Add the dependency in your app/build.gradle:

    dependencies {
        implementation 'com.github.douglasjunior:android-simple-tooltip:1.1.0'
    }

Snapshot

dependencies {
    implementation('com.github.douglasjunior:android-simple-tooltip:master-SNAPSHOT') {
        changing = true // Gradle will then check for updates every 24 hours
    }
}

Contribute

New features, bug fixes and improvements in the translation are welcome! For questions and suggestions use the issues.

Before submit your PR, run the gradle check.

./gradlew build connectedCheck

Become a Patron! Donate

Known issues

  1. If you close the Dialog/Activity without the Tooltip is closed, there may be the exception java.lang.IllegalArgumentException: Could not lock surface. This error occurs because the animation continue for a while after closing the Dialog/Activity. (This error does not impact the execution of the app)

  2. If you call tooltip.show() after Activity/Dialog is closed, there may be the exception android.view.WindowLeaked: Activity has leaked window android.widget.PopupWindow$PopupViewContainer that was originally added here. Read more. (This error does not impact the execution of the app)

  3. From API 24, Android has changed the behavior of PopupWindow in relation to the setClippingEnabled property, which causes the Popup to be cut off. Read more.

Star History

Star History Chart

Licence

The MIT License (MIT)

Copyright (c) 2016 Douglas Nassif Roma Junior

See the full licence file.

More Repositories

1

react-native-keyboard-manager

⚛ Library to prevent issues of keyboard sliding up and cover inputs on React-Native iOS projects.
Objective-C
954
star
2

react-native-simple-dialogs

⚛ Cross-platform React Native dialogs based on the Modal component
TypeScript
323
star
3

AndroidBluetoothLibrary

A Library for easy implementation of Serial Bluetooth Classic and Low Energy on Android. 💙
Java
212
star
4

react-native-get-location

⚛ Simple to use React Native library to get native device location for Android and iOS.
Java
205
star
5

react-native-recaptcha-that-works

⚛ A reCAPTCHA bridge for React Native that works (Android and iOS)
TypeScript
164
star
6

react-native-pdf-renderer

⚛ A zoomable, blazing fast, zero dependencies, pure native, typed PDF Renderer for Android and iOS.
Java
132
star
7

emage

🧙‍♂️ From developers to developers: a cross-platform tool for losslessly image compression.
JavaScript
120
star
8

react-native-easybluetooth-classic

⚛ A Library for easy implementation of Serial Bluetooth Classic on React Native (Android Only).
Java
43
star
9

react-native-gradient-shimmer

⚛ A pure JavaScript, performant, typed shimmer component for Android, iOS and Web
TypeScript
41
star
10

react-native-applifecycle

⚛ Enhances the reliability of managing app lifecycles across iOS and Android platforms, ensuring consistent behavior regarding foreground and background states.
TypeScript
39
star
11

electron-webpack-react-boilerplate

Sample project containing Electron Forge + webpack + React + React Router + Ant Design + Recharts + Sass and Less.
JavaScript
26
star
12

react-native-notifree

*DEPRECATED* Free React Native library to display local notifications.
JavaScript
22
star
13

react-native-easybluetooth-le

A Library for easy implementation of Serial Bluetooth Low Energy on React Native. ⚛
Java
18
star
14

react-recaptcha-that-works

⚛ A reCAPTCHA bridge for React that works.
TypeScript
16
star
15

DouglasJuniorTCC

Software para mineração e medição de dados do GitHub.
Java
10
star
16

LaTeX-PPGI-UTFPR

Template LaTeX para criação do PDM/Dissertação de acordo com as normas da UTFPR
TeX
10
star
17

Facebug

Rede social em desenvolvimento pelos alunos de Programação Web 2015/1 do curso de ADS da Faculdade Integrado
Java
9
star
18

Bootcamp-DB1-2024

JavaScript
8
star
19

learning-react

JavaScript
7
star
20

WebDevAlfa-2018-React

Desenvolvimento Web com React JS
JavaScript
7
star
21

WebDevAlfa-2017-2-PrimeiroProjeto

Projeto "Hello World" utilizado como introdução ao framework React Native na Pós-graduação WebDev Alfa.
JavaScript
6
star
22

Treinamento-JavaScript-UTFPR

Conteúdo do treinamento de JavaScript ministrado na UTFPR-CM.
JavaScript
6
star
23

RhinoAndroidTest

JavaScript interpretation with Rhino
Java
5
star
24

simple-csv-editor

Simples editor de CSV para auxiliar no setup de máquinas pick and place.
Java
4
star
25

react-native-inputAccessoryView

Project to simulate the inputAccessoryView problem
Objective-C
4
star
26

programacao-web-2018-2

Repositório para os arquivos das aulas de Programação Web.
Java
4
star
27

conccepar-caprover-workshop

Minicurso: Como instalar e configurar um PaaS em minutos!
4
star
28

ignore-dependency-scripts

Script to prevent dependencies to execute post/pre install scripts when installed directly from git.
JavaScript
4
star
29

WebDevAlfa-2017-2-Avaliacao

Avaliação da disciplina de Desenvolvimento de Aplicações Híbridas.
Objective-C
4
star
30

WebDevAlfa-2019-Node

Desenvolvimento de APIs com Node JS
JavaScript
4
star
31

SampleLibGDX

Sample project for learn libGDX on Android Studio
Java
4
star
32

ohm-to-hass-agent

PowerShell scripts to read sensors from Open Hardware Monitor and return to HASS.Agent.
PowerShell
4
star
33

JavaBlockProgramming

A prototype for control the "execution flow" of the block programming.
Java
3
star
34

java-basic-http_PI4_2016-2

Atividade de implementação de um Servidor HTTP Java para Projeto Integrador IV (2016/2)
Java
3
star
35

meiodia

🕺🍻 Chaaaaaaaama!
JavaScript
3
star
36

TestSwiftRealmAlamofireObjectMapper

Testing Realm Database on iOS Swift project
Swift
3
star
37

nodejs-babel-vscode-debug

Example project to use NodeJS 6 with babel and vscode debug.
JavaScript
3
star
38

WebDevAlfa-2018-Node

Desenvolvimento de APIs com Node JS
JavaScript
3
star
39

CloudTester

Biblioteca de teste e comparação entre APIs de acesso a nuvem.
Java
3
star
40

Treinamento-JavaScript-Mactus

Material do treinamento de JavaScript para a empresa Mactus de Campo Mourão
JavaScript
3
star
41

php-legacy-code-example

CSS
3
star
42

WebDevAlfa-2019-React

Desenvolvimento Web com React JS
JavaScript
3
star
43

MinicursoLibGDX-SNCT2016

Projetos utilizados durante o Minicurso sobre LibGDX do SNCT 2016 em Dois Vizinhos - PR http://semanact.mcti.gov.br/
Java
3
star
44

fabric-icons

This repository is maintained to allow the import of Office Fabric Icons into the react-native-vector-icons
SCSS
3
star
45

SEINFO-2017-JavaScript

Projeto do minicurso de Desenvolvimento Full-stack com JavaScript da SEINFO 2017
JavaScript
3
star
46

Treinamento-JavaScript-SkyPass

Material do treinamento de desenvolvimento Web e Mobile para a empresa SkyPass de Campo Mourão
3
star
47

MinicursoLibGDX-VIICONCCEPAR2016

Projetos utilizados durante o Minicurso sobre LibGDX do VII CONCCEPAR da Faculdade Integrado de Campo Mourão - PR http://conccepar.grupointegrado.br/
Java
3
star
48

react-native-easybluetooth-core

This repository has the CoreModule class used in the libraries react-native-easybluetooth-le and react-native-easybluetooth-classic
Java
3
star
49

GalaxyAsteroidsGameJFX

A simple example of a game developed in JavaFX and Java 8
Java
2
star
50

backend-bootcamp-db1-2024

JavaScript
2
star
51

PrimefacesChartZoomTest

JavaScript
2
star
52

learning-angular2

JavaScript
2
star
53

douglasjunior

2
star
54

SpaceInvaders-LibGDX

Jogo desenvolvido com os alunos de Tópicos Especiais 2015-2 da Faculdade Integrado de Campo Mourão
Java
2
star
55

libgdx-textarea-highlighting

Textarea with code highlighting for LibGDX
Java
2
star
56

backend-bootcamp-db1-2023

JavaScript
2
star
57

CodeProMetrcis2CSV

Simple program for converting CodePro output XML files to CSV
Java
2
star
58

learning-reactnative-redux

Learning Redux with React-Native
JavaScript
2
star
59

MinicursoGit-IXCONCCEPAR

Projetos utilizados durante o Minicurso sobre Git e GitHub do IX CONCCEPAR do Centro Universitário Integrado de Campo Mourão - PR
2
star
60

BichoVsCVSAnalY

Minerador de dados para unir as Issues coletadas pelo Bicho aos Scmlogs coletados pelo CVSAnalY
Java
2
star
61

FlappyBird-LibGDX

Jogo desenvolvido com os alunos de Tópicos Especiais 2015-2 da Faculdade Integrado de Campo Mourão
Java
2
star
62

Treinamento-WebMobile-ExpNordeste

Material do treinamento de desenvolvimento Web e Mobile para a empresa Expresso Nordeste de Campo Mourão
PHP
2
star
63

ProjetoIntegrador2012

Projeto interdisciplinar do 5º período do curso de TSI da UTFPR de Campo Mourão.
PHP
2
star
64

CloudTesterWeb

Implementação da biblioteca CloudTester para comparação entre APIs de acesso a plataformas de nuvem.
Java
2
star
65

SimulandoHerancaMultipla

Exemplo de simulação de herança múltipla de tipos e comportamentos utilizando o modificador "default" do Java 8.
Java
2
star
66

react-native-daylight-saving-date

Sample project to reproduce the issue: Parsing 'daylight saving date' returns wrong date and time on Android.
Objective-C
1
star
67

learning-webpack

JavaScript
1
star
68

MinicursoRest-VICONCCEPAR

Projetos utilizados durante o Minicurso sobre REST do VI CONCCEPAR da Faculdade Integrado de Campo Mourão - PR
Java
1
star
69

frontend-bootcamp-db1-2024

JavaScript
1
star
70

PayaraJCloudsTest

Test project to use JClouds with Payara.
HTML
1
star
71

learning-or-tools

Sample project to learn about Google OR Tools
Python
1
star
72

CadastroPessoaServlet

Disciplina de Programação Web da Faculdade Integrado - Aplicação de cadastro de pessoas utilizando Servlets e cliente Android
Java
1
star
73

apache-jira-miner

Automatically exported from code.google.com/p/apache-jira-miner
Java
1
star
74

react-native-environment-sample

Java
1
star
75

TestingLibrarySample

Java
1
star
76

ExerciciosPOO-PPGI

Java
1
star
77

micro-react-app-example

JavaScript
1
star
78

TestTomEE

Projeto de teste utilizando JSF, EJB, CDI, JPA e JAX-RS com TomEE Plume.
Java
1
star
79

SampleTracker

Android sample tracker
Java
1
star
80

Picaretas

Rede de anúncios em desenvolvimento pelos alunos de Programação Web 2015/2 do curso de ADS da Faculdade Integrado
Java
1
star
81

JavaScriptingTest

Java
1
star
82

node-app-with-docker

JavaScript
1
star
83

react-native-windows-test

C#
1
star
84

topicos-2017-2-frontend

JavaScript
1
star
85

Minicurso-Integrado-2017-JavaScript

Projeto do minicurso de Desenvolvimento Mobile e Backend com JavaScript da Faculdade Integrado.
JavaScript
1
star
86

aula-revisao-de-codigo

Repositório para exemplificar o processo de revisão de código fonte.
1
star
87

Labirinto-LibGDX

Exemplo de criação de labirinto utilizando o conceito de matriz com LibGDX
Java
1
star
88

dispositivos-2018-1-introducao-android

Kotlin
1
star
89

mocha-test

JavaScript
1
star
90

topicos-2017-2-backend

Repositório contendo código Node JS.
JavaScript
1
star
91

dispositivos-2018-01-exemplo-kotlin

Exemplo de projeto Android utilizando Kotlin
Kotlin
1
star
92

repositorio-teste

HTML
1
star
93

db1-code-challange-2019

JavaScript
1
star
94

learning-nextjs

JavaScript
1
star
95

CadastroProdutoServletBD

Disciplina de Programação Web da Faculdade Integrado - Aplicação de cadastro de produtos utilizando Servlets e MySQL
Java
1
star
96

SimuladorJogoDaVida

Atividade para a disciplina de Programação Orientada a Objetos - PPGI - UTFPR-CP
Java
1
star
97

react-native-modules-test

Hello World for native modules in React Native projects.
Objective-C
1
star
98

qualidade-2017-2-bowling-game-kata

Java
1
star
99

MultiOSEngineTest

Project to test the Intel Multi OS Engine
Java
1
star
100

SparkJavaTest

Project to test Spark Java Framework
Java
1
star