Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_boost_1.22.4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李增强
flutter_boost_1.22.4
Commits
67a11880
Commit
67a11880
authored
Mar 30, 2020
by
justin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
沉浸模式
parent
f56f4e6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
android/src/main/java/com/idlefish/flutterboost/containers/FlutterFragment.java
...com/idlefish/flutterboost/containers/FlutterFragment.java
+11
-3
No files found.
android/src/main/java/com/idlefish/flutterboost/containers/FlutterFragment.java
View file @
67a11880
package
com.idlefish.flutterboost.containers
;
import
android.app.Activity
;
import
android.graphics.Color
;
import
android.view.*
;
import
androidx.lifecycle.Lifecycle
;
import
android.content.Context
;
import
android.content.Intent
;
...
...
@@ -10,9 +12,6 @@ import androidx.annotation.NonNull;
import
androidx.annotation.Nullable
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentActivity
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
com.idlefish.flutterboost.FlutterBoost
;
import
com.idlefish.flutterboost.XFlutterView
;
...
...
@@ -253,8 +252,17 @@ public class FlutterFragment extends Fragment implements FlutterActivityAndFragm
@Nullable
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
@Nullable
ViewGroup
container
,
@Nullable
Bundle
savedInstanceState
)
{
configureStatusBarForFullscreenFlutterExperience
();
return
delegate
.
onCreateView
(
inflater
,
container
,
savedInstanceState
);
}
private
void
configureStatusBarForFullscreenFlutterExperience
()
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
Window
window
=
this
.
getActivity
().
getWindow
();
window
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
);
window
.
setStatusBarColor
(
Color
.
TRANSPARENT
);
window
.
getDecorView
().
setSystemUiVisibility
(
PlatformPlugin
.
DEFAULT_SYSTEM_UI
|
View
.
SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
);
}
}
@Override
public
void
onStart
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment