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