Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fenix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This project is archived. Its data is
read-only
.
Show more breadcrumbs
The Tor Project
Applications
fenix
Commits
f61219e9
Commit
f61219e9
authored
Sep 28, 2020
by
Matthew Finkel
Browse files
Options
Downloads
Patches
Plain Diff
fixup! Bug 40028: Implement new home screen
parent
2e5d5aed
Branches
Branches containing commit
No related tags found
1 merge request
!26
Bug 40041 09
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
+33
-8
33 additions, 8 deletions
app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
with
33 additions
and
8 deletions
app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
+
33
−
8
View file @
f61219e9
...
...
@@ -379,14 +379,31 @@ class HomeFragment : Fragment() {
view
?.
sessionControlRecyclerView
?.
apply
{
(
layoutParams
as
ViewGroup
.
MarginLayoutParams
).
setMargins
(
0
,
0
,
0
,
60
)
}
view
?.
homeAppBar
?.
apply
{
view
?.
toolbarLayout
?.
apply
{
visibility
=
View
.
VISIBLE
children
.
forEach
{
(
it
.
layoutParams
as
AppBarLayout
.
LayoutParams
).
scrollFlags
=
if
(
onboarding
.
userHasBeenOnboarded
())
{
AppBarLayout
.
LayoutParams
.
SCROLL_FLAG_NO_SCROLL
// If the Layout rendering pass was completed, then we have a |height| value,
// if it wasn't completed then we have 0.
if
(
height
==
0
)
{
// Set the bottom margin after the toolbar height is defined during Layout
doOnLayout
{
val
toolbarLayoutHeight
=
view
.
toolbarLayout
.
height
view
.
sessionControlRecyclerView
?.
apply
{
(
layoutParams
as
ViewGroup
.
MarginLayoutParams
).
setMargins
(
0
,
0
,
0
,
toolbarLayoutHeight
-
SESSION_CONTROL_VIEW_PADDING
)
}
}
}
else
{
AppBarLayout
.
LayoutParams
.
SCROLL_FLAG_SCROLL
view
.
sessionControlRecyclerView
?.
apply
{
(
layoutParams
as
ViewGroup
.
MarginLayoutParams
).
setMargins
(
0
,
0
,
0
,
height
-
SESSION_CONTROL_VIEW_PADDING
)
}
}
}
...
...
@@ -398,8 +415,16 @@ class HomeFragment : Fragment() {
View
.
GONE
}
}
view
?.
toolbarLayout
?.
apply
{
view
?.
homeAppBar
?.
apply
{
visibility
=
View
.
VISIBLE
children
.
forEach
{
(
it
.
layoutParams
as
AppBarLayout
.
LayoutParams
).
scrollFlags
=
if
(
onboarding
.
userHasBeenOnboarded
())
{
AppBarLayout
.
LayoutParams
.
SCROLL_FLAG_NO_SCROLL
}
else
{
AppBarLayout
.
LayoutParams
.
SCROLL_FLAG_SCROLL
}
}
}
}
}
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment