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

Enable bottom container style and behavior customization #1859

Merged
merged 19 commits into from
Mar 24, 2023

Conversation

FikriMilano
Copy link
Collaborator

@FikriMilano FikriMilano commented Feb 10, 2023

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #1842

Description

  • Add onScrollListener to edit and review recycler view, so people can override and customize the bottom container behavior when scrolling
  • Add a divider above bottom container, gone by default
  • Add attrs and default xml style

Alternative(s) considered
Tried to use BottomAppBar and lift on scroll, elevation won't show and no logic to show the divider.

Type
Choose one: Feature

Screenshots (if applicable)

device-2023-02-13-193814.webm

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

@jingtang10
Copy link
Collaborator

@shelaghm fyi

@shelaghm
Copy link

@FikriMilano Great work!
One suggestion is to center the button inside the bottom container with 8px padding on top and bottom. See screenshot below.
Screenshot 2023-02-14 at 13 17 57

@FikriMilano
Copy link
Collaborator Author

@shelaghm thanks! I'll add that as the default style

- paddingVertical requires API level 26 (current min is 24).
- Added 4dp instead 8dp padding. 4dp results much similar to the design.
@FikriMilano
Copy link
Collaborator Author

@shelaghm padding fixed!

@shelaghm
Copy link

Excellent, thank you @FikriMilano

datacapture/src/main/res/values/styles.xml Outdated Show resolved Hide resolved
datacapture/src/main/res/values/styles.xml Outdated Show resolved Hide resolved
datacapture/src/main/res/values/styles.xml Outdated Show resolved Hide resolved
@FikriMilano FikriMilano requested review from jingtang10 and removed request for shelaghm February 22, 2023 13:51
@santosh-pingle
Copy link
Collaborator

Reviewing pr, thanks!

datacapture/src/main/res/layout/questionnaire_fragment.xml Outdated Show resolved Hide resolved
datacapture/src/main/res/layout/questionnaire_fragment.xml Outdated Show resolved Hide resolved
datacapture/src/main/res/values/attrs.xml Outdated Show resolved Hide resolved
datacapture/src/main/res/values/attrs.xml Outdated Show resolved Hide resolved
datacapture/src/main/res/values/styles.xml Outdated Show resolved Hide resolved
datacapture/src/main/res/values/styles.xml Outdated Show resolved Hide resolved
@FikriMilano FikriMilano requested review from jingtang10 and santosh-pingle and removed request for jingtang10 and santosh-pingle March 14, 2023 00:33
@jingtang10 jingtang10 enabled auto-merge (squash) March 24, 2023 19:33
@jingtang10 jingtang10 merged commit 9396c07 into google:master Mar 24, 2023
@jingtang10 jingtang10 deleted the 1842-bottom-container-2 branch March 24, 2023 20:01
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.

Bottom container style and behavior customization
4 participants