[TIMOB-11020] Android: In 2.1.3 RC if borderWidth is used, show/hide on the border does not work and all views added on top will be hidden behind the border
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-20T17:09:05.000+0000 |
Affected Version/s | Release 2.1.3 |
Fix Version/s | Release 2.1.3, Release 3.0.0, Sprint 2012-19 Core, 2012 Sprint 19 |
Components | Android |
Labels | SupportTeam, core, qe-testadded |
Reporter | Varun Joshi |
Assignee | Allen Yeung |
Created | 2012-09-20T09:30:49.000+0000 |
Updated | 2013-10-07T10:44:45.000+0000 |
Description
Issue
In 2.1.3.v201209151203192.1.3 RC, on Android:
1. If borderWidth is used the border cannot be hidden using the show()/hide() view functions.
2. Also, any view placed on top of the view that has borderWidth set will be hidden from the view.
Steps to Reproduce
1. Run the code below in 2.1.2GA, notice the red dot in the center of the circle. Tap the hello button to see the View appear and disappear. 2. Using 2.1.3.v20120915120319, notice that there is no red circle, and tapping the button does nothing.
{noformat}
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
win.open();
var self = Ti.UI.createView();
win.add(self);
var loadingIndicatorView = Ti.UI.createView({
backgroundColor : 'black',
borderColor : 'black',
borderWidth : 52,
opacity : .6,
top : 5,
width : 52,
height : 52,
borderRadius : 52,
zIndex : 1,
});
var smallView = Ti.UI.createView({
width : 10,
height : 10,
backgroundColor : 'red'
});
loadingIndicatorView.add(smallView);
self.add(loadingIndicatorView);
loadingIndicatorView.show();
var button = Ti.UI.createButton({
title : 'Hello',
width : 200,
height : 100,
top : 250
});
var show = false;
self.add(button);
button.addEventListener('click', function(e) {
if (show) {
loadingIndicatorView.show();
show = false;
} else {
show = true
loadingIndicatorView.hide();
}
});
{noformat}
*NOTE: The above code works fine on iOS on 2.1.3 RC build.
Attachments
I want to confirm this bug, which is critical since it may silently destroy any existent UI using border properties. It works fine using 2.1.3.v20120907163110, fails in the reported version.
PR: https://github.com/appcelerator/titanium_mobile/pull/3013 Please test with modified case:
Backport PR: https://github.com/appcelerator/titanium_mobile/pull/3014
Tested on: osx Mountain Lion 10.8.1 Titanium Studio, build: 2.1.2.201208301612 It is fixed for: Titanium SDK: 3.0.0.v20120921144915 Device: Nexus S3 4.0.4 Note: Issue still occurs on Titanium SDK: 2.1.3.v20120920154617
closing as fixed. Tested with: osx Mountain Lion 10.8.1 Titanium Studio, build: 2.1.2.201208301612 Titanium SDK: 2.1.3.v20120921190208 Titanium SDK: 3.0.0.v20120921144915 Device: Nexus S3 4.0.4