{ "id": "61210", "key": "TIMOB-578", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11224", "name": "Release 1.4.0", "archived": true, "released": true, "releaseDate": "2010-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:53:34.000+0000", "created": "2011-04-15T02:32:20.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:53:34.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

http://helpdesk.appcelerator.net/tickets/1474

\n

blain, let's discuss this one.

{html}", "attachment": [ { "id": "17871", "filename": "app.js", "author": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:20.000+0000", "size": 905, "mimeType": "application/x-javascript" }, { "id": "17870", "filename": "screen-shot-2010-04-16-at-25328-pm.png", "author": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:20.000+0000", "size": 152887, "mimeType": "image/png" }, { "id": "17872", "filename": "variable-behav.jpg", "author": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:21.000+0000", "size": 45569, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "image view (stretchable image with left cap)", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "123592", "author": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "body": "{html}

This could be related to this too:

\n

\nhttps://appcelerator.lighthouseapp.com/projects/32238/tickets/563-i...

{html}", "updateAuthor": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "created": "2011-04-15T02:32:21.000+0000", "updated": "2011-04-15T02:32:21.000+0000" }, { "id": "123593", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Possible solution is a boolean property on the imageView class,\n'stretchImage'.

\n

When true, we'll have the imageView\nloadStretchableImmediateImage instead.

{html}", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:21.000+0000", "updated": "2011-04-15T02:32:21.000+0000" }, { "id": "123594", "author": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

That would be great. Can you also include properties for the\nleftCapWidth and topCapHeight so they can be customized (very\nuseful in my case).

{html}", "updateAuthor": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:21.000+0000", "updated": "2011-04-15T02:32:21.000+0000" }, { "id": "123595", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Currently image views do not use stretchable images so this does\nnot affect them. Stretchable image views should be considered a new\nfeature and a separate ticket should be made for them (and they\nshould be easy to implement with the new infrastructure).

\n

However as per the original ticket, backgrounds are now\nstretchable. The 'backgroundLeftCap' and 'backgroundTopCap' are\nTiDimensions, where 'auto' and '0' mean the same thing (the image\nstretches in the middle only). Otherwise, PLEASE be careful when\nusing capping: Keep in mind that the left end cap == right end cap\nand similarly for top/bottom. This means that if the source image\nyou're capping isn't symmetrical in terms of pixels, there may be\nissues such as where a stretched out pixel leads suddenly into a\nsmooth bump at the very end of the image on the right cap. One\nexample of this is the 'chat' image contained in KitchenSink. You\ncan view this behavior by uncommenting the relevant lines in\ntextfield_therest.js and playing around with the values a\nlittle.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:21.000+0000", "updated": "2011-04-15T02:32:21.000+0000" }, { "id": "123596", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [acbf58ff82857ec52dea89fb771d70d078f166fe])\nCloses #578: Stretchable images (backgrounds) are now\ncappable. \nhttp://github.com/appcelerator/titanium_mobile/commit/acbf58ff82857...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:22.000+0000", "updated": "2011-04-15T02:32:22.000+0000" }, { "id": "123597", "author": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Excellent, thanks guys!

{html}", "updateAuthor": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:22.000+0000", "updated": "2011-04-15T02:32:22.000+0000" }, { "id": "123598", "author": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Stephen, should this also work with labels? Have a demo working\nwith a textfield, but not a label.

{html}", "updateAuthor": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:22.000+0000", "updated": "2011-04-15T02:32:22.000+0000" }, { "id": "123599", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Unfortunately, it appears not. Backgrounds on labels and most\nother UI elements are set via a method which does not preserve\ncapping. Currently only text fields and buttons allow capping;\nlabels appear not to. One way you may wish to get around the label\nissue is to create an inactive text field if it's important for\nlook & feel.

\n

This is an important documentation issue, and should be noted.\nThere is lots of infrastructure in place to allow capping, but (on\na technical note) CGImages are pure bitmap content, not\ninstructions on how that content is to be interpreted. Keeping all\nthe code in place for now so that if an eventual solution is\ndetermined or an API change is made, we can take advantage of\nit.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:22.000+0000", "updated": "2011-04-15T02:32:22.000+0000" }, { "id": "123600", "author": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Appreciate the explanation and insight. Thanks again for\ntackling this ticket, it's very helpful.

{html}", "updateAuthor": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:22.000+0000", "updated": "2011-04-15T02:32:22.000+0000" }, { "id": "123601", "author": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

backgroundPadding* renders unexpectedly with 1.3. Has this\nfunctionality changed?

{html}", "updateAuthor": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:22.000+0000", "updated": "2011-04-15T02:32:22.000+0000" }, { "id": "123602", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Some things may have changed in the last update to fix how\npadding presents itself, and avoid issues with resetting background\nbounds.

\n

It's now a documented feature visible in the KitchenSink\nControls -> Labels test, so you can see if things have changed\nfor yourself. Please let me know if you have any more questions, or\nsample code you want me to look at.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:23.000+0000", "updated": "2011-04-15T02:32:23.000+0000" }, { "id": "123603", "author": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I modified the LabelTest project I shared previously to mimic\nthe KitchenSink demo. Where, the label is created first, then then\nthe backgroundImage and padding are set. I launched the app 3 times\nin succession and got 3 different results (see image).

\n

When I modified the label constructor to include the\nbackgroundImage and padding, I repeatedly got result #3.

{html}", "updateAuthor": { "name": "justin", "key": "justin", "displayName": "Justin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:23.000+0000", "updated": "2011-04-15T02:32:23.000+0000" }, { "id": "123604", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Reopening and prioritizing this, since it could be a serious\nissue.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:23.000+0000", "updated": "2011-04-15T02:32:23.000+0000" }, { "id": "123605", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [1fba03bb40a13c3ae4ac0d4346526d062f2d8a90])\nCloses #578: padding fixed (again). Because padding\nbreaks easily and doesn't respect 'auto', it will be removed when\nstretchable image views are implemented (since labels can just be\nembedded in views then). \nhttp://github.com/appcelerator/titanium_mobile/commit/1fba03bb40a13...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:32:24.000+0000", "updated": "2011-04-15T02:32:24.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }