diff options
author | Beverly <beverlyt@google.com> | 2020-11-16 15:07:42 -0500 |
---|---|---|
committer | Beverly Tai <beverlyt@google.com> | 2020-11-17 19:32:00 +0000 |
commit | 741c6e367d36c52fd3456bcc1547f72f4c9f3833 (patch) | |
tree | 256b95527bccd2d70051af24c911975f2bd7d514 /packages/SystemUI/src/com/android/keyguard/KeyguardSliceViewController.java | |
parent | 192b7c9eaabd746ebdedb306a5a93d8740716d22 (diff) |
Update spacing/layout of LS clock
- Only use the burn-in offsets on AOD. This means the clock will be in a
different position on LS compared to AOD.
- Align the top of the KeyguardSliceView (smart space) with the top of
the text of the clock (as opposed dto the top of the clock's view)
- Decrease bottom padding on KeyguardSliceTextView so that the DND icon
doesn't get cutoff when there's a large smart space info
Test: atest SystemUITests, manual
Bug: 170228350
Change-Id: I332300616e4218b6fcd24f837127a7eee487d4e7
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardSliceViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardSliceViewController.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceViewController.java index 02b18b28a5ea..1b0a7faeddab 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceViewController.java @@ -26,6 +26,7 @@ import android.provider.Settings; import android.util.Log; import android.view.Display; import android.view.View; +import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.lifecycle.LiveData; @@ -148,6 +149,12 @@ public class KeyguardSliceViewController extends ViewController<KeyguardSliceVie KeyguardSliceViewController.this.hashCode())); } + void updateTopMargin(float clockTopTextPadding) { + ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) mView.getLayoutParams(); + lp.topMargin = (int) clockTopTextPadding; + mView.setLayoutParams(lp); + } + /** * Updates the lockscreen mode which may change the layout of the keyguard slice view. */ |