{ "id": "63793", "key": "TIMOB-3161", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11246", "name": "Sprint 2011-11", "archived": true, "released": true, "releaseDate": "2011-03-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T02:01:04.000+0000", "created": "2011-04-15T03:38:22.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "enterprise", "feature", "release-1.7.0", "reported-1.6.0", "rplist" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T02:01:04.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

Problem

\n

The built in Cancel button, visible when you add a search bar to\nan app, doesn't support multiple densities right now. So when you\nview it on a high density display, it is much smaller than it\nshould be.

\n

Solution

\n

Add multiple images for the various densities.

\n

Where Is It

\n

Looking at the source, it is located here:

\n
\nandroid/modules/ui/src/ti/modules/titanium/ui/widget/searchbar/cancel.png\n
\n

Sample Code

\n

Taken from our documentation:

\n
\nvar search = Titanium.UI.createSearchBar({\n    barColor:'#000', \n    showCancel:true,\n    height:\"43dp\",\n    top:0,\n});\n
\n

Associated Helpdesk Ticket

\n

http://developer.appcelerator.com/helpdesk/view/73761

{html}", "attachment": [], "flagged": false, "summary": "Android: Add Multiple Density Images for Cancel Button", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "130186", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This ticket requires #3163 to be fixed to implement\ncorrectly.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:38:23.000+0000", "updated": "2011-04-15T03:38:23.000+0000" }, { "id": "130187", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

\nhttps://github.com/appcelerator/titanium_mobile/commit/7a2cf1fad5f2...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:38:24.000+0000", "updated": "2011-04-15T03:38:24.000+0000" }, { "id": "130188", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

In the sample code above, i changed height:43 to height:\"43dp\",\nsince if you use anyDensity=\"true\" and go on a high density device,\nthe searchbar at \"43\" is going to look shorter than at \"43dp\".

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:38:24.000+0000", "updated": "2011-04-15T03:38:24.000+0000" }, { "id": "130189", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Tested with Titanium SDK version: 1.7.0 (03/22/11 09:36 42d2187)\non
\nEmulator WVGA800 2.1
\nNexus S 2.3.2

{html}", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:38:24.000+0000", "updated": "2011-04-15T03:38:24.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }