[TIMOB-11222] Android: Aliasing occurs on a view if border width is set to anything less than the entire height or width
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-03-14T22:38:59.000+0000 |
| Affected Version/s | Release 2.1.3 |
| Fix Version/s | Release 3.1.0, 2013 Sprint 05 API, 2013 Sprint 05 |
| Components | Android |
| Labels | SupportTeam, api, module_views, qe-testadded |
| Reporter | Varun Joshi |
| Assignee | Vishal Duggal |
| Created | 2012-10-01T21:26:08.000+0000 |
| Updated | 2013-10-03T07:01:09.000+0000 |
Description
Attachments
| File | Date | Size |
|---|---|---|
| Screen Shot 2012-10-01 at 1.53.46 PM.png | 2012-10-01T21:26:08.000+0000 | 24659 |
This should be resolved as a part of TIMOB-11800
Additional test case
var win1 = Ti.UI.createWindow({ backgroundColor : 'white' }); var container1 = Ti.UI.createView({ backgroundImage:'KS_nav_ui.png', backgroundRepeat:true, }); win1.add(container1); //Border + Background var loadingIndicatorView1 = Ti.UI.createView({ backgroundColor : 'black', borderColor : 'black', borderWidth : 20, opacity : .5, top : 5, left:5, width : '40%', height : '30%', }); var smallView1 = Ti.UI.createView({ width : 50, height : 50, backgroundColor : 'red' }); loadingIndicatorView1.add(smallView1); container1.add(loadingIndicatorView1); //Background Only var loadingIndicatorView2 = Ti.UI.createView({ backgroundColor : 'black', opacity : .5, top : 5, right:5, width : '40%', height : '30%', }); var smallView2 = Ti.UI.createView({ width : 50, height : 50, backgroundColor : 'red' }); loadingIndicatorView2.add(smallView2); container1.add(loadingIndicatorView2); //Border Only var loadingIndicatorView3 = Ti.UI.createView({ borderColor : 'black', borderWidth : 20, opacity : .5, top : '35%', left:5, width : '40%', height : '30%', }); var smallView3 = Ti.UI.createView({ width : 50, height : 50, backgroundColor : 'red' }); loadingIndicatorView3.add(smallView3); container1.add(loadingIndicatorView3); //No Border No Background var loadingIndicatorView4 = Ti.UI.createView({ opacity : .5, top : '35%', right:5, width : '40%', height : '30%', }); var smallView4 = Ti.UI.createView({ width : 50, height : 50, backgroundColor : 'red' }); loadingIndicatorView4.add(smallView4); container1.add(loadingIndicatorView4); var slider1 = Ti.UI.createSlider({ min:0, max:1.0, value:0.5, width:'50%', top:'70%' }) container1.add(slider1); slider1.addEventListener('change',function(e){ var opacity = e.value; loadingIndicatorView1.opacity = opacity; loadingIndicatorView2.opacity = opacity; loadingIndicatorView3.opacity = opacity; loadingIndicatorView4.opacity = opacity; }) var win2 = Ti.UI.createWindow({ backgroundColor:'white' }) var container2 = Ti.UI.createView({ backgroundImage:'KS_nav_views.png', backgroundRepeat:true, }); win2.add(container2); var imageview = Ti.UI.createImageView({ width:'40%', height:'30%', top:5, opacity:0.5, backgroundColor:'red', image: "http://www.catravelservices.com/management/hotels/pictures/Mawamba_lodge_nature.jpg" }) container2.add(imageview); var button = Ti.UI.createButton({ width:'40%', height:'20%', top:'35%', opacity:0.5, backgroundColor:'red', title:'I am Button' }) container2.add(button); var label = Ti.UI.createLabel({ width:'40%', height:'20%', top:'60%', opacity:0.5, backgroundColor:'red', color:'black', font:{fontSize:'20dp', fontWeight:'bold'}, text:'I am a label' }) container2.add(label); var slider2 = Ti.UI.createSlider({ min:0, max:1.0, value:0.5, width:'50%', top:'85%' }) container2.add(slider2); slider2.addEventListener('change',function(e){ var opacity = e.value; imageview.opacity = opacity; button.opacity = opacity; label.opacity = opacity; }) var tab1 = Ti.UI.createTab({ title:'VIEWS', window:win1 }) var tab2 = Ti.UI.createTab({ title:'WIDGETS', window:win2 }) var tabGroup = Ti.UI.createTabGroup() tabGroup.addTab(tab1); tabGroup.addTab(tab2); tabGroup.open();Pull pending https://github.com/appcelerator/titanium_mobile/pull/3948
Note to QE: Make sure you run this with both hardware acceleration on and off Also make sure you test this on devices with API LEVEL on both side of honeycomb (11) My test devices were S2 (2.3.6), XT890(4.0.4), S3(4.1.1)
Views are rendering without aliasing.Tested it with both hardware acceleration ON/OFF. Used environment for verification: SDK - 3.1.0.GA Appcelerator Studio : 3.1.1.201305072102 Devices : Samsung Galaxy Nexus Android 4.0.2 and Samsung GALAXY Note Android 2.3.6