Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13602] Android: nine-patch image is not displayed properly

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-05-22T22:26:10.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 08 API, 2013 Sprint 08, Release 3.1.1, Release 3.2.0
ComponentsAndroid
Labelsregression
ReporterSungil Kim
AssigneePing Wang
Created2013-04-17T13:48:59.000+0000
Updated2013-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

FileDateSize
05_21_13_max.png2013-05-21T23:30:50.000+000029843
05_21_13.png2013-05-21T23:30:50.000+000031353
bt_start.9.png2013-04-17T13:48:59.000+00001700
fixed.png2013-05-21T23:30:50.000+000027525
scr.jpg2013-04-17T13:48:59.000+0000157762

Comments

  1. Davide Cassenti 2013-04-17

    Wrong behavior can be seen in Kitchen Sink by going to: Controls | Slider | Min/Max Range
  2. Ping Wang 2013-04-17

    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. Ping Wang 2013-04-22

    3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4197
  4. Eric Merriman 2013-04-26

    This looks fixed on device, but in the 2.2 emulator I still see the issue. Will continue to investigate
  5. Anshu Mittal 2013-05-03

    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
  6. Olga Romero 2013-05-03

    @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
  7. Ping Wang 2013-05-04

  8. Eric Merriman 2013-05-06

    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.
  9. Ping Wang 2013-05-06

    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.
  10. Olga Romero 2013-05-21

    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)
  11. Olga Romero 2013-05-21

    Reopening, I can confirm fix in SDK, build: 3.1.1.v20130502180055
  12. Olga Romero 2013-05-22

    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.

JSON Source