Merge "Use fixed height for small clock view position large clock" into udc-dev
This commit is contained in:
@@ -28,9 +28,10 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/lockscreen_clock_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/small_clock_height"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:clipChildren="false"
|
||||
android:paddingStart="@dimen/clock_padding_start"
|
||||
android:visibility="invisible" />
|
||||
<FrameLayout
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
<dimen name="num_pad_key_margin_end">12dp</dimen>
|
||||
|
||||
<!-- additional offset for clock switch area items -->
|
||||
<dimen name="small_clock_height">114dp</dimen>
|
||||
<dimen name="clock_padding_start">28dp</dimen>
|
||||
<dimen name="below_clock_padding_start">32dp</dimen>
|
||||
<dimen name="below_clock_padding_end">16dp</dimen>
|
||||
|
||||
@@ -390,6 +390,13 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
|
||||
PropertyAnimator.setProperty(mStatusArea, AnimatableProperty.TRANSLATION_X,
|
||||
x, props, animate);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void updateKeyguardStatusViewOffset() {
|
||||
// updateClockTargetRegions will call onTargetRegionChanged
|
||||
// which will require the correct translationY property of keyguardStatusView after updating
|
||||
mView.updateClockTargetRegions();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -172,11 +172,15 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
|
||||
* Update position of the view with an optional animation
|
||||
*/
|
||||
public void updatePosition(int x, int y, float scale, boolean animate) {
|
||||
float oldY = mView.getY();
|
||||
PropertyAnimator.setProperty(mView, AnimatableProperty.Y, y, CLOCK_ANIMATION_PROPERTIES,
|
||||
animate);
|
||||
|
||||
mKeyguardClockSwitchController.updatePosition(x, scale, CLOCK_ANIMATION_PROPERTIES,
|
||||
animate);
|
||||
if (oldY != y) {
|
||||
mKeyguardClockSwitchController.updateKeyguardStatusViewOffset();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user