diff --git a/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/assets/fonts/BebasKai.otf b/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/assets/fonts/BebasKai.otf
new file mode 100755
index 0000000..b404b41
Binary files /dev/null and b/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/assets/fonts/BebasKai.otf differ
diff --git a/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/font/BebasKai.otf b/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/font/BebasKai.otf
new file mode 100755
index 0000000..b404b41
Binary files /dev/null and b/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/font/BebasKai.otf differ
diff --git a/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/font/clock.ttf b/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/font/clock.ttf
new file mode 100755
index 0000000..0243c92
Binary files /dev/null and b/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/font/clock.ttf differ
diff --git a/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/layout/digital_widget.xml b/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/layout/digital_widget.xml
index 2643eb4..f3d6f4e 100755
--- a/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/layout/digital_widget.xml
+++ b/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/layout/digital_widget.xml
@@ -26,19 +26,19 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top">
-
+ <!--modify by luoyalong 20210713 for modify deskclock widget style begin-->
<TextClock
android:id="@+id/date"
- style="@style/widget_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="none"
+ android:fontFamily="@font/BebasKai"
android:includeFontPadding="false"
android:singleLine="true"
android:textAllCaps="true"
android:textColor="@color/white" />
-
+ <!--modify by luoyalong 20210713 for modify deskclock widget style end-->
<ImageView
android:id="@+id/nextAlarmIcon"
android:layout_width="wrap_content"
@@ -60,6 +60,7 @@
android:textColor="@color/white" />
</LinearLayout>
+ <!--modify by luoyalong 20210713 for modify deskclock widget style begin-->
<TextClock
android:id="@+id/clock"
style="@style/widget_big_thin"
@@ -67,12 +68,13 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top"
android:ellipsize="none"
- android:textStyle ="bold"
+ android:fontFamily="@font/BebasKai"
android:format12Hour="@string/lock_screen_12_hour_format"
android:format24Hour="@string/lock_screen_24_hour_format"
android:includeFontPadding="false"
android:singleLine="true"
android:textColor="@color/white" />
+ <!--modify by luoyalong 20210713 for modify deskclock widget style end-->
<!--modify by luoyalong 20210708 modify clock style end-->
<ListView
android:id="@+id/world_city_list"
diff --git a/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/values-sw600dp/dimens.xml b/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/values-sw600dp/dimens.xml
old mode 100644
new mode 100755
index fc8f48b..1ab52d4
--- a/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/values-sw600dp/dimens.xml
+++ b/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/values-sw600dp/dimens.xml
@@ -59,7 +59,7 @@
<dimen name="min_analog_widget_size">170dp</dimen>
<!-- digital widget sizing information -->
- <dimen name="min_digital_widget_width">300dp</dimen>
+ <dimen name="min_digital_widget_width">1400dp</dimen><!--modify by luoyalong 20210713 for modify deskclock widget style--><!--时钟微件在屏幕中最小宽度-->
<dimen name="min_digital_widget_height">170dp</dimen>
<dimen name="digital_widget_city_margin_bottom">15dp</dimen>
<dimen name="digital_widget_city_12_medium_font_size">52sp</dimen>
diff --git a/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/values/dimens.xml b/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/res/values/dimens.xml
old mode 100644
new mode 100755
diff --git a/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/src/com/android/alarm
index cba63f7..81db112 100755
--- a/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/src/com/android/alarmclock/DigitalAppWidgetProvider.java
+++ b/sprd/vendor/sprd/platform/packages/apps/SprdDeskClock/src/com/android/alarmclock/DigitalAppWidgetProvider.java
@@ -107,7 +107,6 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
/** Intent used to deliver the {@link #ACTION_ON_DAY_CHANGE} callback. */
private static final Intent DAY_CHANGE_INTENT = new Intent(ACTION_ON_DAY_CHANGE);
-
@Override
public void onEnabled(Context context) {
super.onEnabled(context);
@@ -224,7 +223,6 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
final CharSequence dateFormat = getDateFormat(context);
rv.setCharSequence(R.id.date, "setFormat12Hour", dateFormat);
rv.setCharSequence(R.id.date, "setFormat24Hour", dateFormat);
-
final String nextAlarmTime = Utils.getNextAlarm(context);
if (TextUtils.isEmpty(nextAlarmTime)) {
rv.setViewVisibility(R.id.nextAlarm, GONE);
@@ -263,9 +261,11 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
// Apply the computed sizes to the remote views.
rv.setImageViewBitmap(R.id.nextAlarmIcon, sizes.mIconBitmap);
//modify by luoyalong 20210708 modify clock style begin
- rv.setTextViewTextSize(R.id.date, COMPLEX_UNIT_PX, (sizes.mFontSizePx*3)/2);
+ //modify by luoyalong 20210713 for modify deskclock widget style begin
+ rv.setTextViewTextSize(R.id.date, COMPLEX_UNIT_PX, sizes.mFontSizePx*2);
rv.setTextViewTextSize(R.id.nextAlarm, COMPLEX_UNIT_PX, sizes.mFontSizePx);
- rv.setTextViewTextSize(R.id.clock, COMPLEX_UNIT_PX, (sizes.mClockFontSizePx/3)*2);
+ rv.setTextViewTextSize(R.id.clock, COMPLEX_UNIT_PX, sizes.mClockFontSizePx);
+ //modify by luoyalong 20210713 for modify deskclock widget style end
sprd安卓11 修改桌面时钟小部件字体样式,布局大小
最新推荐文章于 2023-06-29 10:18:27 发布