Skip to content
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

[TIMOB-19769] Android: Fix for fullscreen behavior in Camera #7664

Merged
merged 1 commit into from Feb 2, 2016

Conversation

ashcoding
Copy link
Contributor

Jira: https://jira.appcelerator.org/browse/TIMOB-19769
PR #7552 caused an edge case issue for Camera.

Code to test:-

var self = Ti.UI.createWindow();
    var cameraOverlay = Titanium.UI.createView({
        backgroundColor: '#FF00FFAA'
    });

    var cameraOverlayButton = Titanium.UI.createImageView({
        bottom: 100,
        image: '/appcelerator_small.png',
    });
    cameraOverlay.add(cameraOverlayButton);

    cameraOverlay.addEventListener('click', function(e){
        Ti.API.info("taking pic");
        Ti.Media.takePicture();
    });

    self.addEventListener("postlayout", postlayoutHandler);
    function postlayoutHandler(e) {
        self.removeEventListener("postlayout", postlayoutHandler);
        Titanium.Media.showCamera({
            overlay: cameraOverlay,
            showControls: false,
            success: function(e) {
                  Ti.API.info('# SUCCESS : '+ JSON.stringify(e));
            },
            cancel: function(e) {
                  Ti.API.info('# CANCEL : '+e.error);

            },
            error: function(e) {
                  Ti.API.info('# ERROR : '+ e.code +' : '+ e.error);

            },
            mediaTypes:Ti.Media.MEDIA_TYPE_PHOTO,
        });
    }
    self.open();

@ashcoding
Copy link
Contributor Author

This is the Master PR.

sriks added a commit that referenced this pull request Feb 2, 2016
[TIMOB-19769] Android: Fix for fullscreen behavior in Camera
@sriks sriks merged commit 9777bca into tidev:master Feb 2, 2016
@sriks
Copy link
Contributor

sriks commented Feb 2, 2016

Reviewed and merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants