Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(android): implement borderRadius corner support #11796

Closed
wants to merge 5 commits into from

Conversation

garymathews
Copy link
Contributor

  • Implement the ability to specify radius for specific View corners
TEST CASE
const window = Ti.UI.createWindow({ backgroundColor: 'white' });
const view_a = Ti.UI.createView({
	backgroundColor: 'red',
	width: 100,
	height: 50,
	top: 100,
	borderRadius: '20 20px 0 0'
});
const view_b = Ti.UI.createView({
	backgroundColor: 'blue',
	width: 100,
	height: 50,
	top: 150,
	borderRadius: [ '0', '0px', '40dp', 20 ]
});

window.add([ view_a, view_b ]);
window.open();

JIRA Ticket

@tidev tidev deleted a comment from build Jun 27, 2020
@tidev tidev deleted a comment from build Jun 27, 2020
@build
Copy link
Contributor

build commented Jun 27, 2020

Fails
🚫 Tests have failed, see below for more information.
Messages
📖

💾 Here's the generated SDK zipfile.

📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖 ❌ 1 tests have failed There are 1 tests failing and 698 skipped out of 7350 total tests.

Tests:

ClassnameNameTimeError
android.emulator.Titanium.Androidactivity callbacks (9)5.074
Error: timeout of 5000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53120)

Generated by 🚫 dangerJS against 5cdcf7f

Copy link
Contributor

@sgtcoolguy sgtcoolguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes LGTM. Ideally we'd have an actual UI test for this, but that requires us to merge #11699 and get the view comparisons code in the test suite first.

Only change I see is the API doc mismatch (expecting Dictionary instead of Array)

So this is approved with the caveat that the API doc change needs to be fixed before merge.

garymathews and others added 2 commits June 29, 2020 12:19
Co-authored-by: Christopher Williams <chris.a.williams@gmail.com>
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR Passed Tested with the test case above, able to see borderRadius corner change the border radius control also tested with different value e.g.

const view_a = Ti.UI.createView({
	backgroundColor: 'red',
	width: 100,
	height: 50,
	top: 100,
	borderRadius: '20 20px 20 30'
});
const view_b = Ti.UI.createView({
	backgroundColor: 'blue',
	width: 100,
	height: 50,
	top: 150,
	borderRadius: [ '20', '30px', '40dp', 20 ]
});

Test Environment

MacOS Big Sur: 11.0 Beta
Xcode: 12.0 Beta 
Java Version: 1.8.0_242
Android NDK: 21.3.6528147
Node.js: 12.18.1
""NPM":"5.0.0","CLI":"8.0.0""
API29 Pixel XL emulator

@sgtcoolguy sgtcoolguy self-assigned this Jul 6, 2020
@sgtcoolguy
Copy link
Contributor

I'll combine this with #11801 and add a few more tests/UI snapshot tests...

@sgtcoolguy
Copy link
Contributor

manually merged into master (after fixing bug with applying 2 value use case against wrong corners)

@sgtcoolguy sgtcoolguy closed this Jul 7, 2020
@ssaddique
Copy link
Contributor

ssaddique commented Aug 6, 2020

Fix verified on build 9.1.0.v20200804082025.

Test environment

OS Ver:         10.15.3
Xcode Ver:      Xcode 11.6
Appc NPM:       5.0.0
Appc CLI:       8.0.0
Node Ver:       10.17.0
Java Ver:       1.8.0_162
Emulators:      Pixel 3 (API 26, 27, 28, 29, 30)
Device:         Pixel 3a (API 30 - Android 11)

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

Successfully merging this pull request may close these issues.

None yet

5 participants