Skip to content

Use the native AMPopTip (iOS) and ViewTooltip (Android) library to display tooltips above any view and window in Titanium!

License

Notifications You must be signed in to change notification settings

hansemannn/titanium-tooltip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tooltips in Titanium

Use the native AMPopTip (iOS) and ViewTooltip (Android) library to display tooltips above any view and window in Titanium!

Requirements

  • Titanium SDK 9.2.0+
  • Android: Add the following to your [app]/platform/android/build.gradle:
allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}

APIs

Methods

  • show(params) - Shows a new tooltip. See the example below for all options!
  • hideActiveTooltip - Hide an active tooltip in the current window.

Constants

The following constants are used for the direction property:

  • TOOLTIP_DIRECTION_UP
  • TOOLTIP_DIRECTION_DOWN
  • TOOLTIP_DIRECTION_LEFT
  • TOOLTIP_DIRECTION_RIGHT

Example

import Tooltips from 'ti.tooltip';

const params = {
    container: $.win,
    sourceView: $.view,
    direction: Tooltips.TOOLTIP_DIRECTION_UP,
    title: 'Hello world',
    backgroundColor: '#ffffff',
    textColor: '#000000',
    borderRadius: 15,
    borderColor: '#ff0000',
    borderWidth: 2,
    padding: 10,
    arrowMargin: 0,
    arrowWidth: 20,
    arrowHeight: 24,
    onClick: () => {
        alert('Tooltip tapped!');
    }
};

Tooltips.show(params);

Authors

  • Prashant Saini (Android)
  • Hans Knöchel (iOS)

License

MIT

About

Use the native AMPopTip (iOS) and ViewTooltip (Android) library to display tooltips above any view and window in Titanium!

Topics

Resources

License

Stars

Watchers

Forks