Smartspace - Align large clock
The large clock was not properly set below the new smartspace when the plugin was activiated. Fix that. Fixes: 185226009 Test: atest KeyguardClockSwitchControllerTest Change-Id: Ib9c1f837128524b8a896ed12eee7b70cc145ec28
This commit is contained in:
@@ -188,6 +188,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
|
||||
mSmartspaceView.registerDataProvider(plugin);
|
||||
View asView = (View) mSmartspaceView;
|
||||
|
||||
// Place plugin view below normal clock...
|
||||
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
|
||||
MATCH_PARENT, WRAP_CONTENT);
|
||||
lp.addRule(RelativeLayout.BELOW, R.id.lockscreen_clock_view);
|
||||
@@ -197,6 +198,11 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
|
||||
.getDimensionPixelSize(R.dimen.below_clock_padding_start);
|
||||
asView.setPadding(padding, 0, padding, 0);
|
||||
|
||||
// ... but above the large clock
|
||||
lp = new RelativeLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT);
|
||||
lp.addRule(RelativeLayout.BELOW, asView.getId());
|
||||
mLargeClockFrame.setLayoutParams(lp);
|
||||
|
||||
View nic = mView.findViewById(
|
||||
com.android.systemui.R.id.left_aligned_notification_icon_container);
|
||||
lp = (RelativeLayout.LayoutParams) nic.getLayoutParams();
|
||||
@@ -219,6 +225,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
|
||||
nic.getLayoutParams();
|
||||
lp.addRule(RelativeLayout.BELOW, R.id.keyguard_status_area);
|
||||
nic.setLayoutParams(lp);
|
||||
mLargeClockFrame.setLayoutParams(lp);
|
||||
|
||||
mSmartspaceView = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user