刘海屏适配
This commit is contained in:
parent
88e5f4b0df
commit
cf3ee52e68
@ -7,19 +7,17 @@ local DESIGN_HEIGHT = 1280
|
|||||||
|
|
||||||
-- 获取刘海高度
|
-- 获取刘海高度
|
||||||
function SafeAreaManager:getNotchScreenHeight()
|
function SafeAreaManager:getNotchScreenHeight()
|
||||||
-- local notchHeight = CS.BF.SafeAreaManager.GetNotchScreenHeight()
|
local notchHeight = CS.BF.SafeAreaManager.GetNotchScreenHeight()
|
||||||
-- local width, height = GFunc.getScreenSize()
|
local width, height = GFunc.getScreenSize()
|
||||||
-- local sw = width / DESIGN_WIDTH -- 0.64
|
local sw = width / DESIGN_WIDTH -- 0.64
|
||||||
-- local sh = height / DESIGN_HEIGHT -- 0.52
|
local sh = height / DESIGN_HEIGHT -- 0.52
|
||||||
-- local minScale = 1
|
local minScale = 1
|
||||||
-- if sw < sh then
|
if sw < sh then
|
||||||
-- minScale = sw
|
minScale = sw
|
||||||
-- else
|
else
|
||||||
-- minScale = sh
|
minScale = sh
|
||||||
-- end
|
end
|
||||||
-- return notchHeight / minScale
|
return notchHeight / minScale
|
||||||
-- 此项目不用处理刘海屏适配
|
|
||||||
return 0
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return SafeAreaManager
|
return SafeAreaManager
|
||||||
Loading…
x
Reference in New Issue
Block a user