Skip to content

AppWerft/Ti.FloatingWidget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ti.FloatingWidget

This Axway Tiranium module realize the Android version of Floating Widget.

Permission

If you want to draw a Floating Widget in your application then your application mus have the SYSTEM_ALERT_WINDOW permission. Now you already know it that after Android Marshmallow we need to ask permissions at run time.

Usage

const FW = require('ti.floatingwidget');
var fwview;
const content = Ti.UI.createView({
		width : 100,
		height : 100,
		backgroundColor : 'orange'
});
content.add(Ti.UI.createLabel({
	text : "Title",
	top:0,
	height:20,
	width:Ti.UI.FILL,
	backgroundColor:'yellow'
}));

if (FW.canDrawOverlays())
	fwView = FW.createWidget(content);
else FW.requestPermission();

// ...
fwView.destroy();

Alternativally you can listen to "result":

FW.addEventListener("result",onResultFn);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published