Comments (4)
Are you using the same instance of the loader, or allocating a new instance?
Single instance:
var Loader = Alloy.createWidget();
Loader.show();
// ...
Loader.show()
Multiple instance:
Alloy.createWidget().show();
// ...
Alloy.createWidget().show();
from ti.notifications.
So if the user gets 20 push notifications, I need the banner to show 20 times.
Will doing it this way cause performance issues? Multiple objects being created at once?
from ti.notifications.
Hi,
I have tried this:
Alloy.createWidget('com.caffeinalab.titanium.notifications').show({
message : 'Notification Test',
icon : '/appicon.png',
pushForce : 10,
//style : 'info', // sets the message background to blue (50% opacity)
duration : 2500,
onClick : function() {
alert("OH, you clicked me!\nDo you think I'm weird?");
}
});
Alloy.createWidget('com.caffeinalab.titanium.notifications').show({
message : 'Notification Test 2',
icon : '/appicon.png',
pushForce : 10,
//style : 'info', // sets the message background to blue (50% opacity)
duration : 2500,
onClick : function() {
alert("OH, you clicked me!\nDo you think I'm weird?");
}
// Show the widget, and override defaults
});
It only shows the last widget I have created, as opposed to sequentially.
from ti.notifications.
Because the're running in the same thread.
setInterval
do the trick.
http://drop.caffeina.co/001k3B3l0o2j
from ti.notifications.
Related Issues (15)
- If I call the widget inside a commonjs without view how can I change the backgroundColor? HOT 4
- On Android Working as a toast only ! HOT 18
- Can we have example for Ti Classic HOT 3
- Which license is this? HOT 1
- iOS9 reference to app icon broken HOT 1
- Hide HOT 1
- Notifier.show looses focus on Textfield in window HOT 4
- Change position of notifications
- Example like CWStatusBarNotification
- Show over modal window?
- Adding Close Event. HOT 1
- Support for x86_64
- Click events on modal windows don't work? HOT 1
- Style rules not being overwritten HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ti.notifications.