[AC-2096] Android camera preview not full screen width when using overlay
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2013-08-06T21:26:14.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android, camera |
Reporter | Alex Bernier |
Assignee | Shak Hossain |
Created | 2013-08-06T01:29:24.000+0000 |
Updated | 2016-03-08T07:41:04.000+0000 |
Description
*Problem*
When using an overlay with showCamera, the preview (where you see what the camera sees) doesn't stretch to the whole width of the screen. There is a ~5-10dp black bar on the left and right side of the preview screen.
The overlay view, however, does takes up the entire width of the screen.
*Test case*
Notice the red bar will be the entire width of the screen and the preview will stop short on the left and right.
var win = Ti.UI.createWindow({
backgroundColor : "#FFF"
});
var overlay = Ti.UI.createView({
backgroundColor : "transparent",
height : Ti.UI.FILL,
width : Ti.UI.FILL
});
overlay.add(Ti.UI.createView({
backgroundColor : "red",
height : 20,
width : Ti.UI.FILL
}));
win.addEventListener('click', function() {
Titanium.Media.showCamera({
overlay : overlay,
saveToPhotoGallery : false,
allowEditing : false,
mediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO],
showControls : false,
autohide : false
});
});
win.open();
Closing as duplicate of TIMOB-14764.