Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
f6096946
Commit
f6096946
authored
Jul 11, 2022
by
fengquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 图片/视频浏览页状态栏颜色
parent
cbc5b96c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
GPreviewActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/preview/GPreviewActivity.kt
+6
-9
No files found.
m-consultant/src/main/java/com/yidianling/consultant/preview/GPreviewActivity.kt
View file @
f6096946
...
...
@@ -14,6 +14,7 @@ import androidx.fragment.app.Fragment
import
androidx.fragment.app.FragmentManager
import
androidx.fragment.app.FragmentStatePagerAdapter
import
androidx.viewpager.widget.ViewPager
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.yidianling.consultant.R
import
com.yidianling.consultant.preview.GPreviewBuilder.IndicatorType
import
com.yidianling.consultant.preview.SmoothImageView.onTransformListener
...
...
@@ -55,21 +56,17 @@ class GPreviewActivity : AppCompatActivity() {
super
.
onCreate
(
savedInstanceState
)
initData
()
setContentView
(
R
.
layout
.
consultant_image_preview_photo
)
setWindowStatusBarColor
()
initView
()
initStatusBar
()
}
/**
* 初始化状态栏位置
*/
private
fun
initStatusBar
()
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
M
)
{
window
?.
clearFlags
(
WindowManager
.
LayoutParams
.
FLAG_TRANSLUCENT_STATUS
)
window
?.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
)
window
?.
statusBarColor
=
Color
.
WHITE
window
?.
decorView
?.
systemUiVisibility
=
View
.
SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
}
private
fun
setWindowStatusBarColor
()
{
StatusBarUtils
.
Companion
.
setWindowStatusBarColor
(
this
,
R
.
color
.
black
)
StatusBarUtils
.
Companion
.
setStatusBarLightMode
(
this
,
false
)
}
private
fun
initView
()
{
...
...
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