Skip to content

Commit

Permalink
Improved clock bottom margin for notifications positioning.
Browse files Browse the repository at this point in the history
Signed-off-by: DHD2280 <[email protected]>
  • Loading branch information
DHD2280 committed Jan 23, 2025
1 parent eb02d47 commit d7ca577
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Th
mLockscreenView.setKeyguardLockHeight(keyguardLockHeight);
int clockHeight = mLockscreenView.getFullHeight();
XposedBridge.log("lockIconViewController Height: " + height + " Custom Clock Height: " + clockHeight);
mLockscreenView.updateClockMargins(keyguardLockHeight + dp2px(mContext, topMargin), bottomMargin);
param.setResult((int) (height + clockHeight));
mLockscreenView.updateClockMargins(keyguardLockHeight + dp2px(mContext, topMargin));
param.setResult((int) (height + clockHeight - dp2px(mContext, bottomMargin)));
});

ReflectedClass OplusKeyguardStyleBaseClock = ReflectedClass.of("com.oplus.keyguard.OplusKeyguardStyleBaseClock");
Expand Down Expand Up @@ -451,7 +451,7 @@ private void createCustomClockView() {
clockView.setTag(OC_LOCKSCREEN_CLOCK_TAG);
modifyClockView(clockView);
mLockscreenView.setClockView(clockView);
mLockscreenView.updateClockMargins(keyguardLockHeight + dp2px(mContext, topMargin), bottomMargin);
mLockscreenView.updateClockMargins(keyguardLockHeight + dp2px(mContext, topMargin));
}

// Broadcast receiver for updating clock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ public void setClockView(View clockView) {
mClockContainer.addView(mClockView);
}

public void updateClockMargins(int top, int bottom) {
setMarginsNoConvert(mClockContainer, mContext, 0, top, 0, dp2px(mContext, bottom));
public void updateClockMargins(int top) {
setMarginsNoConvert(mClockContainer, mContext, 0, top, 0, 0);
}

public int getClockHeight() {
Expand Down

0 comments on commit d7ca577

Please sign in to comment.