{ "id": "60681", "key": "TIMOB-49", "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": "11210", "name": "Release 0.6.0", "archived": true, "released": true, "releaseDate": "2009-08-12" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:51:49.000+0000", "created": "2011-04-15T02:23:03.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:51:49.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}

Description

\n

The purpose of this API is to create a button native control.\n(Copied from iPhone ticket #22)

\n

Example

\n
\n\nvar button = Titanium.UI.createButton({id:'foo',title:'My Title', icon:'images/foo.png'})\n\n\n// add event listneer\nbutton.addEventListener('click',function(event)\n{\n});\n
\n

API Arguments

\n

id : optional. HTML element id for where the\nbutton will be placed if placed in webview

\n

title : optional. title text on button

\n

icon : optional. path to image file

\n

style : pre-defined button style

\n

systemButton : pre-defined system icon or\nbutton (iPhone only)

\n

width : optional. width of button

\n

height : optional. height of button

\n

backgroundImage : optional. path to a\nbackground image to be used as the background for the button

\n

color : optional. text color

\n

backgroundColor : optional. background color of\nfield

{html}", "attachment": [], "flagged": false, "summary": "API - Titanium.UI.createButton (Android)", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "122712", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Properties pulled from iPhone documentation. Not reflected in\nthe spec.

\n

UI.Button.image : relative or app: path to the\nimage that will appear if systemButton is not used

\n

UI.Button.backgroundDisabledImage : relative or\napp: path to the image that will appear as the stretchable\nbackground

\n

UI.Button.backgroundSelectedImage : relative or\napp: path to the image that will appear as the stretchable\nbackground if the button is not in the toolbar or navbar and is\nselected.

\n

UI.Button.borderColor : a web color of the\ncorners behind the button. Default is transparent.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:23:03.000+0000", "updated": "2011-04-15T02:23:03.000+0000" }, { "id": "122713", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Pushed everything but the backgroundImage support. Also\nbackgroundColor doesn't work quite as expected. Future work needs\nto be done to export state functionality to the api (e.g. focused,\npressed, ...).

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:23:03.000+0000", "updated": "2011-04-15T02:23:03.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }