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

fix(android): crash in ListView on API 21 #13262

Merged
merged 6 commits into from
Mar 21, 2022

Conversation

drauggres
Copy link
Contributor

@drauggres drauggres commented Feb 8, 2022

default listDivider on API < 23 is instance of NinePatchDrawable, not a GradientDrawable.

fix #13261

  • fix crash on Android API < 23
  • handle separatorStyle: Ti.UI.TABLE_VIEW_SEPARATOR_STYLE_NONE on API < 23 (separator souldn't be visible)
  • handle separatorStyle: Ti.UI.TABLE_VIEW_SEPARATOR_STYLE_SINGLE_LINE with non zero separatorHeight and no separatorColor on Android API 21 (height should be applied) Put warning into docs, advise to set separatorColor on API < 23

default listDivider on API 21 is instance of NinePatchDrawable, not a GradientDrawable

fix tidev#13261
@drauggres drauggres marked this pull request as draft February 8, 2022 10:46
@build build added this to the 10.2.0 milestone Feb 8, 2022
@build build requested a review from a team February 8, 2022 10:50
@build
Copy link
Contributor

build commented Feb 8, 2022

Fails
🚫

🔬 There are library changes, but no changes to the unit tests. That's OK as long as you're refactoring existing code, but will require an admin to merge this PR. Please see README.md#unit-tests for docs on unit testing.

Warnings
⚠️ There is no linked JIRA ticket in the PR body. Please include the URL of the relevant JIRA ticket. If you need to, you may file a ticket on JIRA
Messages
📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖

✅ All tests are passing
Nice one! All 19694 tests are passing.
(There are 1157 skipped tests not included in that total)

📖 🎉 Another contribution from our awesome community member, drauggres! Thanks again for helping us make Titanium SDK better. 👍
📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS against 2dbb273

@drauggres drauggres marked this pull request as ready for review February 8, 2022 11:44
@build build requested a review from a team February 8, 2022 11:55
@build build added the docs 📔 label Feb 8, 2022
@hansemannn
Copy link
Collaborator

@drauggres Thanks for this! It looks quite severe, so I think it should be prioritized. Apart form this PR, is there any workaround for the crash, e.g. setting the separator color?

@drauggres
Copy link
Contributor Author

@drauggres Thanks for this! It looks quite severe, so I think it should be prioritized. Apart form this PR, is there any workaround for the crash, e.g. setting the separator color?

Yes, you need to always specify a separatorColor (even with separatorStyle: Ti.UI.TABLE_VIEW_SEPARATOR_STYLE_NONE) to force a non-default separator, which will prevent the exception

Copy link
Collaborator

@hansemannn hansemannn left a comment

Choose a reason for hiding this comment

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

Tested and working great here! I would wait for @m1ga for another review and then this can be merged! @drauggres Please also rebase this one (if possible, all your open PR's - they are very close to be merged :))

@drauggres
Copy link
Contributor Author

Please also rebase this one (if possible, all your open PR's - they are very close to be merged :))

Done.

I think this option was enabled in the appcelerator repo, but it is disabled now.
It adds the Update branch button, so maintainers and author can quickly merge master into PR source branch.

@hansemannn
Copy link
Collaborator

cc @cb1kenobi Can you re-enable the Update Branch button? It actually was there until last weekend 😇

@hansemannn hansemannn merged commit b30de10 into tidev:master Mar 21, 2022
@m1ga
Copy link
Contributor

m1ga commented Mar 21, 2022

yes, please add that again 😄

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.

Android: crash on API 21 in ListView
4 participants