mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-19 01:43:55 +00:00
fix: default bitmap width/height
This commit is contained in:
@@ -85,8 +85,13 @@ class UpcomingWidget : AppWidgetProvider() {
|
||||
) as GradientDrawable
|
||||
gradientDrawable.colors = intArrayOf(backgroundColor, backgroundFade)
|
||||
val widgetSizeProvider = WidgetSizeProvider(context)
|
||||
val (width, height) = widgetSizeProvider.getWidgetsSize(appWidgetId)
|
||||
gradientDrawable.cornerRadius = 50f
|
||||
var (width, height) = widgetSizeProvider.getWidgetsSize(appWidgetId)
|
||||
if (width > 0 && height > 0) {
|
||||
gradientDrawable.cornerRadius = 50f
|
||||
} else {
|
||||
width = 300
|
||||
height = 300
|
||||
}
|
||||
|
||||
val intentTemplate = Intent(context, MainActivity::class.java)
|
||||
intentTemplate.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
|
||||
Reference in New Issue
Block a user