All Projects → jesualex → sTooltip

jesualex / sTooltip

Licence: Apache-2.0 license
A simple Tooltip Library

Programming Languages

kotlin
9241 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to sTooltip

andColorPicker
Color picker library for Android
Stars: ✭ 233 (+429.55%)
Mutual labels:  android-ui
github-commit-browser
A blog companion sample project that demonstrates saving UI state after process death on Android utilizing the community established 3rd party libraries
Stars: ✭ 55 (+25%)
Mutual labels:  android-ui
XCArcProgressView
Android开口圆环比例进度View(高仿猎豹清理大师内存占用比例View)
Stars: ✭ 28 (-36.36%)
Mutual labels:  android-ui
bottomsheets
Material Bottom Sheets library for Android
Stars: ✭ 76 (+72.73%)
Mutual labels:  android-ui
VideoPreLoading
Demo for video PreLoading/ PreCaching using ExoPlayer 2.13.3 in Android.
Stars: ✭ 61 (+38.64%)
Mutual labels:  android-ui
info-bar-compose
An Android Jetpack Compose library for displaying on-screen messages. (simplified Snackbar alternative)
Stars: ✭ 80 (+81.82%)
Mutual labels:  android-ui
random-users-details
Random Users details in flutter from randomusers api
Stars: ✭ 14 (-68.18%)
Mutual labels:  android-ui
Circular-Progress-View
A customisable circular progress view for android.
Stars: ✭ 39 (-11.36%)
Mutual labels:  android-ui
XCPullToLoadMoreListView
XCPullToLoadMoreListView-下拉加载更多ListView控件(仿QQ、微信聊天对话列表控件)
Stars: ✭ 24 (-45.45%)
Mutual labels:  android-ui
VectorIntegerView
Animated integer on Android. https://habr.com/post/420919/
Stars: ✭ 17 (-61.36%)
Mutual labels:  android-ui
PageStepIndicator
Step indicator with titles/labels and tons of customizations.
Stars: ✭ 27 (-38.64%)
Mutual labels:  android-ui
SnappCompose
A clone of Snapp using Jetpack Compose. Showcasing various usages of Google Maps Animations etc combined with Compose
Stars: ✭ 59 (+34.09%)
Mutual labels:  android-ui
CustomToastLibrary
Android Custom Toast
Stars: ✭ 26 (-40.91%)
Mutual labels:  android-ui
QuestionnaireView
A simple view to be able to display question and various field (Radio, EditText, checkbox ) for answers
Stars: ✭ 34 (-22.73%)
Mutual labels:  android-ui
RotateLabelView
This is library to help you to add a sticky rotation label into your view.
Stars: ✭ 35 (-20.45%)
Mutual labels:  android-ui
TypedTextView
Custom implementation of Android's TextView simulating a keyboard/type-writer.
Stars: ✭ 57 (+29.55%)
Mutual labels:  android-ui
AndroidTabsExample
An Example Android Application with Tabs
Stars: ✭ 17 (-61.36%)
Mutual labels:  android-ui
ToolTipPopupWordTV
ToolTipopupWordTV is an Open Source Android library that allows developers to easily open a popup with details by select a word from a textview.
Stars: ✭ 41 (-6.82%)
Mutual labels:  tooltip-library
LoginDemo
No description or website provided.
Stars: ✭ 73 (+65.91%)
Mutual labels:  android-ui
FabDialog
🎈 Fab into Dialog Animation on Android
Stars: ✭ 36 (-18.18%)
Mutual labels:  android-ui

sTooltip

sTooltip is a simple Tooltip flexible and self-adjusting kotlin Library for Android.

Jitpack

Examples:

Easy Use:

            Tooltip.on(exampleTextView)
                .text(R.string.example)
                .icon(android.R.drawable.ic_dialog_info)
                .iconSize(30, 30)
                .color(resources.getColor(R.color.colorPrimary))
                .border(Color.BLACK, 1f)
                .clickToHide(true)
                .corner(5)
                .position(Position.TOP)
                .show(3000)

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

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

Step 2. Add the dependency

dependencies {
	implementation 'com.github.luisvasquez:sTooltip:Tag'
}

Options

Initialization of Builder

For your convenience, you can initialize the constructor only using the view to which you want the tooltip to refer, in that case the tooltip will be attached to the decorView(OVER ALL VIEWS), you can also optionally define with a bool if you want to close the tooltip as soon as the referenced view has been detached, by default it comes true.

Tooltip.on(View)
Tooltip.on(View, Bool)

Builder options

Once the builder has been initialized, you can configure your tooltip, below you can briefly see the different methods you can use for that config

  • To set text
    builder.text(text)

  • To set text color
    builder.textColor(colorInt)

  • To set text typeface
    builder.textTypeFace(typeface)

  • To set text size
    builder.textSize(textSize)
    builder.textSize(unit, textSize)

  • To set text gravity
    builder.textGravity(TextViewGravity)

  • To set text lineHeight builder.lineHeight(lineSpacingExtra, lineSpacingMultiplier)

  • To enable a start icon(by default disabled)
    builder.iconStart(icon)

  • To set the start icon margin in px
    builder.iconStartMargin(left, top, right, bottom)

  • To set the start icon size in px
    builder.iconStartSize(h, w)

  • To enable a end icon(by default disabled)
    builder.iconEnd(icon)

  • To set the end icon margin in px
    builder.iconEndMargin(left, top, right, bottom)

  • To set the end icon size in px
    builder.iconEndSize(h, w)

  • To set a top drawable
    builder.drawableTop(drawable)

  • To set a bottom drawable
    builder.drawableBottom(drawable)

  • To set the tooltip bubble color
    builder.color(color)

  • To set the tooltip content padding in px
    builder.padding(top, right, bottom, left)

  • To set the position of the tooltip in relation to the view to which it points(by deafult Bottom)
    builder.position(position)

  • To set the corner radius in px of the tooltip bubble
    builder.corner(radius)

  • To enable autohide on tap(by default is enabled)
    builder.clickToHide(bool)

  • To set the distance in px between the tooltip and the view to which it points
    builder.distanceWithView(distance)

  • To set the the border color and width in px
    builder.border(color, width)

  • To set the the border margin in px
    builder.border(margin)

  • To enable and set a bubble shadow(by default bubble shadow radius is 0, it means shadow disabled)
    builder.shadow(radius)
    builder.shadow(radius, color)

  • To set shadow padding
    builder.shadow(padding)

  • To set the arrow size
    builder.arrowSize(h, w)

  • To set a tooltip minWidth in px if the space in parent isn't enough the tooltip will be relocated to the opposite position
    builder.minWidth(w)

  • To set a tooltip minHeight in px if the space in parent isn't enough the tooltip will be relocated to the opposite position
    builder.minHeight(w)

  • To set a tooltip show/hide animation
    builder.animation(anim)
    builder.animation(animIn, animOut)

  • To set a lifecycle listener to know when the tooltip has showed or hidden
    builder.displayListener(listener)

  • To set a click listener to catch when the user click the tooltip
    builder.tooltipClickListener(listener)

  • To set a click listener to catch when the user click the view to which the tooltip points
    builder.refViewClickListener(listener)

  • To enable overlay function and set a listener to catch when the user click the overlay(by default the overlay click has disabled, it means that if the user clicks in the overlay, that click will be send to the view under the overlay)
    builder.overlay(color)
    builder.overlay(color, listener)

Show options

After configure your tooltip just left show it, if you want set a duration in millis and the tooltip will be autohide after that time(by default autohide is disabled)

builder.show()
builder.show(duration)

This show method return a Tooltip instance, with which you can close, and show it again. If you call show before close, the tooltip will make a closeNow() and it will be shown again.

  • To close the tooltip with animation
    tooltip.close()

  • To close the tooltip without animation
    tooltip.closeNow()

  • To show the tooltip again
    tooltip.show()
    tooltip.show(duration)
    tooltip.show(text)
    tooltip.show(duration, text)

  • To know if tooltip if currently shown
    tooltip.isShown(): Boolean

Example

To get a small example, please download this repo and execute it

Thanks to:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].