Merge "Smartspace padding for AOD/LS" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-05-27 21:27:43 +00:00
committed by Android (Google) Code Review
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);