Smartspace padding for AOD/LS

Update spacing, specifically to match the end padding for the
smartspace container. Reduce padding for the icon shelf to match
incoming changes for smartspace

Bug: 189363380
Test: manual
Change-Id: I82030e21cd5b77424b30dc3c634d01c73beac148
This commit is contained in:
Matt Pietal
2021-05-27 15:22:24 -04:00
parent 14016d39a6
commit ba57dba13b
3 changed files with 7 additions and 4 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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);