Skip to content

Commit

Permalink
feat: configuration options for vertical clock widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed Feb 8, 2025
1 parent 8cdd802 commit aed3f4d
Show file tree
Hide file tree
Showing 12 changed files with 642 additions and 533 deletions.
10 changes: 9 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />

Expand All @@ -28,6 +29,13 @@
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</activity>
<activity
android:name=".presentation.widgets.VerticalClockWidgetConfig"
android:exported="false">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</activity>
<activity
android:name=".presentation.widgets.AnalogClockWidgetConfig"
android:exported="false">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
package com.bnyro.clock.domain.model

data class DigitalClockWidgetOptions(
data class ClockWidgetOptions(
var showDate: Boolean = true,
var showTime: Boolean = true,
var dateTextSize: Float = DEFAULT_DATE_TEXT_SIZE,
var timeTextSize: Float = DEFAULT_TIME_TEXT_SIZE,
var timeZone: String? = null,
var timeZoneName: String = "",
var showBackground: Boolean = true
var showBackground: Boolean = true,
var dateTextSize: Float,
var timeTextSize: Float,
) {
companion object {
const val DEFAULT_DATE_TEXT_SIZE = 16f
const val DEFAULT_TIME_TEXT_SIZE = 52f

val dateSizeOptions = listOf(
12f,
16f,
Expand All @@ -34,7 +31,12 @@ data class DigitalClockWidgetOptions(
68f,
72f,
76f,
80f
80f,
84f,
88f,
92f,
96f,
100f
)
}
}
Loading

0 comments on commit aed3f4d

Please sign in to comment.