Skip to content

Conversation

@anhanh11001
Copy link
Contributor

Details:

  • Load event image into the view
  • Set title bar to event name or "" when appBarLayout is collapsed or expanded

Fixes: #1488

Screenshots for the change:

@anhanh11001
Copy link
Contributor Author

@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>
Copy link
Member

@liveHarshit liveHarshit Apr 2, 2019

Choose a reason for hiding this comment

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

wrong review

Copy link
Contributor Author

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?

Copy link
Member

@liveHarshit liveHarshit left a 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 = ""
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

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

Updates?

Copy link
Contributor Author

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

Copy link
Contributor Author

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
Details:
- Reduce thisActivity variable cast
- Remove unused code
- Set fitSystemWindows to avoid making extra white space above action bar and below status bar
@angmas1
Copy link
Contributor

angmas1 commented Apr 4, 2019

Use setToolbar method from utils to setToolbar

@anhanh11001
Copy link
Contributor Author

@angmas1 actually, I do import setToolbar from Utils file and do use it. Which part of the PR are you mentioning to? Thanks!

@iamareebjamal iamareebjamal added this to the v0.2.0 milestone Apr 5, 2019
@iamareebjamal iamareebjamal merged commit b8caddb into fossasia:development Apr 5, 2019
if (thisActivity is AppCompatActivity) {
if (Math.abs(offset) == appBarLayout.getTotalScrollRange()) {
rootView.detailsHeader.isVisible = false
thisActivity.supportActionBar?.title = event.name
Copy link
Contributor

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.

@anhanh11001 anhanh11001 deleted the 1488_horizontal_event_detail branch June 20, 2019 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants