[TIMOB-12760] iOS: Media - Default Camera button is moving down the screen
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2017-08-18T21:56:06.000+0000 |
Affected Version/s | Release 3.0.2 |
Fix Version/s | n/a |
Components | iOS |
Labels | camera, media, qe-sdk3.0.2 |
Reporter | Olga Romero |
Assignee | Eric Merriman |
Created | 2013-02-15T21:23:14.000+0000 |
Updated | 2017-08-18T21:56:06.000+0000 |
Description
While testing Media Module I noticed "Default Camera" button being moved down the screen. It is not regression, occurs in 3.0.0.GA.
Test steps:
Run test code
// create window with vertical layout
var win = Ti.UI.createWindow({backgroundColor:'white', layout:'vertical'});
// create button, register the modified click callback, add button to window
function addButton(title, clickCallback)
{
var button = Ti.UI.createButton({title:title, width:'300', height:'50'});
button.addEventListener('click', function() {
Ti.Media.showCamera({mediaType:Ti.Media.MEDIA_TYPE_PHOTO});
clickCallback();
Ti.Media.vibrate();
});
win.add(button);
}
// camera with no switch
addButton('Default Camera', function(){
});
// camera with front specified
addButton('Front Camera Test 1', function(){
Ti.Media.switchCamera(Ti.Media.CAMERA_FRONT);
});
// camera with front specified after switching to back
// checks if switch function actually works, opposed to it being the default
addButton('Front Camera Test 2', function(){
Ti.Media.switchCamera(Ti.Media.CAMERA_REAR);
Ti.Media.switchCamera(Ti.Media.CAMERA_FRONT);
});
// camera with back specified
addButton('Back Camera Test 1', function(){
Ti.Media.switchCamera(Ti.Media.CAMERA_REAR);
});
// camera with back specified after switching to front
// checks if switch function actually works, opposed to it being the default
addButton('Back Camera Test 2', function(){
Ti.Media.switchCamera(Ti.Media.CAMERA_FRONT);
Ti.Media.switchCamera(Ti.Media.CAMERA_REAR);
});
// camera passed invalid (non-existent) argument
addButton('Invalid Camera', function(){
Ti.Media.switchCamera(undefined);
});
// open window
win.open();
2. Press "Default Camera"
3. Press Cancel and observe the button on the bottom of the screen
Note:
Adding 'top : 5 to the properties
var button = Ti.UI.createButton({title:title, width:'300', height:'50'});
will fix this issue.
Attachments
File | Date | Size |
---|---|---|
defaultcamerabutton.png | 2013-02-15T21:23:14.000+0000 | 39526 |
I am unable to reproduce this issue with the following environment; iPhone 6 (10.2) Studio 4.9.1.201707200100 Ti SDK 6.1.2 GA Appc CLI 6.2.3 Ti CLI 5.0.14 Alloy 1.9.13 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131