{ "id": "152205", "key": "TIMOB-19754", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-05-03T08:22:49.000+0000", "created": "2015-10-20T20:23:24.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "regression", "texfield" ], "versions": [ { "id": "16778", "description": "Release 5.0.1", "name": "Release 5.0.1", "archived": false, "released": true, "releaseDate": "2015-09-25" }, { "id": "16904", "description": "Release 5.0.2", "name": "Release 5.0.2", "archived": true, "released": true, "releaseDate": "2015-10-01" }, { "id": "16925", "description": "WatchKit Support--all going into 5.0 now", "name": "Release 5.0.0", "archived": true, "released": true, "releaseDate": "2015-09-16" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-06T17:37:00.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": "h6.Issue Description\r\n\r\nText field text is not align centered in Android using the Titanium SDK 5.X, Is working good in Titanium SDK 3.5.1.\r\n\r\nverticalAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_CENTER -> also is not working. \r\n\r\nh6. Steps to replicate: \r\n-Create a new titanium classic project\r\n-Open the app.js file inside Resources\r\n-Replace the code with this: \r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nvar textField = Ti.UI.createTextField({\r\n borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n color: '#336699',\r\n backgroundColor: \"red\",\r\n top: 10, left: 10,\r\n width: 250\r\n});\r\n\r\nwin.add(textField);\r\nwin.open();\r\n\r\n{code}\r\n", "attachment": [ { "id": "57192", "filename": "4.4.4.png", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-29T22:14:24.000+0000", "size": 53561, "mimeType": "image/png" }, { "id": "57191", "filename": "5.0.0.png", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-29T22:14:24.000+0000", "size": 62894, "mimeType": "image/png" }, { "id": "57613", "filename": "Device-Nexus4-21-TIMOB-19754.png", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-25T08:31:46.000+0000", "size": 25247, "mimeType": "image/png" }, { "id": "57634", "filename": "latest_SS.png", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-30T19:19:10.000+0000", "size": 136576, "mimeType": "image/png" }, { "id": "57612", "filename": "nexus4-23-TIMOB-19754.png", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-25T08:24:31.000+0000", "size": 246512, "mimeType": "image/png" }, { "id": "57643", "filename": "Nexus4-ALLCAPS.png", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-12-01T07:18:48.000+0000", "size": 30658, "mimeType": "image/png" } ], "flagged": false, "summary": "Android Textfield is not vertically aligned at center", "creator": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "titanium SDK 5.0.1.GA\r\ntitanium SDK 5.0.2.GA\r\nAndroid OS 5.0.0\r\nAndroid OS 5.1.0", "closedSprints": [ { "id": 883, "state": "closed", "name": "2017 Sprint 09 SDK", "startDate": "2017-04-23T21:46:54.309Z", "endDate": "2017-05-07T21:46:00.000Z", "completeDate": "2017-05-08T00:25:44.276Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "368163", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ti.UI.TEXT_VERTICAL_ALIGNMENT_CENTER is working fine. If you want your text to appear in the center of the textfield, you should use:\r\n{code}\r\ntextAlign: Ti.UI.TEXT_ALIGNMENT_CENTER\r\n{code}", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-28T19:05:31.000+0000", "updated": "2015-10-28T19:05:31.000+0000" }, { "id": "368355", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello [~hpham] I want to center the text vertically, please see the attached screenshots. The textAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_CENTER is working on Android 4 [4.4.4.png screenshot] but is not working on Android 5 [5.0.0.png screenshot], the textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER property just center the text horizontally.\r\n\r\nThis is happening in ally and classic, here is my test-case in classic: \r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nvar textField = Ti.UI.createTextField({\r\n borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n color: '#336699',\r\n backgroundColor: \"red\",\r\n top: 10, left: 10,\r\n textAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_CENTER ,\r\n width: 250\r\n});\r\n\r\nwin.add(textField);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-29T22:15:30.000+0000", "updated": "2015-10-29T22:31:00.000+0000" }, { "id": "371437", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~rramirez],\r\nI checked the above test case and it works fine on Nexus 4 device and emulator. See attached screen shots. Please let me know if I am missing anything. ", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-25T08:33:32.000+0000", "updated": "2015-11-25T08:33:32.000+0000" }, { "id": "371469", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Nope, but you are running the app using the API 23 and I think that I was using the API 21, let me update my environment and try again using the 5.1.1.GA SDK and the API 23. I will keep you updated about the results.\r\nThanks.", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-25T18:21:46.000+0000", "updated": "2015-11-25T18:21:46.000+0000" }, { "id": "371516", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-26T04:22:59.000+0000", "updated": "2015-11-26T04:22:59.000+0000" }, { "id": "371665", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello ! I have tested using Genymotion emulating a Google Nexus 7 with Android 5.0.0 API 21and SDK 5.1.1.GA.\r\nPlease Try typing Uppercase letters too. \r\n A new Screenshot is attached[latest_SS.png]", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-30T19:24:04.000+0000", "updated": "2015-11-30T19:24:04.000+0000" }, { "id": "371758", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~rramirez]\r\n\r\nNot able to the issue. Attached screenshot [Nexus4-APPCAPS] which is working as expected! \r\n\r\nCan you do two things\r\n1. Try running on a device/emulator - not Genymotion.\r\n2. Run at least on Android 5.1.\r\n\r\nBecause as I am trying to see similar occurrences I found someone reporting an alignment issue on early versions of lollipop.\r\nhttps://code.google.com/p/android/issues/detail?id=87795", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-12-01T07:23:19.000+0000", "updated": "2015-12-01T07:23:19.000+0000" }, { "id": "371795", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 4.4.2, 5.0.1, 5.1.1, and 6.0. This is only reproducible in 5.0.1. However, Lollipop is known for font rendering and misalignment issues. Google fixed this in 5.1. Closing this ticket as not our bug. Please open if you can reproduce this on devices that are NOT 5.0.x. ", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-12-01T20:00:03.000+0000", "updated": "2015-12-01T20:00:03.000+0000" }, { "id": "372917", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Do we have a specific bug from Google/Android in reference to alignment issues? I would like to reference that here.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-12-14T23:42:16.000+0000", "updated": "2015-12-14T23:42:16.000+0000" }, { "id": "372941", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "Not able to find specific bug report but here are few references to this issue\r\n\r\nhttps://code.google.com/p/android/issues/detail?id=87795\r\nhttp://stackoverflow.com/questions/27945834/android-5-0-lollipop-is-not-displaying-special-characters-correctly", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-12-15T03:18:31.000+0000", "updated": "2015-12-15T03:18:31.000+0000" }, { "id": "379525", "author": { "name": "louis.quaintance", "key": "louis.quaintance", "displayName": "Louis Quaintance", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is definitely a Titanium issue\r\n\r\nCreate a native Android project and add:\r\n\r\n\r\n\r\nTo the main activity xml file\r\n\r\nDeploy to a 5.0.1 device and its perfect. Do the same but in Titanium and its not aligned", "updateAuthor": { "name": "louis.quaintance", "key": "louis.quaintance", "displayName": "Louis Quaintance", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-11T11:14:26.000+0000", "updated": "2016-03-11T11:14:26.000+0000" }, { "id": "379699", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~nsalahin] try Android OS 5.0.0 and Android OS 5.1.0", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-14T23:48:56.000+0000", "updated": "2016-03-14T23:48:56.000+0000" }, { "id": "380354", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\n \r\n\r\nThanks for your contribution. I have tested that issue you reported. In titanium SDK 5.2.0 GA, the property “*verticalAlign:Ti.UI.TEXT_VERTICAL_ALIGNMENT_CENTER*” is working as expected in android 5.1.0 but doesn’t work in android 5.0.0. Please check [5.1.0| http://postimg.org/image/urmzqqyz1/], [5.0.0|http://postimg.org/image/evdj3i9k9/].\r\n\r\n\r\n\r\n*Test Environment:*\r\n\r\nAppcelerator Studio, build: 4.5.0.201602170821,\r\n\r\nOperating System Mac OS X -EI Capitan,Versio-10.11.1,\r\n\r\nAppcelerator Command-Line Interface, version 5.2.0,\r\n\r\nSDK Version = 5.2.0.GA, \r\n\r\nNode.js Version: 4.2.2 npm Version:2.14.7,\r\n\r\nEmulator: Custom phone / android 5.0.1, Nexus 5/ android 5.0.0\r\n\r\n\r\nThanks.", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2016-03-22T11:10:32.000+0000", "updated": "2016-03-22T11:10:32.000+0000" }, { "id": "393699", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Any idea how I can get this working on Android 5.0.x? Theme-configuration or something?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-20T16:06:30.000+0000", "updated": "2016-08-20T16:06:30.000+0000" }, { "id": "405312", "author": { "name": "ssavic", "key": "ssavic", "displayName": "Sasa Savic", "active": true, "timeZone": "America/New_York" }, "body": "This is still an issue with the latest 5.5.1.GA as well as latest 6.x.x SDK's. Is this issue even being worked on? Also, are there any alternatives/workarounds.", "updateAuthor": { "name": "ssavic", "key": "ssavic", "displayName": "Sasa Savic", "active": true, "timeZone": "America/New_York" }, "created": "2017-01-25T21:45:35.000+0000", "updated": "2017-01-25T21:45:35.000+0000" }, { "id": "406724", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "So this does appear to be an Android issue, and it depends on the type of view the TextView is added to:\r\n\r\nhttps://code.google.com/p/android/issues/detail?id=59700\r\nhttps://code.google.com/p/android/issues/detail?id=59368", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-09T11:21:41.000+0000", "updated": "2017-02-09T11:21:41.000+0000" }, { "id": "419001", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving as invalid as this is not our bug.", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-03T08:22:49.000+0000", "updated": "2017-05-03T08:22:49.000+0000" }, { "id": "439905", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid. If incorrect, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:37:00.000+0000", "updated": "2018-08-06T17:37:00.000+0000" } ], "maxResults": 23, "total": 23, "startAt": 0 } } }