修复部分机型时间居中+图标居左横屏FC

This commit is contained in:
LittleTurtle2333
2022-03-31 16:59:45 +08:00
parent c02d9e1874
commit 176682fa38

View File

@@ -305,8 +305,8 @@ object StatusBarLayout : HookRegister() {
(statusIcons.parent as ViewGroup).removeView(statusIcons) (statusIcons.parent as ViewGroup).removeView(statusIcons)
(systemIcons.parent as ViewGroup).removeView(systemIcons) (systemIcons.parent as ViewGroup).removeView(systemIcons)
(battery.parent as ViewGroup).removeView(battery) (battery.parent as ViewGroup).removeView(battery)
(notificationIconAreaInner.parent as ViewGroup).removeView( (fullscreenNotificationIconArea.parent as ViewGroup).removeView(
notificationIconAreaInner fullscreenNotificationIconArea
) )
val mConstraintLayout = val mConstraintLayout =
@@ -317,7 +317,7 @@ object StatusBarLayout : HookRegister() {
) )
} }
mConstraintLayout.addView(notificationIconAreaInner) mConstraintLayout.addView(fullscreenNotificationIconArea)
mConstraintLayout.addView(battery) mConstraintLayout.addView(battery)
@@ -329,14 +329,14 @@ object StatusBarLayout : HookRegister() {
} }
notificationIconAreaInner.layoutParams = ConstraintLayout.LayoutParams( fullscreenNotificationIconArea.layoutParams = ConstraintLayout.LayoutParams(
0, 0,
ConstraintLayout.LayoutParams.MATCH_PARENT ConstraintLayout.LayoutParams.MATCH_PARENT
).also { ).also {
it.startToEnd = batteryId it.startToEnd = batteryId
it.endToEnd = 0 it.endToEnd = 0
} }
notificationIconAreaInner.layoutDirection = View.LAYOUT_DIRECTION_RTL fullscreenNotificationIconArea.layoutDirection = View.LAYOUT_DIRECTION_RTL
//增加一个左对齐布局 //增加一个左对齐布局