Skip to content

feat: allow array in borderWidth#14467

Draft
m1ga wants to merge 6 commits into
mainfrom
androidBorderWidth
Draft

feat: allow array in borderWidth#14467
m1ga wants to merge 6 commits into
mainfrom
androidBorderWidth

Conversation

@m1ga

@m1ga m1ga commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Currently only the borderRadius accepts a single value and an array. This PR will add array support in borderWidth too.

var win = Titanium.UI.createWindow({
	backgroundColor: "#fff"
});

var view = Ti.UI.createView({
	width: 200,
	height: 60,
	backgroundColor: "white",
	borderColor: "red",
	borderWidth: [2, 2, 6, 2],
	borderRadius: 20,
	top: 100
});
var lbl = Ti.UI.createLabel({
  text: "test",
  color:"#000"
})
view.add(lbl);

var btn = Ti.UI.createButton({
	title: "test",
	width: 200,
	height: 60,
	borderColor: "red",
	backgroundColor: "white",
	top: 200,
	color: "#000",
	borderRadius: 20,
	borderWidth: [2, 2, 6, 2]
});

view.addEventListener("touchstart", function() {
	view.borderWidth = [2, 2, 2, 2]
	view.translationY = 6
	view.height = 56
})
view.addEventListener("touchend", function() {
	view.borderWidth = [2, 2, 6, 2]
	view.translationY = 0
	view.height = 60
})
btn.addEventListener("touchstart", function() {
	btn.borderWidth = [2, 2, 2, 2];
	btn.translationY = 6
	btn.height = 56

})
btn.addEventListener("touchend", function() {
	btn.borderWidth = [2, 2, 6, 2]
	btn.translationY = 0
	btn.height = 60
})

win.add([view, btn]);
win.open();
Bildschirmaufnahme_20260619_192322.webm

iOS:

Bildschirmfoto 2026-07-02 um 09 46 31

Comment thread apidoc/Titanium/UI/View.yml
@m1ga m1ga marked this pull request as draft July 2, 2026 06:59
@m1ga m1ga changed the title feat(android): allow array in borderWidth feat: allow array in borderWidth Jul 2, 2026
@m1ga

m1ga commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

generated parity for iOS with AI help. Looks like it has to generate a fully custom shape. UI looks correct:

Bildschirmfoto 2026-07-02 um 09 46 31

but it's a very big change (commit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants