[TIMOB-9783] Android:View:Pinching in of the view leaves black background behind,which disappears on device rotation
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 2.1.0, Release 3.1.0 |
Fix Version/s | n/a |
Components | Android |
Labels | api, qe-and060112, qe-nfc |
Reporter | Shyam Bhadauria |
Assignee | Unknown |
Created | 2012-06-25T04:14:41.000+0000 |
Updated | 2018-02-28T20:04:13.000+0000 |
Description
Feature not supported in 2.0.2.
It works as expected on Android 2.2
Steps to reproduce:
1) Use the code below
var win = Titanium.UI.createWindow();
win.backgroundColor = '#fff';
var view = Ti.UI.createView({
height: 250,
width: 250,
backgroundColor: '#a00'
});
view.addEventListener('pinch', function(e) {
view.height = baseHeight * e.scale;
view.width = baseWidth * e.scale;
});
view.addEventListener('touchstart', function(e) {
baseHeight = view.height;
baseWidth = view.width;
});
win.add(view);
win.open();
2) Run the app
3) Pinch to zoom in the displayed red view.
4) Pinch to zoom out the red view.
Expected result:
3) After step 3, the view should get bigger in size.
4) After step 4, the view should get smaller,background should be white window.
Actual result:
3) After step 3, the view gets bigger in size.
4) After step 4, the view gets smaller,leaving behind a black background.
If the device is rotated to a different orientation, the black background disappears.
Issue reproduces with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Device: Samsung galaxy s duos Android version: 4.0.4