Improvement: Betters Card and PlainListRow #479
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
(This PR is the same as #476 but that one was automatically closed when I renamed the branch, and now can't be reinstated)
We have a helper view called
Card
that when wrapped around another view gives it rounded corners and a shadow. It's used for a number of list items and is mostly tappable. This PR refactors Card and PlainListRow that are often used together. It also introduces TappableListRow, for PlainListRows that should be tappable.The main reason to do this is to make the APIs cleaner, the reason to do it now is that the Card shaped buttons currently don't behave like other buttons when highlighted. Instead of darkening the background the text is lightened. This PR gives us control over this behaviour.
How to test
Tap any button that looks like the one in the screenshot. They appear in Settings > Authorized dApps and Settings > Personas, as well as their sub views.
Screenshot
The first button is pressed:
PR submission checklist