-
Notifications
You must be signed in to change notification settings - Fork 553
fix: about event view on collapsing layout #1490
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: about event view on collapsing layout #1490
Conversation
app/src/main/java/org/fossasia/openevent/general/about/AboutEventFragment.kt
Show resolved
Hide resolved
app/src/main/java/org/fossasia/openevent/general/about/AboutEventFragment.kt
Show resolved
Hide resolved
app/src/main/java/org/fossasia/openevent/general/about/AboutEventFragment.kt
Show resolved
Hide resolved
app/src/main/java/org/fossasia/openevent/general/about/AboutEventFragment.kt
Outdated
Show resolved
Hide resolved
@liveHarshit please review |
<dimen name="collapsing_toolbar_height">220dp</dimen> | ||
<dimen name="details_header_margin_top">40dp</dimen> | ||
<dimen name="collapsing_toolbar_height">320dp</dimen> | ||
<dimen name="details_header_margin_top">100dp</dimen> |
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.
wrong review
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.
@liveHarshit this is dimensions inside dimens.xml file... Can you please clarify your review?
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.
Reset LGTM
if (thisActivity is AppCompatActivity) thisActivity.supportActionBar?.title = event.name | ||
} else { | ||
rootView.detailsHeader.isVisible = true | ||
if (thisActivity is AppCompatActivity) thisActivity.supportActionBar?.title = "" |
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.
Just cast one time, when you define the value for thisActivity
.
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.
Updates?
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.
oh yeah, I forgot to do that, fixing now
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.
@liveHarshit I have fixed it
Details: - Load event image into the view - Set title bar to event name or "" when appBarLayout is collapsed or expaned Fixes: #1488
app/src/main/java/org/fossasia/openevent/general/about/AboutEventFragment.kt
Outdated
Show resolved
Hide resolved
Details: - Reduce thisActivity variable cast - Remove unused code - Set fitSystemWindows to avoid making extra white space above action bar and below status bar
Use setToolbar method from utils to setToolbar |
@angmas1 actually, I do import setToolbar from Utils file and do use it. Which part of the PR are you mentioning to? Thanks! |
if (thisActivity is AppCompatActivity) { | ||
if (Math.abs(offset) == appBarLayout.getTotalScrollRange()) { | ||
rootView.detailsHeader.isVisible = false | ||
thisActivity.supportActionBar?.title = event.name |
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.
I was referring to this part. Never mind, I will send a PR to fix this.
Details:
Fixes: #1488
Screenshots for the change:

