Fix spacing between clock and date
The clock doesn't need a min width since it's no longer clickable. Instead, make sure that there's correct margin to the left of the date. Test: manual Fixes: 194302524 Change-Id: I7ec7912ca1db34b8f16f3d8676dc810b1e65177c Merged-In: I7ec7912ca1db34b8f16f3d8676dc810b1e65177c
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
android:id="@+id/clock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:minWidth="48dp"
|
||||
android:minHeight="48dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:paddingStart="@dimen/status_bar_left_clock_starting_padding"
|
||||
@@ -51,6 +50,7 @@
|
||||
android:id="@+id/date_clock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/status_bar_left_clock_end_padding"
|
||||
android:gravity="center_vertical|start"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.QS.Status"
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<dimen name="status_bar_left_clock_starting_padding">0dp</dimen>
|
||||
|
||||
<!-- End padding for left-aligned status bar clock -->
|
||||
<dimen name="status_bar_left_clock_end_padding">7dp</dimen>
|
||||
<dimen name="status_bar_left_clock_end_padding">2dp</dimen>
|
||||
|
||||
<!-- Spacing after the wifi signals that is present if there are any icons following it. -->
|
||||
<dimen name="status_bar_wifi_signal_spacer_width">2.5dp</dimen>
|
||||
|
||||
@@ -277,6 +277,25 @@ public class QuickStatusBarHeader extends FrameLayout {
|
||||
updateBatteryMode();
|
||||
updateHeadersPadding();
|
||||
updateAnimators();
|
||||
|
||||
updateClockDatePadding();
|
||||
}
|
||||
|
||||
private void updateClockDatePadding() {
|
||||
int startPadding = mContext.getResources()
|
||||
.getDimensionPixelSize(R.dimen.status_bar_left_clock_starting_padding);
|
||||
int endPadding = mContext.getResources()
|
||||
.getDimensionPixelSize(R.dimen.status_bar_left_clock_end_padding);
|
||||
mClockView.setPaddingRelative(
|
||||
startPadding,
|
||||
mClockView.getPaddingTop(),
|
||||
endPadding,
|
||||
mClockView.getPaddingBottom()
|
||||
);
|
||||
|
||||
MarginLayoutParams lp = (MarginLayoutParams) mClockDateView.getLayoutParams();
|
||||
lp.setMarginStart(endPadding);
|
||||
mClockDateView.setLayoutParams(lp);
|
||||
}
|
||||
|
||||
private void updateAnimators() {
|
||||
|
||||
Reference in New Issue
Block a user