New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Menu Button / iOS Overlay Layout #64
Comments
Could you please provide some test code for both problems. Would make it quicker to test it |
|
I don't have a menu button so I only can test it via |
Understood. Maybe not a huge issue since most devices no longer have a dedicated menu button.
|
@kenrucker just had to implement Ti.Barcode with an overlay on iOS (iPhone) and it is not visible as you already mentioned. var Barcode = require('ti.barcode');
Barcode.allowMenu = false;
Barcode.allowInstructions = false;
Barcode.displayedMessage = ' ';
Barcode.allowRotation = true;
var overlay = Ti.UI.createView({
backgroundColor: 'transparent',
top: 0,
right: 0,
bottom: 0,
left: 0,
width: Ti.UI.FILL,
height: Ti.UI.FILL,
});
var lbl = Ti.UI.createLabel({
bottom: 10,
left: 10,
right: 10,
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,
text: "text",
color: "#fff",
backgroundColor: "transparent",
touchEnabled: false
});
overlay.add(lbl);
var cancelButton = Ti.UI.createButton({
title: 'X',
top: 0,
right: 0,
width: 30,
right: 30,
backgroundColor: "transparent",
color: "#fff"
});
cancelButton.addEventListener('click', function() {
Barcode.cancel();
});
overlay.add(cancelButton);
Barcode.capture({
animate: true,
overlay: overlay,
showCancel: false,
showRectangle: true,
keepOpen: false,
});
Barcode.addEventListener('success', function(e) {
Ti.API.info('Success called with barcode: ' + e.result + " " + e.format);
}); working fine on Android. Filed a bug ticket: https://jira.appcelerator.org/browse/AC-5654 |
Fixed in recent versions of the module. Closing. |
When pressing the Android menu button on an Android device, the host app crashes. allowMenu seems to have no effect.
In iOS, the overlay view, no matter what you do, is not able to be formatted for width and other view layout properties. No matter what you do, the view (via createView) always aligns upper left and it is impossible to have it's width or height fill the parent window. Everything in this regard works as expected in Android.
The text was updated successfully, but these errors were encountered: