Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12027] Android: View borderWidth with 'dp' dimensions does not show on Android

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-02-27T22:27:16.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.1.0, 2013 Sprint 05 API, 2013 Sprint 05
ComponentsAndroid
Labelsexalture, parity, qe-testadded
ReporterTony Lukasavage
AssigneeSunila
Created2012-12-11T21:12:03.000+0000
Updated2014-06-19T12:42:55.000+0000

Description

problem

If the *borderWidth* property of a Titanium view is specified density independently (dp), it does not show up on Android. If you remove the *dp* suffix on the *borderWidth* property, everything works as expected. This problem also occurs on Mobileweb (). This problem does not occur on iOS.

expected behavior

The border should appear as expected whether or not density independent (dp) dimensions are specified for the *borderWidth* property.

test case

var win = Ti.UI.createWindow({
	backgroundColor: '#fff'
});
var view = Ti.UI.createView({
	height: '100dp',
	width: '100dp',
	backgroundColor: '#888',
	borderColor: '#000',
	borderWidth: '3dp'   // error, no border appears
	//borderWidth: 3     // this works as expected
});
win.add(view);
win.open();

Comments

  1. John Oliva 2013-01-19

    This also seems to be an issue for borderRadius.
  2. Sunila 2013-02-24

    PR https://github.com/appcelerator/titanium_mobile/pull/3903
  3. Anshu Mittal 2013-03-12

    Tested with: SDK: 3.1.0.v20130312015656 Studio: 3.1.0.201303091040 Device: Android emulator OS: OSX 10.7.5 works as expected

JSON Source