Skip to content

Commit

Permalink
Self review
Browse files Browse the repository at this point in the history
  • Loading branch information
XanderZhu committed Jul 23, 2024
1 parent 2aa7eb2 commit bbdba81
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ class GamificationToolbarDelegate(
)
}

@Suppress("MagicNumber")
private fun applyInsetsToCollapsingToolbarLayout(
context: Context,
collapsingToolbarLayout: CollapsingToolbarLayout,
Expand Down Expand Up @@ -203,12 +204,13 @@ class GamificationToolbarDelegate(
collapsingToolbarLayout.updateLayoutParams<AppBarLayout.LayoutParams> {
height =
if (subtitle != null) {
context.resources.getDimensionPixelOffset(R.dimen.gamification_toolbar_with_subtitle_height) +
subtitlePaddingVertical
context.resources.getDimensionPixelOffset(
R.dimen.gamification_toolbar_with_subtitle_height
) + subtitlePaddingVertical
} else {
R.dimen.gamification_toolbar_default_height
} + insetTop
}
collapsingToolbarLayout.expandedTitleMarginTop = insetTop + subtitlePaddingVertical * 3
collapsingToolbarLayout.expandedTitleMarginTop = insetTop + subtitlePaddingVertical
}
}

0 comments on commit bbdba81

Please sign in to comment.