Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24496] iOS: Camera overlay does not fill the entire screen when orientation is changed on iPad, Titanium SDK 6.0.0 and later

GitHub Issuen/a
TypeBug
PriorityCritical
StatusResolved
ResolutionFixed
Resolution Date2017-03-30T17:41:44.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterKevin Southworth
AssigneeVijay Singh
Created2017-03-16T23:04:26.000+0000
Updated2017-05-15T15:24:11.000+0000

Description

I'm having the exact same problem / issue as someone else described here: http://stackoverflow.com/questions/42807874/camera-overlay-does-not-fill-the-entire-screen-when-orientation-is-changed-on-ip My custom camera overlay is being "chopped off" when rotating from Portrait to Landscape mode.
var overlay = Ti.UI.createView({
        width : Ti.UI.FILL,
        height : Ti.UI.FILL,
    });

    var buttonHolder = Ti.UI.createView({
        width : Ti.UI.FILL,
        height : 70,
        backgroundColor : 'black',
        opacity : 0.5,
        bottom : 0
    });

    var bCancel = Ti.UI.createButton({
        width : 70,
        height : Ti.UI.FILL,
        color : 'white',
        title : "Cancel",
        textAlign : 'left',
        backgroundColor : undefined,
        left : 0
    });

    var bTakePicture = Ti.UI.createImageView({
        width : Ti.UI.SIZE,
        height : Ti.UI.SIZE,
        image : 'image.png',
    });

    var bDone = Ti.UI.createButton({
        width : 70,
        height : Ti.UI.FILL,
        color : 'white',
        title : "Done",
        textAlign : 'left',
        right : 0,
        backgroundColor : undefined
    });

    buttonHolder.add(bCancel);
    buttonHolder.add(bTakePicture);
    buttonHolder.add(bDone);

    overlay.add(buttonHolder);

    Titanium.Media.showCamera({
        overlay : overlay,
        showControls : false,

        success : function(event) {
        },
        cancel : function() {
        },
        error : function(error) {
        },
        allowImageEditing : false,
        saveToPhotoGallery : false
    });

Comments

  1. Vijay Singh 2017-03-29

    This issue is caused due to one additional line, while making changes for TIMOB-23936 . [~hansknoechel] Is that line really needed ? PR: https://github.com/appcelerator/titanium_mobile/pull/8915
  2. Kevin Southworth 2017-05-15

    has this fix been incorporated into a Ti SDK release yet? I'm still having this issue with Ti SDK 6.0.4.GA

JSON Source