-
Notifications
You must be signed in to change notification settings - Fork 59
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
Fixes main content padding on various screens #2906
Fixes main content padding on various screens #2906
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2906 +/- ##
=========================================
+ Coverage 64.5% 66.8% +2.2%
- Complexity 1075 1092 +17
=========================================
Files 218 222 +4
Lines 9635 10162 +527
Branches 1897 1879 -18
=========================================
+ Hits 6218 6790 +572
+ Misses 2234 2183 -51
- Partials 1183 1189 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
modifier | ||
.fillMaxWidth() | ||
.testTag(SEARCH_FOOTER_TAG) | ||
.padding(bottom = if (!fabActions.isNullOrEmpty() && fabActions.first().visible) 80.dp else 32.dp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convert these to constants with intuitive names e.g FOOTER_PADDING_WITH_FAB
, FOOTER_PADDING_WITHOUT_FAB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be a constant variable? for both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my suggested code in the comments. The idea is to define the padding values in 2 separate constants to be reused in all screens.
LazyColumn(state = lazyListState) { | ||
LazyColumn( | ||
state = lazyListState, | ||
modifier = Modifier.padding(bottom = if (!fabActions.isNullOrEmpty() && fabActions.first().visible) 80.dp else 32.dp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convert these to constants with intuitive names e.g FOOTER_PADDING_WITH_FAB
, FOOTER_PADDING_WITHOUT_FAB
@brandy-kay Can you link the issue to this PR? |
.testTag(SEARCH_FOOTER_TAG) | ||
.padding( | ||
bottom = | ||
if (!fabActions.isNullOrEmpty() && fabActions.first().visible) 80.dp else 32.dp, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!fabActions.isNullOrEmpty() && fabActions.first().visible) 80.dp else 32.dp, | |
//Declared these constants in AndroidExtensions file | |
const val PADDING_BOTTOM_WITH_FAB = 80 | |
const val PADDING_BOTTOM_WITHOUT_FAB = 32 | |
if (!fabActions.isNullOrEmpty() && fabActions.first().visible) PADDING_BOTTOM_WITH_FAB.dp else PADDING_BOTTOM_WITHOUT_FAB.dp, |
Kindly can you share screenshots to verify this is fixed on the UI? |
@ellykits Sure the PR is WIP once done I will Linking all the necessary UI let me include the changes |
IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes #2892
Engineer Checklist
strings.xml
file./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the project's style guideCode Reviewer Checklist
strings.xml
fileDemo