// In Android, the border around the image is not visible
// I tried removing borderRadius property, but the issue still remains
// It works on iPhone though
var imageView = Titanium.UI.createImageView({
url: "/path/to/image",
width: 280,
height: 175,
borderWidth: 1,
borderColor: "#ccc",
borderRadius: 5
});
Titanium.UI.currentWindow.add(imageView);
// Workaround
// Wrap the image view in another view and set its border properties
// Set the width and height to be 2 pixels more than the width and height of the image view
var wrapperView = Titanium.UI.createView({
width: 282,
height: 177,
borderWidth: 1,
borderColor: "#ccc",
borderRadius: 5
});
var imageView = Titanium.UI.createImageView({
url: "/path/to/image",
width: 280,
height: 175
});
wrapperView.add(imageView);
Titanium.UI.currentWindow.add(wrapperView);
WebView also suffers from the same problem.
Also see Remove Views test. Orange WebView should respect border radius.
Use this code to test
TIMOB-2099 is for Labels, but this border issue affects any view type.
Appears to be fixed by TIMOB-9469
Verified fixed with : Mobile sdk-2.2.0.v20120810080115 Titanium Studio, build: 2.1.1.201207271312 Device: Galaxy S III Android version 4.0.4