[TIMOB-13602] Android: nine-patch image is not displayed properly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-05-22T22:26:10.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2013 Sprint 08 API, 2013 Sprint 08, Release 3.1.1, Release 3.2.0 |
Components | Android |
Labels | regression |
Reporter | Sungil Kim |
Assignee | Ping Wang |
Created | 2013-04-17T13:48:59.000+0000 |
Updated | 2013-05-22T22:26:10.000+0000 |
Description
9-patch image working on SDK 3.0.2.GA is not working on 3.1.0.GA.
I can't find any problem with the image file.
The code I used:
var win = Ti.UI.createWindow({
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false,
title: 'Click button to test'
});
var button = Ti.UI.createButton({
backgroundImage: '/images/bt_start.png',
backgroundSelectedImage:'/images/bt_start_sel.png',
title: 'Click me!',
top: 10,
width: 300,
height: 200
});
button.addEventListener('click',function(e){
Ti.API.info("You clicked the button");
});
win.add(button);
win.open();
'bt_start.9.png' is attached.
Running that will show a result like 'scr.jpg'
When I changed the SDK to 3.0.2, it worked again.
Thank you.
Attachments
File | Date | Size |
---|---|---|
05_21_13_max.png | 2013-05-21T23:30:50.000+0000 | 29843 |
05_21_13.png | 2013-05-21T23:30:50.000+0000 | 31353 |
bt_start.9.png | 2013-04-17T13:48:59.000+0000 | 1700 |
fixed.png | 2013-05-21T23:30:50.000+0000 | 27525 |
scr.jpg | 2013-04-17T13:48:59.000+0000 | 157762 |
Wrong behavior can be seen in Kitchen Sink by going to: Controls | Slider | Min/Max Range
PR: https://github.com/appcelerator/titanium_mobile/pull/4179 For FR: 1. Run the above test case. The button image should show correctly (without the extra black lines in the border). 2. Run KS->Controls->Slider->Min/Max Range. The slider should show correctly. 3. Run the two test cases in TIMOB-12961.
3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4197
This looks fixed on device, but in the 2.2 emulator I still see the issue. Will continue to investigate
Tested with: SDK:3.1.1.v20130502180055 Appcelerator Studio: 3.1.1.201305020729 OS: OSX 10.7.5 Device: HTC desire(4.0.4), android emulator(2.2) Xcode: 4.6
@Eric's comment: the issue still present in 2.2/4.2/3.2/4.0 emulator. Looks fixed on devices: Galaxy Nexus 4.1.1 Galaxy S3 4.0.4 Galaxy S4 4.2.2 Nexus7 4.2.1 SDK, build: 3.1.1.v20130502180055 Appcelerator Studio, build: 3.1.1.201305022120
For clarity, the attached code and image are working as expected on device and emulator. The KitchenSink example with a slider is not working as expected on any emulator we tried with a "google APIs" prefix.
The nine-patch image in the test KS->Controls->Slider->Min/Max Range does not work correctly is because "fastdev" is enabled by default on emulator. It is not a regression. Already filed a ticket TIMOB-13769 for the fastdev issue.
Appcelerator Studio, build: 3.1.1.201305181057 SDK, billd: 3.1.1.v20130520171545 Device: *Nexus 7* Android version: 4.2.1 I ran in to this issue again on device. Please, see screenshots (05/21/13)
Reopening, I can confirm fix in SDK, build: 3.1.1.v20130502180055
Tested with: Appcelerator Studio, build: 3.1.1.201305212055 SDk, build: 3.1.1.v20130522125041 Device: Nexus 7(4.2) Cannot reproduce. Please reopen if occurs again.