A notification banner for Titanium that uses full native API's to modally present messages.
Since the iOS module 5.0.0, this library uses the Swift-based AlertKit
library.
- Titanium 12.7.0+
Add the following to the app build.gradle file of your app project:
repositories {
maven { url "https://jitpack.io" }
}
import NotificationBanner from 'ti.notificationbanner';
NotificationBanner.show({
title: 'Titanium rocks!',
subtitle: 'It seriously does',
type: 'success', // iOS-only
duration: 2, // Android-only
backgroundColor: 'green', // Android-only
});
show(options)
title
(Required)subtitle
(Optional)
backgroundColor
(Optional)duration
(Optional)elevation
(Optional)onClick
: callback function for banner click (Optional)
type
(Optional, one ofinfo
,warning
,error
andsuccess
)image
(Optional, set the icon of the banner)
MIT
Hans Knöchel, Lambus GmbH