Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3401] hello

GitHub Issuen/a
TypeStory
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2016-03-22T19:26:18.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterSharif AbuDarda
AssigneeShak Hossain
Created2016-03-22T19:25:28.000+0000
Updated2016-03-22T19:26:18.000+0000

Description

var filename = 'someImage.jpg'; var file = Titanium.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, filename); var window = Ti.UI.createWindow({ backgroundColor: 'white' }); var imageView = Ti.UI.createImageView({ top: 0, width: '100%', image: file.nativePath }); var shareButton = Ti.UI.createView({ height: 100, width: 200, backgroundColor: 'purple', bottom: 0, }); window.add(imageView); window.add(shareButton); shareButton.addEventListener('click', function() { alert('shareClick'); var shareIntent = Ti.Android.createIntent({ action: Ti.Android.ACTION_SEND, type: "image/jpeg" }); shareIntent.putExtra(Ti.Android.EXTRA_TITLE, 'title'); shareIntent.putExtra(Ti.Android.EXTRA_TEXT, 'text'); shareIntent.putExtraUri(Ti.Android.EXTRA_STREAM, file.nativePath); Ti.Android.currentActivity.startActivity(Ti.Android.createIntentChooser(shareIntent, 'share')); }); window.open();

Comments

No comments

JSON Source