Loading packages/SystemUI/res-keyguard/layout/bubble_clock.xml +14 −2 Original line number Diff line number Diff line Loading @@ -19,9 +19,21 @@ android:layout_width="match_parent" android:layout_height="match_parent" > <include <TextClock android:id="@+id/digital_clock" layout="@layout/text_clock" android:layout_marginLeft="20dp" android:layout_marginTop="72dp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top|left" android:textSize="44dp" android:letterSpacing="0.05" android:textColor="?attr/wallpaperTextColor" android:singleLine="true" style="@style/widget_big" android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" android:elegantTextHeight="false" /> <com.android.keyguard.clock.ImageClock android:id="@+id/analog_clock" Loading packages/SystemUI/res-keyguard/layout/stretchanalog_clock.xml +14 −2 Original line number Diff line number Diff line Loading @@ -19,9 +19,21 @@ android:layout_width="match_parent" android:layout_height="match_parent" > <include <TextClock android:id="@+id/digital_clock" layout="@layout/text_clock" android:layout_marginLeft="20dp" android:layout_marginTop="72dp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top|left" android:textSize="44dp" android:letterSpacing="0.05" android:textColor="?attr/wallpaperTextColor" android:singleLine="true" style="@style/widget_big" android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" android:elegantTextHeight="false" /> <com.android.keyguard.clock.StretchAnalogClock android:id="@+id/analog_clock" Loading packages/SystemUI/src/com/android/keyguard/clock/ClockLayout.java +4 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.content.res.Resources; import android.util.AttributeSet; import android.view.View; import android.widget.FrameLayout; import android.widget.FrameLayout.LayoutParams; import com.android.keyguard.R; Loading Loading @@ -80,8 +81,9 @@ public class ClockLayout extends FrameLayout { // Put digital clock in two left corner of the screen. if (mDigitalClock != null) { mDigitalClock.setX(0.1f * getWidth() + offsetX); mDigitalClock.setY(0.1f * getHeight() + offsetY); LayoutParams params = (LayoutParams) mDigitalClock.getLayoutParams(); mDigitalClock.setX(offsetX + params.leftMargin); mDigitalClock.setY(offsetY + params.topMargin); } // Put the analog clock in the middle of the screen. Loading Loading
packages/SystemUI/res-keyguard/layout/bubble_clock.xml +14 −2 Original line number Diff line number Diff line Loading @@ -19,9 +19,21 @@ android:layout_width="match_parent" android:layout_height="match_parent" > <include <TextClock android:id="@+id/digital_clock" layout="@layout/text_clock" android:layout_marginLeft="20dp" android:layout_marginTop="72dp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top|left" android:textSize="44dp" android:letterSpacing="0.05" android:textColor="?attr/wallpaperTextColor" android:singleLine="true" style="@style/widget_big" android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" android:elegantTextHeight="false" /> <com.android.keyguard.clock.ImageClock android:id="@+id/analog_clock" Loading
packages/SystemUI/res-keyguard/layout/stretchanalog_clock.xml +14 −2 Original line number Diff line number Diff line Loading @@ -19,9 +19,21 @@ android:layout_width="match_parent" android:layout_height="match_parent" > <include <TextClock android:id="@+id/digital_clock" layout="@layout/text_clock" android:layout_marginLeft="20dp" android:layout_marginTop="72dp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top|left" android:textSize="44dp" android:letterSpacing="0.05" android:textColor="?attr/wallpaperTextColor" android:singleLine="true" style="@style/widget_big" android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" android:elegantTextHeight="false" /> <com.android.keyguard.clock.StretchAnalogClock android:id="@+id/analog_clock" Loading
packages/SystemUI/src/com/android/keyguard/clock/ClockLayout.java +4 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.content.res.Resources; import android.util.AttributeSet; import android.view.View; import android.widget.FrameLayout; import android.widget.FrameLayout.LayoutParams; import com.android.keyguard.R; Loading Loading @@ -80,8 +81,9 @@ public class ClockLayout extends FrameLayout { // Put digital clock in two left corner of the screen. if (mDigitalClock != null) { mDigitalClock.setX(0.1f * getWidth() + offsetX); mDigitalClock.setY(0.1f * getHeight() + offsetY); LayoutParams params = (LayoutParams) mDigitalClock.getLayoutParams(); mDigitalClock.setX(offsetX + params.leftMargin); mDigitalClock.setY(offsetY + params.topMargin); } // Put the analog clock in the middle of the screen. Loading