Merge "Smartspace padding for AOD/LS" into sc-dev am: 2e281d0225
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14750294 Change-Id: I05be555962a249ed0e2a47d708394b2eb8ea408d
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/notification_shelf_height"
|
||||
android:layout_below="@id/keyguard_status_area"
|
||||
android:paddingStart="@dimen/below_clock_padding_start_extra"
|
||||
android:paddingStart="@dimen/below_clock_padding_start_icons"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
</com.android.keyguard.KeyguardClockSwitch>
|
||||
|
||||
@@ -94,5 +94,6 @@
|
||||
<!-- additional offset for clock switch area items -->
|
||||
<dimen name="clock_padding_start">28dp</dimen>
|
||||
<dimen name="below_clock_padding_start">32dp</dimen>
|
||||
<dimen name="below_clock_padding_start_extra">36dp</dimen>
|
||||
<dimen name="below_clock_padding_end">16dp</dimen>
|
||||
<dimen name="below_clock_padding_start_icons">28dp</dimen>
|
||||
</resources>
|
||||
|
||||
@@ -183,9 +183,11 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
|
||||
lp.addRule(RelativeLayout.BELOW, R.id.lockscreen_clock_view);
|
||||
|
||||
mView.addView(mSmartspaceView, ksaIndex, lp);
|
||||
int padding = getContext().getResources()
|
||||
int startPadding = getContext().getResources()
|
||||
.getDimensionPixelSize(R.dimen.below_clock_padding_start);
|
||||
mSmartspaceView.setPadding(padding, 0, padding, 0);
|
||||
int endPadding = getContext().getResources()
|
||||
.getDimensionPixelSize(R.dimen.below_clock_padding_end);
|
||||
mSmartspaceView.setPaddingRelative(startPadding, 0, endPadding, 0);
|
||||
|
||||
// ... but above the large clock
|
||||
lp = new RelativeLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT);
|
||||
|
||||
Reference in New Issue
Block a user