Skip to content

Commit 66b6aa6

Browse files
committed
fix: Center notification popups for phone layout
1 parent 021d410 commit 66b6aa6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/src/main/java/cu/axel/smartdock/services/NotificationService.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ class NotificationService : NotificationListenerService(), OnNotificationClickLi
9090
else
9191
dockHeight) + margins
9292
notificationLayoutParams.x = margins
93-
notificationLayoutParams.gravity = Gravity.BOTTOM or Gravity.END
93+
notificationLayoutParams.gravity = Gravity.BOTTOM or if (sharedPreferences.getInt(
94+
"dock_layout",
95+
-1
96+
) == 0
97+
) Gravity.CENTER_HORIZONTAL else Gravity.END
9498
notificationLayoutParams.y = y
9599
notificationLayout = LayoutInflater.from(this).inflate(
96100
R.layout.notification_entry,

0 commit comments

Comments
 (0)