{ "id": "133963", "key": "TIMOB-18132", "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": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-12-08T18:52:48.000+0000", "created": "2014-07-31T11:43:02.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "Android", "Crash", "DatePicker", "TCSupportTriage" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" }, { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" }, { "id": "16676", "description": "Release 3.4.1", "name": "Release 3.4.1", "archived": false, "released": true, "releaseDate": "2014-11-14" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-01-21T21:45:56.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": "h4. Problem Description\r\nApp crashes with CalledFromWrongThreadException when switching from textedit to datepicker\r\n\r\nh4. Steps to reproduce\r\n1. Create a new mobile project classic titanium\r\n2. Add this code to app.js:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({title:'test',layout:'vertical'});\r\nwin.open();\r\nvar label = Ti.UI.createTextField({value:'Hello world',top:50,bottom:50,height:Ti.UI.SIZE,width:Ti.UI.FILL});\r\nwin.add(label);\r\nvar picker = Ti.UI.createPicker({value : new Date(),type: Ti.UI.PICKER_TYPE_DATE});\r\nvar pickDateButton = Ti.UI.createButton({title:'pick a date'});\r\nwin.add(pickDateButton);\r\npickDateButton.addEventListener('click',function(){\r\n picker.showDatePickerDialog({\r\n value:new Date(),\r\n callback:function(e){\r\n Ti.API.info('picked date: '+JSON.stringify(e));\r\n }\r\n });\r\n});\r\n{code}\r\n3. Run the app in a Samsung S3 device (Please: make sure to use the S3 device, it's not easily reproducible in other devices). \r\n4. Click in the Textfield\r\n5. Start type something\r\n6. Click on the button to open the date picker .\r\n7. The app should crash.\r\n\r\nh4. Extra info\r\nI included the adb log of the errror\r\n\r\n{color:red}\r\n/dalvikvm(27883): threadid=10: thread exiting with uncaught exception (group=0x4174ee48)\r\nE/AndroidRuntime(27883): FATAL EXCEPTION: KrollRuntimeThread\r\nE/AndroidRuntime(27883): Process: com.debugging.test, PID: 27883\r\nE/AndroidRuntime(27883): android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.\r\nE/AndroidRuntime(27883): at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6347)\r\nE/AndroidRuntime(27883): at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:871)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.widget.ScrollView.requestLayout(ScrollView.java:1481)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.view.View.requestLayout(View.java:16472)\r\nE/AndroidRuntime(27883): at android.widget.TextView.checkForResize(TextView.java:6760)\r\nE/AndroidRuntime(27883): at android.widget.TextView.updateAfterEdit(TextView.java:7681)\r\nE/AndroidRuntime(27883): at android.widget.Editor.finishBatchEdit(Editor.java:1322)\r\nE/AndroidRuntime(27883): at android.widget.Editor.endBatchEdit(Editor.java:1305)\r\nE/AndroidRuntime(27883): at android.widget.TextView.endBatchEdit(TextView.java:6065)\r\nE/AndroidRuntime(27883): at com.android.internal.widget.EditableInputConnection.endBatchEdit(EditableInputConnection.java:77)\r\nE/AndroidRuntime(27883): at android.view.inputmethod.BaseInputConnection.finishComposingText(BaseInputConnection.java:288)\r\nE/AndroidRuntime(27883): at android.view.inputmethod.InputMethodManager.checkFocusNoStartInput(InputMethodManager.java:1358)\r\nE/AndroidRuntime(27883): at android.view.inputmethod.InputMethodManager.onWindowFocus(InputMethodManager.java:1402)\r\nE/AndroidRuntime(27883): at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3198)\r\nE/AndroidRuntime(27883): at android.os.Handler.dispatchMessage(Handler.java:102)\r\nE/AndroidRuntime(27883): at android.os.Looper.loop(Looper.java:136)\r\nE/AndroidRuntime(27883): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)\r\nW/ActivityManager( 886): Force finishing activity com.debugging.test/org.appcelerator.titanium.TiActivity\r\nV/ActivityManager( 886): Moving to PAUSING: ActivityRecord{422ff478 u0 com.debugging.test/org.appcelerator.titanium.TiActivity t1034 f}\r\n{color}", "attachment": [], "flagged": false, "summary": "Android: App Crashes with CalledFromWrongThreadException opening DatePicker after typing in a tf", "creator": { "name": "bar b", "key": "bar b", "displayName": "Bar Bruy", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "bar b", "key": "bar b", "displayName": "Bar Bruy", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Samsung Galaxy 3\r\nAndroid OS: 4.3\r\nMobile SDK 3.4.0.GA, 3.4.1.GA\r\n", "closedSprints": [ { "id": 536, "state": "closed", "name": "2015 Sprint 25 SDK", "startDate": "2015-12-05T01:30:40.415Z", "endDate": "2015-12-19T01:30:00.000Z", "completeDate": "2015-12-29T03:19:42.127Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "317253", "author": { "name": "hmrida", "key": "hmrida", "displayName": "Harish Mridha", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hi,\r\n\r\nWe tried to reproduce this issue with a sample test case. It’s working as expected with Titanium SDK 3.3.0.GA.\r\n \r\nh5. TESTING ENVIRONMENT:\r\n\r\n Titanium SDK: 3.3.0.GA\r\n Titanium CLI: 3.3.0\r\n OS X Version: 10.9.3\r\n Android API Level: 19\r\n\r\nh5. TEST CODE:\r\n\r\n{code} \r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:\"#000\"\r\n});\r\n\r\nvar txtFld = Ti.UI.createTextField({\r\n\thintText:'Input Text',top:50,\r\n\theight:Ti.UI.SIZE,\r\n\twidth:Ti.UI.FILL\r\n});\r\n\r\nvar picker = Ti.UI.createPicker({\r\n\tvalue : new Date(),\r\n\ttype: Ti.UI.PICKER_TYPE_DATE\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n\ttitle:'Pick Date'\r\n});\r\n\r\nbtn.addEventListener('click',function(){\r\n picker.showDatePickerDialog({\r\n value:new Date(),\r\n callback:function(e){\r\n Ti.API.info('picked date: '+JSON.stringify(e));\r\n }\r\n });\r\n});\r\n\r\nwin.add(txtFld);\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\n \r\nh5. STEPS TO TEST:\r\n\r\n- Create a simple project.\r\n- Update app.js with test code\r\n- Run on android tab\r\n \r\nh5. EXPECTED RESULT:\r\n\r\nIt’s working as expected.\r\n\r\nThanks\r\n", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-08-06T09:20:54.000+0000", "updated": "2014-08-26T00:17:34.000+0000" }, { "id": "320245", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello [~bar b] [~bar br], \r\n\r\nWe can't reproduce the issue. Which device did you use?\r\n\r\nBest regards! ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-08-26T00:18:24.000+0000", "updated": "2014-08-26T00:18:24.000+0000" }, { "id": "321981", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "We can't reproduce so far with 3.3.0.GA", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-09-05T06:29:53.000+0000", "updated": "2014-09-05T06:29:53.000+0000" }, { "id": "327534", "author": { "name": "checotrevino", "key": "checotrevino", "displayName": "Sergio Trevino", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have tried the same on Genymotion and it seems to be ok. However, it happens all the time on Samsung Galaxy S4 with KitKat.\r\n\r\nAs long as the textfield has focus and the keyboard is shown, it crashes immediately after showing the datePicker.\r\n\r\nHave to ask, did this happen when a non-stock keyboard (swiftkey, etc) is used to write on text field?", "updateAuthor": { "name": "checotrevino", "key": "checotrevino", "displayName": "Sergio Trevino", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-10T00:27:53.000+0000", "updated": "2014-10-10T00:27:53.000+0000" }, { "id": "327577", "author": { "name": "bar b", "key": "bar b", "displayName": "Bar Bruy", "active": true, "timeZone": "Europe/Berlin" }, "body": "@Mauro parra-miranda : LG G TAB 8.3\r\n(Not reproducable on genymotion simulator)\r\nSergio states it does not work on Galaxy S4\r\n\r\nplease reopen this issue and try it on all the real devices you have.\r\nBecause it does still occur!\r\n+ first type in the text field -> then use the datepicker -> Then it occurs (!!! NOT IN SIMULATOR)\r\n\r\n", "updateAuthor": { "name": "bar b", "key": "bar b", "displayName": "Bar Bruy", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-10-10T07:24:00.000+0000", "updated": "2014-10-10T07:24:00.000+0000" }, { "id": "327637", "author": { "name": "checotrevino", "key": "checotrevino", "displayName": "Sergio Trevino", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for looking into this issue.\r\n\r\nI have noticed it happened on device with 3rd party keyboards. (Although unsure this is the exact cause). \r\n\r\nA thing that reduced crashes considerably is to wait for a second before showing picker, after blurring all textfields.\r\n\r\nSomething like this:\r\n\r\n\r\nfunction showPicker() {\r\n\tTi.API.info(\"ShowPicker\");\r\n\t$.textField1.blur(); // make sure to blur ALL fields.\r\n\r\n\tsetTimeout(function(e) {\r\n\t\tpicker.showDatePickerDialog({\r\n\t\t\tcallback : function(e) {\r\n\t\t\t\tif (e.cancel) {\r\n\t\t\t\t\tTi.API.info('User canceled dialog');\r\n\t\t\t\t} else {\r\n\t\t\t\t\tTi.API.info('User selected date: ' + e.value);\r\n\t\t\t\t\tvar value = e.value;\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}, 1000);\r\n\r\n\tTi.API.info(\"ShowPicker=>clicked\");\r\n\r\n}\r\n", "updateAuthor": { "name": "checotrevino", "key": "checotrevino", "displayName": "Sergio Trevino", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-10T18:29:15.000+0000", "updated": "2014-10-10T18:29:15.000+0000" }, { "id": "333587", "author": { "name": "clevasseur", "key": "clevasseur", "displayName": "Carl Levasseur", "active": true, "timeZone": "Europe/Berlin" }, "body": "I have the same issue on a nexus 5 with Lollipop. No issue in genymotion. The crash occurs even if the keyboard isn't visible.\r\nIt works fine if I don't type anything in the textfield. I am using the native keyboard. ", "updateAuthor": { "name": "clevasseur", "key": "clevasseur", "displayName": "Carl Levasseur", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-11-25T08:45:02.000+0000", "updated": "2014-11-25T08:45:02.000+0000" }, { "id": "333771", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "[~rtlechuga]:\r\n\r\nTested with the testcase in the TC issue description, with: Mobile SDK 3.4.1, Nexus 5 with Lollipop. Works just fine following the steps:\r\n\r\n1. Open the app.\r\n2. Click on the tf\r\n3. Type \r\n4. Without minimizing the keyboard, click on the \"pick a date\" button.\r\n5. Select one date.\r\n6. Click on OK.\r\n\r\nBest Regards ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-11-26T00:07:22.000+0000", "updated": "2014-12-02T21:34:57.000+0000" }, { "id": "334344", "author": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "body": "We have the same issue on our production app.\r\nThe issue appears with SDK 3.3.0.GA, 3.4.0.GA and 3.4.1.GA.\r\nThis is really critical for us: our users cannot fill in their profile information.\r\n\r\nThe app example above is very simple.\r\nIt should not crash but it does on some devices.\r\n\r\nWe reproduced the crash using:\r\n- a Samsung Galaxy S4 (Android 4.4.4)\r\n- a Samsung Galaxy S3 (Android 4.3)\r\n- a Nexus 5 (Android Lollipop)\r\n- a Nexus 4 (Android Lollipop)\r\n\r\nIt does not crash using:\r\n- a Samsung Galaxy S5 mini (Android 4.4.2) \r\n- a Samsung Galaxy S2 (Android 4.0.3)\r\n\r\nPlease take some time to dig into the issue.\r\nThank you", "updateAuthor": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-12-02T16:43:36.000+0000", "updated": "2014-12-02T16:43:36.000+0000" }, { "id": "334352", "author": { "name": "checotrevino", "key": "checotrevino", "displayName": "Sergio Trevino", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I had to use another workaround for this, but it does feel VERY precarious.\r\n\r\nWhen the user taps on the button that prompts date picker to open, first we need to blur the text field AND wait for the text field to fire the \"blur\" event to actually show the datePicker.\r\n\r\nThis however, would need many events for many fields, but seems to be working for the one example.\r\n\r\nAppcelerator, please fix this. It's a control used enough that is causing widespread crashes.", "updateAuthor": { "name": "checotrevino", "key": "checotrevino", "displayName": "Sergio Trevino", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-02T17:49:39.000+0000", "updated": "2014-12-02T17:49:39.000+0000" }, { "id": "334397", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello [~arnaud] and [~checotrevino]!\r\n\r\nWe dig into this, as you can see in previous comment. We weren't able to reproduce the issue. Please, add a crashlog to all the mentioned platforms and attach the code that you are using, or even better, use the original testcase. \r\n\r\nBest Regards", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-12-02T21:34:47.000+0000", "updated": "2014-12-02T21:34:47.000+0000" }, { "id": "334496", "author": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thank you Sergio Trevino for the workaround, we will try this!\r\n\r\nMauro Parra-Miranda, using the original testcase, the app craches on the Samsung Galaxy S4 (Android 4.4.4).\r\nI think I have the same crash as described in the ticket.\r\n\r\nHere is the crash log :\r\n{code:log}\r\n12-03 08:59:11.525: D/TiUIView(16132): (main) [5247,10026] TAP, TAP, TAP on ti.modules.titanium.ui.ButtonProxy@41942f60\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): FATAL EXCEPTION: KrollRuntimeThread\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): Process: com.XXXXXXXX.dev, PID: 16132\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6024)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:853)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.view.ViewGroup.invalidateChild(ViewGroup.java:4320)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.view.View.invalidate(View.java:10942)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.view.View.invalidate(View.java:10897)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.widget.TextView.updateAfterEdit(TextView.java:7430)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.widget.Editor.finishBatchEdit(Editor.java:1101)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.widget.Editor.endBatchEdit(Editor.java:1084)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.widget.TextView.endBatchEdit(TextView.java:5867)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat com.android.internal.widget.EditableInputConnection.endBatchEdit(EditableInputConnection.java:77)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.view.inputmethod.BaseInputConnection.finishComposingText(BaseInputConnection.java:274)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.view.inputmethod.InputMethodManager.checkFocusNoStartInput(InputMethodManager.java:1332)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.view.inputmethod.InputMethodManager.onWindowFocus(InputMethodManager.java:1376)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3141)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat android.os.Looper.loop(Looper.java:136)\r\n12-03 08:59:11.525: E/AndroidRuntime(16132): \tat org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)\r\n12-03 08:59:11.535: W/ActivityManager(704): Process com.XXXXXXXX.dev has crashed too many times: killing!\r\n12-03 08:59:11.535: W/ActivityManager(704): Force finishing activity com.XXXXXXXX.dev/org.appcelerator.titanium.TiActivity\r\n12-03 08:59:11.535: D/TiBaseActivity(16132): (main) [14,10040] Activity org.appcelerator.titanium.TiActivity@4185e6c0 onPause\r\n12-03 08:59:11.535: W/ActivityManager(704): Force finishing activity com.XXXXXXXX.dev/.XXXXXXXXActivity\r\n12-03 08:59:11.535: I/ActivityManager(704): Killing 16132:com.XXXXXXXX.dev/u0a276 (adj 0): crash\r\n{code}", "updateAuthor": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-12-03T08:06:47.000+0000", "updated": "2014-12-03T08:09:58.000+0000" }, { "id": "334498", "author": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "body": "A simple test with Sergio workaround on the original testcase does not crashes.\r\nHere is the code:\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({title:'test',layout:'vertical'});\r\nwin.open();\r\nvar label = Ti.UI.createTextField({value:'Hello world',top:50,bottom:50,height:Ti.UI.SIZE,width:Ti.UI.FILL});\r\nwin.add(label);\r\nvar picker = Ti.UI.createPicker({value : new Date(),type: Ti.UI.PICKER_TYPE_DATE});\r\nvar pickDateButton = Ti.UI.createButton({title:'pick a date'});\r\nwin.add(pickDateButton);\r\npickDateButton.addEventListener('click',function(){\r\n label.blur()\r\n\r\n label.addEventListener('blur', function() {\r\n picker.showDatePickerDialog({\r\n value:new Date(),\r\n callback:function(e){\r\n Ti.API.info('picked date: '+JSON.stringify(e));\r\n }\r\n });\r\n })\r\n});\r\n\r\n{code}", "updateAuthor": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-12-03T08:15:07.000+0000", "updated": "2014-12-03T08:15:07.000+0000" }, { "id": "345161", "author": { "name": "bar b", "key": "bar b", "displayName": "Bar Bruy", "active": true, "timeZone": "Europe/Berlin" }, "body": "I have found another easier workaround.\r\njust call Ti.UI.Android.hideSoftKeyboard() before showing the datepicker\r\nThanks to [~Arnaud_Besnier] and [~checotrevino] for your workarounds", "updateAuthor": { "name": "bar b", "key": "bar b", "displayName": "Bar Bruy", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-03-05T15:52:41.000+0000", "updated": "2015-03-05T15:52:41.000+0000" }, { "id": "364187", "author": { "name": "iRonin", "key": "ironin", "displayName": "Cyprian Kowalczyk", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It is still happening at least on Samsung Galaxy S3 with Android 4.3 on SDK 3.5.1.GA", "updateAuthor": { "name": "iRonin", "key": "ironin", "displayName": "Cyprian Kowalczyk", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-17T10:53:43.000+0000", "updated": "2015-09-17T10:57:42.000+0000" }, { "id": "372112", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/7545", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-12-03T23:45:00.000+0000", "updated": "2015-12-03T23:45:00.000+0000" }, { "id": "372473", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "PR merged.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-12-09T02:36:21.000+0000", "updated": "2015-12-09T02:36:21.000+0000" }, { "id": "375100", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\nThe app does not crash according to steps in the description.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.5.0.201601210853\r\nTi SDK : 5.2.0.v20160114021251\r\nTi CLI : 5.0.6\r\nAlloy : 1.7.33\r\nMAC Yosemite : 10.10.5\r\nAppc NPM : 4.2.3-1\r\nAppc CLI : 5.2.0-231\r\nNode: v0.12.27\r\nNexus 6P - Android 6.0\r\nGalaxy S3 - Android 4.4.2", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-01-21T21:45:40.000+0000", "updated": "2016-01-21T21:45:40.000+0000" } ], "maxResults": 29, "total": 29, "startAt": 0 } } }