Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2743] textArea: adding a dimension ('dip', 'px'...) to 'borderRadius' or to 'borderWidth' makes the app crash without warning on Android

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2012-07-27T08:49:05.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, borderRadius, borderWidth, dip, px, textArea
ReporterLaurent Jolia-Ferrier
AssigneeVarun Joshi
Created2012-07-01T03:23:48.000+0000
Updated2016-03-08T07:47:38.000+0000

Description

1) I create a scrollView. This scrollView contains several views. Some of these views contain one or more textAreas. For each textArea I set the textArea's borderRadius property (for ex.: borderRadius : '10dip') and borderWith property (for ex.: boderWidth : '1dip'). 2) On iOS my app runs fine. 3) On Android it crashes without any warning. 4) I have discovered that if I remove the units in borderRadius definition (i.e. borderRadius : 10) and in borderWith definition (i.e. borderWith : 1) the app runs fine on Android too. 5) Changing from 'dip' to 'px' does not solve the issue.

Comments

  1. Varun Joshi 2012-07-03

    Hi, I could not reproduce the issue with the following test code containing the textarea with borderRadius as a dip value (tested on latest 2.1.0.GA SDK). Could you please provide a reproducible test case? {noformat} var win = Ti.UI.createWindow({ backgroundColor:'white' }); win.open(); var textarea = Ti.UI.createTextArea({ top: 10, height: 100, width: 300, borderRadius: '10dip', borderWidth: '3dip', backgroundColor: 'gray', hintText: 'Hello World' }); win.add(textarea); {noformat} Thanks, Varun
  2. Remo 2012-10-01

    in the following code, the borderWidth (5dp) is also ignored (using Chrome on Windows and current SDK): var image = Ti.UI.createImageView({height:'32dp',width:'32dp', image: 'http://www....'}); var label = Ti.UI.createLabel({text: 'hallo', height:'32dp', width:'auto', left: '10dp'}); var row = Ti.UI.createTableViewRow({height:'42dp', layout: 'horizontal', borderWidth: '5dp'}); row.add(image); row.add(label); changing it to '5' instead of '5dp' and it works fine.

JSON Source