{ "id": "61440", "key": "TIMOB-808", "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": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:18.000+0000", "created": "2011-04-15T02:36:53.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "feature", "picker" ], "versions": [], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:18.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}{html}", "attachment": [], "flagged": false, "summary": "Implement Pickers for Android", "creator": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124087", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}
Having a go, at don's suggestion.
Is there an ETA for this? When is 1.5 due?
This one keeps bouncing to next release. Currently planning on\nusing pickers in our next release, is this for sure 1.5?
The following will at a minimum be done by 1.5:
\nA plain picker with a single column, text only (i.e., the\n\"title\" property of the PickerRow object).
\nA date picker.
\nA time picker.
\n(Android has no native support for a date+time picker.)
\nNote that the projected date for 1.5 has not been set yet.\nHowever as we implement these things, we'll update this ticket and\nyou'll be able to get the new stuff from our \ncontinuous build page.
Multi-column support would be ideal. For a single column\n'picker', tableviews can already meet that need for us.
Bryan,
\nDo you mean multi-column wherein each column inside the picker\ncan \"spin\" (so to speak) to select its own value, or do you mean\nmulti-column in the sense that more than one column can be\ndisplayed per row of data, but when you select a row you're\nselecting the \"whole thing\". (If you know what I mean.) In the\nformer case, each column has its own set of rows (like a date\npicker that has columns for month, day, year). In the latter case,\nthere is only one set of rows.
\nThe case where each column can spin.
\nExample:
\nEnter height: 6' 1\"
\nFeet and inches would be selected independently.
The problem is that I don't think there is native support for\nthat in Android. I could be wrong about that, and I'll be checking\nmore deeply later. Meanwhile, if you've seen any Android apps with\nthat, let me know so I can have a look at them.
Urbanspoon did this but it wasn't a native control. They\nbasically created an iPhone look-alike picker.
It looks like you will have to roll something custom to get\npickers to be useful on android. It looks like at least one project\nout there has started something:
\nhttp://code.google.com/p/android-wheel/
If you implement the default android picker I don't think it\nwould be compatible at all with the iPhone version so we would end\nup with a lot of \"if iphone then\" code. I would hope for a custom\nwheel based implementation so it works pretty much the same on both\nplatforms.
Looks nice. Too bad the license is not compatible with\nTitanium.
Apache 2.0 is not compatible with GPL 3?
\nWe won't use any GPL'd code, no matter the license version.
As a follow-up to that:
\nhttp://www.apache.org/licenses/GPL-compatibility.html
\nIt's the wrong direction of a one-way compatibility, so to\nspeak.
\nI should say I'm hardly an expert. I just know that it is\nAppcelerator's policy not to use GPL code of any version.
I contacted the author and he changed the license to Apache\n2.0
update:
\nOur \nlatest code contains plain picker, date picker and time picker\n(not date+time, not countdown).
\nPlain picker: this is the native Android Spinner. Supports only\none column, and only plain text. We will adapt the to an\niPhone-type spinner with multiple columns probably this week,\nthanks to Bryan Jackson asking the creator of http://code.google.com/p/android-wheel/\nto change the license to Apache.
\nDate picker: by default, also the native Android date picker.\nhowever we've added a special creation-time property\nuseSpinner: true
to use android-wheel, which looks\niPhone-ish. Thanks again to Bryan.
Time picker: same as date picker in that by default it uses an\nAndroid native control, but you can use useSpinner:\ntrue
to use the android-wheel.
Bill,
\nI'm using the latest build and the date pickers seem to be\nworking. However, I'd like to use the DatePickerDialogs, which\nseems to be implemented under showDatePickerDialog(). I'm having a\nhard time figuring out how to invoke this though. Is this function\ngood to go or does something else need to be updated before it can\nbe used?
Ryan,
\nThis probably is not the \"final way\" we'll do this, but for now\nyou can use it in this wacky way: create an instance of a picker\n(any picker, in fact) and call it:
\n\nvar picker = Ti.UI.createPicker();\npicker.showDatePickerDialog({\n value: new Date(2010,8,1), // initial date to display\n callback: function(e) {\n if (e.cancel) {\n Ti.API.info('user canceled dialog');\n } else {\n Ti.API.info('user selected date: ' + e.value);\n }\n }\n});
\n
\n(I didn't test that code block. :) )
\nThis is a really strange way to do it, creating an instance of\npicker just to call this. Better would be to simply have\nTi.UI.showDatePickerDialog
, but we have an issue right\nnow whereby \"modules\" like Ti.UI
are shared across\njavascript contexts, so if we put it there the actual date dialog\nmight not appear in the right place. We're working on how modules\ninteract with contexts for Titanium 1.5, so -- to reiterate -- this\nmay change.
Regards,
\nBill
Thanks Bill. This works great. I'll be on the lookout for commit\nchanges that affect this, but I'd also appreciate it if you could\nfollow up on this thread if it becomes more complex.
Note: the spinner-style (iphone-looking) picker does not\ncurrently support any border width attributes. I'll be working on\nthat too in the coming weeks.
Hi. I need time picker and tried:
\nvar timePicker = Ti.UI.createPicker();
\ntimePicker.showTimePickerDialog({\n value: new Date(2010,8,1,1,9), // initial time to display\n callback: function(e) {\n if (e.cancel) { \n ..\n } else {\n ..\n }\n }
\n
\n}); It works fine but how to switch between 12h/d to 24h/d\ntime.
\nNow picker shows 12h/d time picker.
Indeed, there is a property you can set for that. Sorry, this\nwill all be documented eventually -- I'm just hesitating because --\nas I indicated earlier -- we're not sure if\nshowTimePickerDialog
and\nshowDatePickerDialog
will stay in the places where\nthey currently are.
Anyway:
\n\ntimePicker.showTimePickerDialog({\n format24: false, // <--------------------\n value: new Date(2010,8,1,1,9), // initial time to display\n callback: function(e) {\n if (e.cancel) { \n ..\n } else {\n ..\n }\n }\n});
\n
Is it currently possible to have the TimePicker increment by a\ncertain duration (say a half hour rather than a minute)?
\nReally glad to see this work progressing.
The \n\"native\" time picker, which is the one you get by default,\ndoesn't seem to have that capability. (Link is to Android\ndocs.)
\nThe \"spinner\" version of the time picker, which you get by\npassing useSpinner: true
as one of the creation\narguments to createPicker()
, will have it,\nbecause our Titanium API documentation (originating from our iOS\nimplementation) \nsays it should (the minuteInterval
property).\nAlas, I haven't coded it yet. I will \"soon\". (I keep saying soon\nhere but I keep getting lots of other stuff I need to do. -- but i\nwant this in 1.5.)
Currently, only the spinner supports minDate/maxDate. Will the\npicker support minDate/maxDate when 1.5 is final?
\nWill it be possible to change the title (which currently\ndisplays the date eg. 'September 04 2010') of the date dialog on\neach change?
(from [dc0620a5f5711fd299c6b842060d05e1018f4d6d])\n[#808] maxDate/minDate support for native date\npicker (not date picker dialog) \nhttp://github.com/appcelerator/titanium_mobile/commit/dc0620a5f5711...
I found out that the picker does ignore width / height property.\nWill it be possible to allow this?