Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Update HomeScreen.kt #978

Merged
merged 2 commits into from
Jul 29, 2024
Merged

Update HomeScreen.kt #978

merged 2 commits into from
Jul 29, 2024

Conversation

ashwanil23
Copy link
Contributor

@ashwanil23 ashwanil23 commented Jul 24, 2024

Removed fillMaxWidth() from CenterAlignedTopAppBar's title because when switching between My garden and Plant list then filter icon pops up and pushes CenterAlignedTopAppBar to the left

------------->This is the app before Change
Before Change

.
.
.
.
------------->This is the app after Change
After Change

Removed fillMaxWidth() from CenterAlignedTopAppBar's title because when switching between My garden and Plant list filter icon pops up and pushes CenterAlignedTopAppBar to the left.
@ashwanil23 ashwanil23 requested a review from a team as a code owner July 24, 2024 17:07
ashwanil23

This comment was marked as outdated.

@@ -169,12 +169,12 @@ private fun HomeTopAppBar(
CenterAlignedTopAppBar(
title = {
Row(
Modifier.fillMaxWidth(),
Modifier,

Choose a reason for hiding this comment

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

You can delete this line since the default is Modifier. In fact, you can probably just remove the entire row since an Arrangement.Center doesn't do anything if it's only matching the child's size. Can you try deleting the row and just having the text be the title to verify that looks right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can delete this line since the default is Modifier. In fact, you can probably just remove the entire row since an Arrangement.Center doesn't do anything if it's only matching the child's size. Can you try deleting the row and just having the text be the title to verify that looks right?

yes sir you are right it still working same.

Yes even after removing the Row composable its working good that means Row composable is useless we can remove it
@IanGClifton IanGClifton merged commit 1f287cb into android:main Jul 29, 2024
2 checks passed
@IanGClifton
Copy link

Sorry, I was off work Thursday and Friday, but I've merged now. Thanks for your contribution!

@ashwanil23
Copy link
Contributor Author

Sorry, I was off work Thursday and Friday, but I've merged now. Thanks for your contribution!

Thanku so much sir. You reviewed it that means a lot thanku for giving me my first contribution to open source.

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

Successfully merging this pull request may close these issues.

2 participants