Add weather icon pack, updates frequency and fix google fit
BIN
.idea/caches/build_file_checksums.ser
generated
@ -22,7 +22,7 @@ android {
|
|||||||
applicationId "com.tommasoberlose.anotherwidget"
|
applicationId "com.tommasoberlose.anotherwidget"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 87
|
versionCode 89
|
||||||
versionName "2.0.8"
|
versionName "2.0.8"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
@ -131,6 +131,7 @@
|
|||||||
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
|
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
|
||||||
<action android:name="android.intent.action.BATTERY_LOW"/>
|
<action android:name="android.intent.action.BATTERY_LOW"/>
|
||||||
<action android:name="android.intent.action.BATTERY_OKAY"/>
|
<action android:name="android.intent.action.BATTERY_OKAY"/>
|
||||||
|
<action android:name="android.intent.action.CONFIGURATION_CHANGED"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
@ -143,10 +144,6 @@
|
|||||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<meta-data
|
|
||||||
android:name="com.google.android.awareness.API_KEY"
|
|
||||||
android:value="${AWARENESS_API_KEY}"/>
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
@ -70,7 +70,7 @@ class GlanceProviderSortMenu(
|
|||||||
// move item in `fromPos` to `toPos` in adapter.
|
// move item in `fromPos` to `toPos` in adapter.
|
||||||
adapter.notifyItemMoved(fromPos, toPos)
|
adapter.notifyItemMoved(fromPos, toPos)
|
||||||
|
|
||||||
val list = GlanceProviderHelper.getGlanceProviders()
|
val list = GlanceProviderHelper.getGlanceProviders(context)
|
||||||
Collections.swap(list, fromPos, toPos)
|
Collections.swap(list, fromPos, toPos)
|
||||||
GlanceProviderHelper.saveGlanceProviderOrder(list)
|
GlanceProviderHelper.saveGlanceProviderOrder(list)
|
||||||
return true
|
return true
|
||||||
@ -87,8 +87,7 @@ class GlanceProviderSortMenu(
|
|||||||
mIth.attachToRecyclerView(view.menu)
|
mIth.attachToRecyclerView(view.menu)
|
||||||
|
|
||||||
adapter.updateData(
|
adapter.updateData(
|
||||||
GlanceProviderHelper.getGlanceProviders()
|
GlanceProviderHelper.getGlanceProviders(context)
|
||||||
.filter { it != Constants.GlanceProviderId.BATTERY_LEVEL_LOW }
|
|
||||||
.mapNotNull { GlanceProviderHelper.getGlanceProviderById(context, it) }
|
.mapNotNull { GlanceProviderHelper.getGlanceProviderById(context, it) }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -22,4 +22,15 @@ object Constants {
|
|||||||
CUSTOM_INFO("CUSTOM_INFO"),
|
CUSTOM_INFO("CUSTOM_INFO"),
|
||||||
GOOGLE_FIT_STEPS("GOOGLE_FIT_STEPS")
|
GOOGLE_FIT_STEPS("GOOGLE_FIT_STEPS")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum class WidgetUpdateFrequency(val value: Int) {
|
||||||
|
LOW(0),
|
||||||
|
DEFAULT(1),
|
||||||
|
HIGH(2)
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class WeatherIconPack(val value: Int) {
|
||||||
|
DEFAULT(0),
|
||||||
|
MINIMAL(1)
|
||||||
|
}
|
||||||
}
|
}
|
@ -40,9 +40,15 @@ object Preferences : KotprefModel() {
|
|||||||
var eventAppName by stringPref(key = "PREF_EVENT_APP_NAME", default = "")
|
var eventAppName by stringPref(key = "PREF_EVENT_APP_NAME", default = "")
|
||||||
var eventAppPackage by stringPref(key = "PREF_EVENT_APP_PACKAGE", default = "")
|
var eventAppPackage by stringPref(key = "PREF_EVENT_APP_PACKAGE", default = "")
|
||||||
var openEventDetails by booleanPref(default = true)
|
var openEventDetails by booleanPref(default = true)
|
||||||
|
|
||||||
|
var widgetUpdateFrequency by intPref(default = Constants.WidgetUpdateFrequency.DEFAULT.value)
|
||||||
|
|
||||||
var textGlobalColor by stringPref(key = "PREF_TEXT_COLOR", default = "#FFFFFF")
|
var textGlobalColor by stringPref(key = "PREF_TEXT_COLOR", default = "#FFFFFF")
|
||||||
var textGlobalAlpha by stringPref(default = "FF")
|
var textGlobalAlpha by stringPref(default = "FF")
|
||||||
|
|
||||||
|
var textSecondaryColor by stringPref(default = "#FFFFFF")
|
||||||
|
var textSecondaryAlpha by stringPref(default = "FF")
|
||||||
|
|
||||||
var backgroundCardColor by stringPref(default = "#000000")
|
var backgroundCardColor by stringPref(default = "#000000")
|
||||||
var backgroundCardAlpha by stringPref(default = "00")
|
var backgroundCardAlpha by stringPref(default = "00")
|
||||||
|
|
||||||
@ -50,6 +56,8 @@ object Preferences : KotprefModel() {
|
|||||||
var clockTextAlpha by stringPref(default = "FF")
|
var clockTextAlpha by stringPref(default = "FF")
|
||||||
var showAMPMIndicator by booleanPref(default = true)
|
var showAMPMIndicator by booleanPref(default = true)
|
||||||
|
|
||||||
|
var weatherIconPack by intPref(default = Constants.WeatherIconPack.DEFAULT.value)
|
||||||
|
|
||||||
// Global
|
// Global
|
||||||
var textMainSize by floatPref(key = "PREF_TEXT_MAIN_SIZE", default = 26f)
|
var textMainSize by floatPref(key = "PREF_TEXT_MAIN_SIZE", default = 26f)
|
||||||
var textSecondSize by floatPref(key = "PREF_TEXT_SECOND_SIZE", default = 18f)
|
var textSecondSize by floatPref(key = "PREF_TEXT_SECOND_SIZE", default = 18f)
|
||||||
|
@ -30,6 +30,31 @@ object ColorHelper {
|
|||||||
Color.parseColor("#000000")
|
Color.parseColor("#000000")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getSecondaryFontColor(): Int {
|
||||||
|
return try {
|
||||||
|
Color.parseColor("#%s%s".format(Preferences.textSecondaryAlpha, Preferences.textSecondaryColor.replace("#", "")))
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Color.parseColor("#FFFFFFFF")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getSecondaryFontColorAlpha(): Int {
|
||||||
|
return try {
|
||||||
|
Preferences.textSecondaryAlpha.toIntValue().toDouble() * 255 / 100
|
||||||
|
} catch (e: Exception) {
|
||||||
|
"FF".toIntValue().toDouble() * 255 / 100
|
||||||
|
}.roundToInt()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getSecondaryFontColorRgb(): Int {
|
||||||
|
return try {
|
||||||
|
Color.parseColor(Preferences.textSecondaryColor)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Color.parseColor("#000000")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun getClockFontColor(): Int {
|
fun getClockFontColor(): Int {
|
||||||
return try {
|
return try {
|
||||||
Color.parseColor("#%s%s".format(Preferences.clockTextAlpha, Preferences.clockTextColor.replace("#", "")))
|
Color.parseColor("#%s%s".format(Preferences.clockTextAlpha, Preferences.clockTextColor.replace("#", "")))
|
||||||
|
@ -23,7 +23,7 @@ object DateHelper {
|
|||||||
"%s, %s".format(
|
"%s, %s".format(
|
||||||
SimpleDateFormat("EEEE", Locale.getDefault()).format(date.time),
|
SimpleDateFormat("EEEE", Locale.getDefault()).format(date.time),
|
||||||
DateUtils.formatDateTime(context, date.timeInMillis, flags)
|
DateUtils.formatDateTime(context, date.timeInMillis, flags)
|
||||||
).getCapWordString()
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,6 +33,6 @@ object DateHelper {
|
|||||||
return "%s, %s".format(
|
return "%s, %s".format(
|
||||||
SimpleDateFormat("EEEE", Locale.getDefault()).format(date.time),
|
SimpleDateFormat("EEEE", Locale.getDefault()).format(date.time),
|
||||||
DateUtils.formatDateTime(context, date.timeInMillis, flags)
|
DateUtils.formatDateTime(context, date.timeInMillis, flags)
|
||||||
).getCapWordString()
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,12 +6,18 @@ import com.tommasoberlose.anotherwidget.db.EventRepository
|
|||||||
import com.tommasoberlose.anotherwidget.global.Constants
|
import com.tommasoberlose.anotherwidget.global.Constants
|
||||||
import com.tommasoberlose.anotherwidget.global.Preferences
|
import com.tommasoberlose.anotherwidget.global.Preferences
|
||||||
import com.tommasoberlose.anotherwidget.models.GlanceProvider
|
import com.tommasoberlose.anotherwidget.models.GlanceProvider
|
||||||
|
import com.tommasoberlose.anotherwidget.utils.checkIfFitInstalled
|
||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
|
|
||||||
object GlanceProviderHelper {
|
object GlanceProviderHelper {
|
||||||
fun getGlanceProviders(): ArrayList<Constants.GlanceProviderId> {
|
fun getGlanceProviders(context: Context): ArrayList<Constants.GlanceProviderId> {
|
||||||
val enabledProviders = Preferences.enabledGlanceProviderOrder.split(",").filter { it != "" }
|
val enabledProviders = Preferences.enabledGlanceProviderOrder.split(",").filter { it != "" }
|
||||||
|
|
||||||
val providers = Constants.GlanceProviderId.values()
|
val providers = Constants.GlanceProviderId.values()
|
||||||
|
.filter { it != Constants.GlanceProviderId.BATTERY_LEVEL_LOW }
|
||||||
|
.filter {
|
||||||
|
context.checkIfFitInstalled() || it != Constants.GlanceProviderId.GOOGLE_FIT_STEPS
|
||||||
|
}.toTypedArray()
|
||||||
|
|
||||||
providers.sortWith(Comparator { p1, p2 ->
|
providers.sortWith(Comparator { p1, p2 ->
|
||||||
when {
|
when {
|
||||||
|
@ -178,4 +178,15 @@ object IntentHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getFitIntent(context: Context): Intent {
|
||||||
|
val pm: PackageManager = context.packageManager
|
||||||
|
return try {
|
||||||
|
pm.getLaunchIntentForPackage("com.google.android.apps.fitness")!!.apply {
|
||||||
|
addCategory(Intent.CATEGORY_LAUNCHER)
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Intent()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -3,6 +3,8 @@ package com.tommasoberlose.anotherwidget.helpers
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.text.format.DateUtils
|
import android.text.format.DateUtils
|
||||||
import com.tommasoberlose.anotherwidget.R
|
import com.tommasoberlose.anotherwidget.R
|
||||||
|
import com.tommasoberlose.anotherwidget.global.Constants
|
||||||
|
import com.tommasoberlose.anotherwidget.global.Preferences
|
||||||
import org.joda.time.DateTime
|
import org.joda.time.DateTime
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
@ -68,9 +70,21 @@ object SettingsStringHelper {
|
|||||||
difference += 60 * 1000 - (difference % (60 * 1000))
|
difference += 60 * 1000 - (difference % (60 * 1000))
|
||||||
|
|
||||||
when {
|
when {
|
||||||
difference <= 0 || TimeUnit.MILLISECONDS.toHours(difference) < 1 -> {
|
difference <= 0 -> {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
TimeUnit.MILLISECONDS.toHours(difference) < 1 && Preferences.widgetUpdateFrequency == Constants.WidgetUpdateFrequency.HIGH.value && TimeUnit.MILLISECONDS.toMinutes(difference) > 5 -> {
|
||||||
|
return DateUtils.getRelativeTimeSpanString(start, start - 1000 * 60 * (TimeUnit.MILLISECONDS.toMinutes(difference) - 1 - (TimeUnit.MILLISECONDS.toMinutes(difference) - 1) % 5), DateUtils.MINUTE_IN_MILLIS, DateUtils.FORMAT_ABBREV_RELATIVE).toString()
|
||||||
|
}
|
||||||
|
TimeUnit.MILLISECONDS.toHours(difference) < 1 && Preferences.widgetUpdateFrequency == Constants.WidgetUpdateFrequency.DEFAULT.value && TimeUnit.MILLISECONDS.toMinutes(difference) > 5 -> {
|
||||||
|
return DateUtils.getRelativeTimeSpanString(start, start - 1000 * 60 * (TimeUnit.MILLISECONDS.toMinutes(difference) - 1 - (TimeUnit.MILLISECONDS.toMinutes(difference) - 1) % 15), DateUtils.MINUTE_IN_MILLIS, DateUtils.FORMAT_ABBREV_RELATIVE).toString()
|
||||||
|
}
|
||||||
|
TimeUnit.MILLISECONDS.toHours(difference) < 1 && Preferences.widgetUpdateFrequency == Constants.WidgetUpdateFrequency.LOW.value -> {
|
||||||
|
return context.getString(R.string.soon)
|
||||||
|
}
|
||||||
|
TimeUnit.MILLISECONDS.toHours(difference) < 1 -> {
|
||||||
|
return context.getString(R.string.now)
|
||||||
|
}
|
||||||
TimeUnit.MILLISECONDS.toHours(difference) < 12 -> {
|
TimeUnit.MILLISECONDS.toHours(difference) < 12 -> {
|
||||||
return DateUtils.getRelativeTimeSpanString(start, now, DateUtils.HOUR_IN_MILLIS, DateUtils.FORMAT_ABBREV_RELATIVE).toString()
|
return DateUtils.getRelativeTimeSpanString(start, now, DateUtils.HOUR_IN_MILLIS, DateUtils.FORMAT_ABBREV_RELATIVE).toString()
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import android.os.Build
|
|||||||
import com.google.android.gms.location.LocationServices
|
import com.google.android.gms.location.LocationServices
|
||||||
import com.tommasoberlose.anotherwidget.R
|
import com.tommasoberlose.anotherwidget.R
|
||||||
import com.tommasoberlose.anotherwidget.db.EventRepository
|
import com.tommasoberlose.anotherwidget.db.EventRepository
|
||||||
|
import com.tommasoberlose.anotherwidget.global.Constants
|
||||||
import com.tommasoberlose.anotherwidget.global.Preferences
|
import com.tommasoberlose.anotherwidget.global.Preferences
|
||||||
import com.tommasoberlose.anotherwidget.network.WeatherNetworkApi
|
import com.tommasoberlose.anotherwidget.network.WeatherNetworkApi
|
||||||
import com.tommasoberlose.anotherwidget.ui.fragments.MainFragment
|
import com.tommasoberlose.anotherwidget.ui.fragments.MainFragment
|
||||||
@ -49,79 +50,79 @@ object WeatherHelper {
|
|||||||
fun getWeatherIconResource(icon: String): Int {
|
fun getWeatherIconResource(icon: String): Int {
|
||||||
when (icon) {
|
when (icon) {
|
||||||
"01d" -> {
|
"01d" -> {
|
||||||
return R.drawable.clear_day
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.clear_day else R.drawable.clear_day_2
|
||||||
}
|
}
|
||||||
"02d" -> {
|
"02d" -> {
|
||||||
return R.drawable.partly_cloudy
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.partly_cloudy else R.drawable.partly_cloudy_2
|
||||||
}
|
}
|
||||||
"03d" -> {
|
"03d" -> {
|
||||||
return R.drawable.mostly_cloudy
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.mostly_cloudy else R.drawable.mostly_cloudy_2
|
||||||
}
|
}
|
||||||
"04d" -> {
|
"04d" -> {
|
||||||
return R.drawable.cloudy_weather
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.cloudy_weather else R.drawable.cloudy_weather_2
|
||||||
}
|
}
|
||||||
"09d" -> {
|
"09d" -> {
|
||||||
return R.drawable.storm_weather_day
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.storm_weather_day else R.drawable.storm_weather_day_2
|
||||||
}
|
}
|
||||||
"10d" -> {
|
"10d" -> {
|
||||||
return R.drawable.rainy_day
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.rainy_day else R.drawable.rainy_day_2
|
||||||
}
|
}
|
||||||
"11d" -> {
|
"11d" -> {
|
||||||
return R.drawable.thunder_day
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.thunder_day else R.drawable.thunder_day_2
|
||||||
}
|
}
|
||||||
"13d" -> {
|
"13d" -> {
|
||||||
return R.drawable.snow_day
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.snow_day else R.drawable.snow_day_2
|
||||||
}
|
}
|
||||||
"50d" -> {
|
"50d" -> {
|
||||||
return R.drawable.haze_day
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.haze_day else R.drawable.haze_day_2
|
||||||
}
|
}
|
||||||
"80d" -> {
|
"80d" -> {
|
||||||
return R.drawable.windy_day
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.windy_day else R.drawable.windy_day_2
|
||||||
}
|
}
|
||||||
"81d" -> {
|
"81d" -> {
|
||||||
return R.drawable.rain_snow_day
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.rain_snow_day else R.drawable.rain_snow_day_2
|
||||||
}
|
}
|
||||||
"82d" -> {
|
"82d" -> {
|
||||||
return R.drawable.haze_weather
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.haze_weather else R.drawable.haze_weather_2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"01n" -> {
|
"01n" -> {
|
||||||
return R.drawable.clear_night
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.clear_night else R.drawable.clear_night_2
|
||||||
}
|
}
|
||||||
"02n" -> {
|
"02n" -> {
|
||||||
return R.drawable.partly_cloudy_night
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.partly_cloudy_night else R.drawable.partly_cloudy_night_2
|
||||||
}
|
}
|
||||||
"03n" -> {
|
"03n" -> {
|
||||||
return R.drawable.mostly_cloudy_night
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.mostly_cloudy_night else R.drawable.mostly_cloudy_night_2
|
||||||
}
|
}
|
||||||
"04n" -> {
|
"04n" -> {
|
||||||
return R.drawable.cloudy_weather
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.cloudy_weather else R.drawable.cloudy_weather_2
|
||||||
}
|
}
|
||||||
"09n" -> {
|
"09n" -> {
|
||||||
return R.drawable.storm_weather_night
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.storm_weather_night else R.drawable.storm_weather_night_2
|
||||||
}
|
}
|
||||||
"10n" -> {
|
"10n" -> {
|
||||||
return R.drawable.rainy_night
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.rainy_night else R.drawable.rainy_night_2
|
||||||
}
|
}
|
||||||
"11n" -> {
|
"11n" -> {
|
||||||
return R.drawable.thunder_night
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.thunder_night else R.drawable.thunder_night_2
|
||||||
}
|
}
|
||||||
"13n" -> {
|
"13n" -> {
|
||||||
return R.drawable.snow_night
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.snow_night else R.drawable.snow_night_2
|
||||||
}
|
}
|
||||||
"50n" -> {
|
"50n" -> {
|
||||||
return R.drawable.haze_night
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.haze_night else R.drawable.haze_night_2
|
||||||
}
|
}
|
||||||
"80n" -> {
|
"80n" -> {
|
||||||
return R.drawable.windy_night
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.windy_night else R.drawable.windy_night_2
|
||||||
}
|
}
|
||||||
"81n" -> {
|
"81n" -> {
|
||||||
return R.drawable.rain_snow_night
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.rain_snow_night else R.drawable.rain_snow_night_2
|
||||||
}
|
}
|
||||||
"82n" -> {
|
"82n" -> {
|
||||||
return R.drawable.haze_weather
|
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.haze_weather else R.drawable.haze_weather_2
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
return R.drawable.unknown
|
return R.drawable.unknown
|
||||||
|
@ -30,6 +30,7 @@ class ActivityDetectionReceiver : BroadcastReceiver() {
|
|||||||
val result = ActivityTransitionResult.extractResult(intent)!!
|
val result = ActivityTransitionResult.extractResult(intent)!!
|
||||||
val lastEvent = result.transitionEvents.last()
|
val lastEvent = result.transitionEvents.last()
|
||||||
|
|
||||||
|
Log.d("ciao", "activity detected: $lastEvent")
|
||||||
if (lastEvent.activityType == DetectedActivity.WALKING || lastEvent.activityType == DetectedActivity.RUNNING && lastEvent.transitionType == ActivityTransition.ACTIVITY_TRANSITION_EXIT) {
|
if (lastEvent.activityType == DetectedActivity.WALKING || lastEvent.activityType == DetectedActivity.RUNNING && lastEvent.transitionType == ActivityTransition.ACTIVITY_TRANSITION_EXIT) {
|
||||||
requestDailySteps(context)
|
requestDailySteps(context)
|
||||||
}
|
}
|
||||||
@ -37,6 +38,8 @@ class ActivityDetectionReceiver : BroadcastReceiver() {
|
|||||||
if (intent.action == Intent.ACTION_BOOT_COMPLETED || intent.action == Intent.ACTION_MY_PACKAGE_REPLACED && Preferences.showDailySteps && Build.VERSION.SDK_INT < Build.VERSION_CODES.Q || context.checkGrantedPermission(Manifest.permission.ACTIVITY_RECOGNITION)) {
|
if (intent.action == Intent.ACTION_BOOT_COMPLETED || intent.action == Intent.ACTION_MY_PACKAGE_REPLACED && Preferences.showDailySteps && Build.VERSION.SDK_INT < Build.VERSION_CODES.Q || context.checkGrantedPermission(Manifest.permission.ACTIVITY_RECOGNITION)) {
|
||||||
resetDailySteps()
|
resetDailySteps()
|
||||||
registerFence(context)
|
registerFence(context)
|
||||||
|
} else {
|
||||||
|
resetDailySteps()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -155,15 +158,15 @@ class ActivityDetectionReceiver : BroadcastReceiver() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setTimeout(context: Context) {
|
private fun setTimeout(context: Context) {
|
||||||
with(context.getSystemService(Context.ALARM_SERVICE) as AlarmManager) {
|
with(context.getSystemService(Context.ALARM_SERVICE) as AlarmManager) {
|
||||||
cancel(PendingIntent.getBroadcast(context, 0, Intent(context, ActivityDetectionReceiver::class.java), 0))
|
cancel(PendingIntent.getBroadcast(context, 5, Intent(context, ActivityDetectionReceiver::class.java), 0))
|
||||||
setExactAndAllowWhileIdle(
|
setExactAndAllowWhileIdle(
|
||||||
AlarmManager.RTC,
|
AlarmManager.RTC,
|
||||||
Calendar.getInstance().timeInMillis + 15 * 60 * 1000,
|
Calendar.getInstance().timeInMillis + 5 * 60 * 1000,
|
||||||
PendingIntent.getBroadcast(
|
PendingIntent.getBroadcast(
|
||||||
context,
|
context,
|
||||||
0,
|
5,
|
||||||
Intent(context, ActivityDetectionReceiver::class.java),
|
Intent(context, ActivityDetectionReceiver::class.java),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
|
@ -4,6 +4,7 @@ import android.content.BroadcastReceiver
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.BatteryManager
|
import android.os.BatteryManager
|
||||||
|
import android.util.Log
|
||||||
import com.tommasoberlose.anotherwidget.global.Preferences
|
import com.tommasoberlose.anotherwidget.global.Preferences
|
||||||
import com.tommasoberlose.anotherwidget.ui.widgets.MainWidget
|
import com.tommasoberlose.anotherwidget.ui.widgets.MainWidget
|
||||||
|
|
||||||
@ -14,6 +15,8 @@ class BatteryLevelReceiver : BroadcastReceiver() {
|
|||||||
Intent.ACTION_BATTERY_OKAY -> Preferences.isBatteryLevelLow = false
|
Intent.ACTION_BATTERY_OKAY -> Preferences.isBatteryLevelLow = false
|
||||||
}
|
}
|
||||||
MainWidget.updateWidget(context)
|
MainWidget.updateWidget(context)
|
||||||
|
|
||||||
|
Log.d("ciao", "intent: ${intent}")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -10,6 +10,8 @@ import androidx.core.app.AlarmManagerCompat
|
|||||||
import androidx.core.content.ContextCompat.getSystemService
|
import androidx.core.content.ContextCompat.getSystemService
|
||||||
import com.tommasoberlose.anotherwidget.db.EventRepository
|
import com.tommasoberlose.anotherwidget.db.EventRepository
|
||||||
import com.tommasoberlose.anotherwidget.global.Actions
|
import com.tommasoberlose.anotherwidget.global.Actions
|
||||||
|
import com.tommasoberlose.anotherwidget.global.Constants
|
||||||
|
import com.tommasoberlose.anotherwidget.global.Preferences
|
||||||
import com.tommasoberlose.anotherwidget.helpers.CalendarHelper
|
import com.tommasoberlose.anotherwidget.helpers.CalendarHelper
|
||||||
import com.tommasoberlose.anotherwidget.models.Event
|
import com.tommasoberlose.anotherwidget.models.Event
|
||||||
import com.tommasoberlose.anotherwidget.ui.widgets.MainWidget
|
import com.tommasoberlose.anotherwidget.ui.widgets.MainWidget
|
||||||
@ -68,24 +70,54 @@ class UpdatesReceiver : BroadcastReceiver() {
|
|||||||
val diff = Period(now.timeInMillis, event.startDate)
|
val diff = Period(now.timeInMillis, event.startDate)
|
||||||
if (event.startDate > now.timeInMillis) {
|
if (event.startDate > now.timeInMillis) {
|
||||||
// Update the widget every hour till the event
|
// Update the widget every hour till the event
|
||||||
setExactAndAllowWhileIdle(
|
if (diff.hours == 0) {
|
||||||
AlarmManager.RTC,
|
var minutes = 0
|
||||||
if (event.startDate - diff.hours * 1000 * 60 * 60 > (now.timeInMillis + 120 * 1000)) event.startDate - diff.hours * 1000 * 60 * 60 else now.timeInMillis + 120000,
|
when (Preferences.widgetUpdateFrequency) {
|
||||||
PendingIntent.getBroadcast(
|
Constants.WidgetUpdateFrequency.DEFAULT.value -> {
|
||||||
context,
|
minutes = when {
|
||||||
event.eventID.toInt(),
|
diff.minutes > 50 -> 50
|
||||||
Intent(context, UpdatesReceiver::class.java).apply {
|
diff.minutes > 30 -> 30
|
||||||
action = Actions.ACTION_TIME_UPDATE
|
diff.minutes > 15 -> 15
|
||||||
putExtra(EVENT_ID, event.eventID)
|
else -> 0
|
||||||
},
|
}
|
||||||
0
|
}
|
||||||
|
Constants.WidgetUpdateFrequency.HIGH.value -> {
|
||||||
|
minutes = diff.minutes - (diff.minutes % 5)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setExact(
|
||||||
|
AlarmManager.RTC,
|
||||||
|
if (event.startDate - minutes * 1000 * 60 > (now.timeInMillis + 120 * 1000)) event.startDate - 60 * 1000 * minutes else now.timeInMillis + 120000,
|
||||||
|
PendingIntent.getBroadcast(
|
||||||
|
context,
|
||||||
|
event.eventID.toInt(),
|
||||||
|
Intent(context, UpdatesReceiver::class.java).apply {
|
||||||
|
action = Actions.ACTION_TIME_UPDATE
|
||||||
|
putExtra(EVENT_ID, event.eventID)
|
||||||
|
},
|
||||||
|
0
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
} else {
|
||||||
|
setExact(
|
||||||
|
AlarmManager.RTC,
|
||||||
|
event.startDate - diff.hours * 1000 * 60 * 60,
|
||||||
|
PendingIntent.getBroadcast(
|
||||||
|
context,
|
||||||
|
event.eventID.toInt(),
|
||||||
|
Intent(context, UpdatesReceiver::class.java).apply {
|
||||||
|
action = Actions.ACTION_TIME_UPDATE
|
||||||
|
putExtra(EVENT_ID, event.eventID)
|
||||||
|
},
|
||||||
|
0
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Update the widget one second after the event is finished
|
// Update the widget one second after the event is finished
|
||||||
val fireTime =
|
val fireTime =
|
||||||
if (event.endDate > now.timeInMillis + 120 * 1000) event.endDate else now.timeInMillis + 120000
|
if (event.endDate > now.timeInMillis + 120 * 1000) event.endDate else now.timeInMillis + 120000
|
||||||
setExactAndAllowWhileIdle(
|
setExact(
|
||||||
AlarmManager.RTC,
|
AlarmManager.RTC,
|
||||||
fireTime,
|
fireTime,
|
||||||
PendingIntent.getBroadcast(
|
PendingIntent.getBroadcast(
|
||||||
|
@ -123,6 +123,17 @@ class CalendarTabFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
viewModel.widgetUpdateFrequency.observe(viewLifecycleOwner, Observer {
|
||||||
|
maintainScrollPosition {
|
||||||
|
widget_update_frequency_label?.text = when (it) {
|
||||||
|
Constants.WidgetUpdateFrequency.HIGH.value -> getString(R.string.settings_widget_update_frequency_high)
|
||||||
|
Constants.WidgetUpdateFrequency.DEFAULT.value -> getString(R.string.settings_widget_update_frequency_default)
|
||||||
|
Constants.WidgetUpdateFrequency.LOW.value -> getString(R.string.settings_widget_update_frequency_low)
|
||||||
|
else -> ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
viewModel.showUntil.observe(viewLifecycleOwner, Observer {
|
viewModel.showUntil.observe(viewLifecycleOwner, Observer {
|
||||||
maintainScrollPosition {
|
maintainScrollPosition {
|
||||||
show_until_label?.text = getString(SettingsStringHelper.getShowUntilString(it))
|
show_until_label?.text = getString(SettingsStringHelper.getShowUntilString(it))
|
||||||
@ -262,6 +273,18 @@ class CalendarTabFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
action_widget_update_frequency.setOnClickListener {
|
||||||
|
if (Preferences.showEvents) {
|
||||||
|
BottomSheetMenu<Int>(requireContext(), header = getString(R.string.settings_widget_update_frequency_title), message = getString(R.string.settings_widget_update_frequency_subtitle)).setSelectedValue(Preferences.widgetUpdateFrequency)
|
||||||
|
.addItem(getString(R.string.settings_widget_update_frequency_high), Constants.WidgetUpdateFrequency.HIGH.value)
|
||||||
|
.addItem(getString(R.string.settings_widget_update_frequency_default), Constants.WidgetUpdateFrequency.DEFAULT.value)
|
||||||
|
.addItem(getString(R.string.settings_widget_update_frequency_low), Constants.WidgetUpdateFrequency.LOW.value)
|
||||||
|
.addOnSelectItemListener { value ->
|
||||||
|
Preferences.widgetUpdateFrequency = value
|
||||||
|
}.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
action_second_row_info.setOnClickListener {
|
action_second_row_info.setOnClickListener {
|
||||||
if (Preferences.showEvents) {
|
if (Preferences.showEvents) {
|
||||||
val dialog = BottomSheetMenu<Int>(requireContext(), header = getString(R.string.settings_second_row_info_title)).setSelectedValue(Preferences.secondRowInformation)
|
val dialog = BottomSheetMenu<Int>(requireContext(), header = getString(R.string.settings_second_row_info_title)).setSelectedValue(Preferences.secondRowInformation)
|
||||||
|
@ -116,6 +116,28 @@ class GeneralTabFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
viewModel.textSecondaryColor.observe(viewLifecycleOwner, Observer {
|
||||||
|
maintainScrollPosition {
|
||||||
|
if (Preferences.textSecondaryAlpha == "00") {
|
||||||
|
secondary_font_color_label?.text = getString(R.string.transparent)
|
||||||
|
} else {
|
||||||
|
secondary_font_color_label?.text =
|
||||||
|
"#%s".format(Integer.toHexString(ColorHelper.getSecondaryFontColor())).toUpperCase()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
viewModel.textSecondaryAlpha.observe(viewLifecycleOwner, Observer {
|
||||||
|
maintainScrollPosition {
|
||||||
|
if (Preferences.textSecondaryAlpha == "00") {
|
||||||
|
secondary_font_color_label?.text = getString(R.string.transparent)
|
||||||
|
} else {
|
||||||
|
secondary_font_color_label?.text =
|
||||||
|
"#%s".format(Integer.toHexString(ColorHelper.getSecondaryFontColor())).toUpperCase()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
viewModel.backgroundCardColor.observe(viewLifecycleOwner, Observer {
|
viewModel.backgroundCardColor.observe(viewLifecycleOwner, Observer {
|
||||||
maintainScrollPosition {
|
maintainScrollPosition {
|
||||||
if (Preferences.backgroundCardAlpha == "00") {
|
if (Preferences.backgroundCardAlpha == "00") {
|
||||||
@ -211,6 +233,23 @@ class GeneralTabFragment : Fragment() {
|
|||||||
).show()
|
).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
action_secondary_font_color.setOnClickListener {
|
||||||
|
BottomSheetColorPicker(requireContext(),
|
||||||
|
colors = colors,
|
||||||
|
header = getString(R.string.settings_secondary_font_color_title),
|
||||||
|
getSelected = ColorHelper::getSecondaryFontColorRgb,
|
||||||
|
onColorSelected = { color: Int ->
|
||||||
|
val colorString = Integer.toHexString(color)
|
||||||
|
Preferences.textSecondaryColor = "#" + if (colorString.length > 6) colorString.substring(2) else colorString
|
||||||
|
},
|
||||||
|
showAlphaSelector = true,
|
||||||
|
alpha = Preferences.textSecondaryAlpha.toIntValue(),
|
||||||
|
onAlphaChangeListener = { alpha ->
|
||||||
|
Preferences.textSecondaryAlpha = alpha.toHexValue()
|
||||||
|
}
|
||||||
|
).show()
|
||||||
|
}
|
||||||
|
|
||||||
action_date_format.setOnClickListener {
|
action_date_format.setOnClickListener {
|
||||||
if (Preferences.showEvents) {
|
if (Preferences.showEvents) {
|
||||||
val now = Calendar.getInstance()
|
val now = Calendar.getInstance()
|
||||||
|
@ -43,7 +43,10 @@ import com.tommasoberlose.anotherwidget.receivers.ActivityDetectionReceiver.Comp
|
|||||||
import com.tommasoberlose.anotherwidget.ui.activities.MainActivity
|
import com.tommasoberlose.anotherwidget.ui.activities.MainActivity
|
||||||
import com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel
|
import com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel
|
||||||
import com.tommasoberlose.anotherwidget.utils.checkGrantedPermission
|
import com.tommasoberlose.anotherwidget.utils.checkGrantedPermission
|
||||||
|
import com.tommasoberlose.anotherwidget.utils.checkIfFitInstalled
|
||||||
|
import kotlinx.android.synthetic.main.fragment_calendar_settings.*
|
||||||
import kotlinx.android.synthetic.main.fragment_glance_settings.*
|
import kotlinx.android.synthetic.main.fragment_glance_settings.*
|
||||||
|
import kotlinx.android.synthetic.main.fragment_glance_settings.scrollView
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
@ -79,6 +82,8 @@ class GlanceTabFragment : Fragment() {
|
|||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onActivityCreated(savedInstanceState)
|
||||||
|
|
||||||
|
action_show_steps.isVisible = requireContext().checkIfFitInstalled()
|
||||||
|
|
||||||
setupListener()
|
setupListener()
|
||||||
updateNextAlarmWarningUi()
|
updateNextAlarmWarningUi()
|
||||||
}
|
}
|
||||||
|
@ -124,127 +124,110 @@ class MainFragment : Fragment(), SharedPreferences.OnSharedPreferenceChangeList
|
|||||||
|
|
||||||
private fun updateUI() {
|
private fun updateUI() {
|
||||||
uiJob?.cancel()
|
uiJob?.cancel()
|
||||||
if (preview != null) {
|
|
||||||
preview.clearAnimation()
|
|
||||||
time_container.clearAnimation()
|
|
||||||
|
|
||||||
if (Preferences.showPreview) {
|
preview?.clearAnimation()
|
||||||
preview.setCardBackgroundColor(
|
time_container?.clearAnimation()
|
||||||
ContextCompat.getColor(
|
|
||||||
requireContext(),
|
if (Preferences.showPreview) {
|
||||||
if (ColorHelper.getFontColor()
|
preview?.setCardBackgroundColor(
|
||||||
.isColorDark()
|
ContextCompat.getColor(
|
||||||
) android.R.color.white else R.color.colorAccent
|
requireContext(),
|
||||||
)
|
if (ColorHelper.getFontColor()
|
||||||
|
.isColorDark()
|
||||||
|
) android.R.color.white else R.color.colorAccent
|
||||||
)
|
)
|
||||||
widget_shape_background?.setImageDrawable(
|
)
|
||||||
BitmapHelper.getTintedDrawable(
|
widget_shape_background?.setImageDrawable(
|
||||||
requireContext(),
|
BitmapHelper.getTintedDrawable(
|
||||||
R.drawable.card_background,
|
requireContext(),
|
||||||
ColorHelper.getBackgroundColor()
|
R.drawable.card_background,
|
||||||
)
|
ColorHelper.getBackgroundColor()
|
||||||
)
|
)
|
||||||
uiJob = viewLifecycleOwner.lifecycleScope.launch(Dispatchers.IO) {
|
)
|
||||||
val generatedView = MainWidget.generateWidgetView(requireContext())
|
uiJob = viewLifecycleOwner.lifecycleScope.launch(Dispatchers.IO) {
|
||||||
|
val generatedView = MainWidget.generateWidgetView(requireContext())
|
||||||
|
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
generatedView.measure(0, 0)
|
generatedView.measure(0, 0)
|
||||||
preview.measure(0, 0)
|
preview?.measure(0, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
val bitmap = BitmapHelper.getBitmapFromView(
|
val bitmap = if (preview != null) {
|
||||||
|
BitmapHelper.getBitmapFromView(
|
||||||
generatedView,
|
generatedView,
|
||||||
if (preview.width > 0) preview.width else generatedView.measuredWidth,
|
if (preview.width > 0) preview.width else generatedView.measuredWidth,
|
||||||
generatedView.measuredHeight
|
generatedView.measuredHeight
|
||||||
)
|
)
|
||||||
withContext(Dispatchers.Main) {
|
} else {
|
||||||
// Clock
|
null
|
||||||
time.setTextColor(ColorHelper.getClockFontColor())
|
}
|
||||||
time_am_pm.setTextColor(ColorHelper.getClockFontColor())
|
withContext(Dispatchers.Main) {
|
||||||
time.setTextSize(
|
// Clock
|
||||||
TypedValue.COMPLEX_UNIT_SP,
|
time?.setTextColor(ColorHelper.getClockFontColor())
|
||||||
Preferences.clockTextSize.toPixel(requireContext())
|
time_am_pm?.setTextColor(ColorHelper.getClockFontColor())
|
||||||
)
|
time?.setTextSize(
|
||||||
time_am_pm.setTextSize(
|
TypedValue.COMPLEX_UNIT_SP,
|
||||||
TypedValue.COMPLEX_UNIT_SP,
|
Preferences.clockTextSize.toPixel(requireContext())
|
||||||
Preferences.clockTextSize.toPixel(requireContext()) / 5 * 2
|
)
|
||||||
)
|
time_am_pm?.setTextSize(
|
||||||
time_am_pm.isVisible = Preferences.showAMPMIndicator
|
TypedValue.COMPLEX_UNIT_SP,
|
||||||
|
Preferences.clockTextSize.toPixel(requireContext()) / 5 * 2
|
||||||
|
)
|
||||||
|
time_am_pm?.isVisible = Preferences.showAMPMIndicator
|
||||||
|
|
||||||
// Clock bottom margin
|
// Clock bottom margin
|
||||||
clock_bottom_margin_none.isVisible =
|
clock_bottom_margin_none?.isVisible =
|
||||||
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.NONE.value
|
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.NONE.value
|
||||||
clock_bottom_margin_small.isVisible =
|
clock_bottom_margin_small?.isVisible =
|
||||||
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.SMALL.value
|
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.SMALL.value
|
||||||
clock_bottom_margin_medium.isVisible =
|
clock_bottom_margin_medium?.isVisible =
|
||||||
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.MEDIUM.value
|
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.MEDIUM.value
|
||||||
clock_bottom_margin_large.isVisible =
|
clock_bottom_margin_large?.isVisible =
|
||||||
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.LARGE.value
|
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.LARGE.value
|
||||||
|
|
||||||
if ((Preferences.showClock && !time_container.isVisible) || (!Preferences.showClock && time_container.isVisible)) {
|
if ((Preferences.showClock && time_container?.isVisible == false) || (!Preferences.showClock && time_container?.isVisible == true)) {
|
||||||
if (Preferences.showClock) {
|
if (Preferences.showClock) {
|
||||||
time_container.layoutParams = time_container.layoutParams.apply {
|
time_container?.layoutParams = time_container.layoutParams.apply {
|
||||||
height = RelativeLayout.LayoutParams.WRAP_CONTENT
|
|
||||||
}
|
|
||||||
time_container.measure(0, 0)
|
|
||||||
}
|
|
||||||
val initialHeight = time_container.measuredHeight
|
|
||||||
ValueAnimator.ofFloat(
|
|
||||||
if (Preferences.showClock) 0f else 1f,
|
|
||||||
if (Preferences.showClock) 1f else 0f
|
|
||||||
).apply {
|
|
||||||
duration = 500L
|
|
||||||
addUpdateListener {
|
|
||||||
val animatedValue = animatedValue as Float
|
|
||||||
time_container.layoutParams =
|
|
||||||
time_container.layoutParams.apply {
|
|
||||||
height = (initialHeight * animatedValue).toInt()
|
|
||||||
}
|
|
||||||
time.alpha = animatedValue
|
|
||||||
}
|
|
||||||
addListener(
|
|
||||||
onStart = {
|
|
||||||
if (Preferences.showClock) {
|
|
||||||
time_container.isVisible = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onEnd = {
|
|
||||||
if (!Preferences.showClock) {
|
|
||||||
time_container.isVisible = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}.start()
|
|
||||||
|
|
||||||
ValueAnimator.ofInt(
|
|
||||||
preview.height,
|
|
||||||
PREVIEW_BASE_HEIGHT.toPixel(requireContext()) + if (Preferences.showClock) 100.toPixel(
|
|
||||||
requireContext()
|
|
||||||
) else 0
|
|
||||||
).apply {
|
|
||||||
duration = 500L
|
|
||||||
addUpdateListener {
|
|
||||||
val animatedValue = animatedValue as Int
|
|
||||||
val layoutParams = preview.layoutParams
|
|
||||||
layoutParams.height = animatedValue
|
|
||||||
preview.layoutParams = layoutParams
|
|
||||||
}
|
|
||||||
}.start()
|
|
||||||
} else {
|
|
||||||
time_container.layoutParams = time_container.layoutParams.apply {
|
|
||||||
height = RelativeLayout.LayoutParams.WRAP_CONTENT
|
height = RelativeLayout.LayoutParams.WRAP_CONTENT
|
||||||
}
|
}
|
||||||
time_container.measure(0, 0)
|
time_container?.measure(0, 0)
|
||||||
}
|
}
|
||||||
|
val initialHeight = time_container?.measuredHeight ?: 0
|
||||||
|
ValueAnimator.ofFloat(
|
||||||
|
if (Preferences.showClock) 0f else 1f,
|
||||||
|
if (Preferences.showClock) 1f else 0f
|
||||||
|
).apply {
|
||||||
|
duration = 500L
|
||||||
|
addUpdateListener {
|
||||||
|
val animatedValue = animatedValue as Float
|
||||||
|
time_container?.layoutParams =
|
||||||
|
time_container.layoutParams.apply {
|
||||||
|
height = (initialHeight * animatedValue).toInt()
|
||||||
|
}
|
||||||
|
time?.alpha = animatedValue
|
||||||
|
}
|
||||||
|
addListener(
|
||||||
|
onStart = {
|
||||||
|
if (Preferences.showClock) {
|
||||||
|
time_container?.isVisible = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onEnd = {
|
||||||
|
if (!Preferences.showClock) {
|
||||||
|
time_container?.isVisible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}.start()
|
||||||
|
|
||||||
if (preview.height == 0) {
|
if (preview != null) {
|
||||||
ValueAnimator.ofInt(
|
ValueAnimator.ofInt(
|
||||||
preview.height,
|
preview.height,
|
||||||
PREVIEW_BASE_HEIGHT.toPixel(requireContext()) + if (Preferences.showClock) 100.toPixel(
|
PREVIEW_BASE_HEIGHT.toPixel(requireContext()) + if (Preferences.showClock) 100.toPixel(
|
||||||
requireContext()
|
requireContext()
|
||||||
) else 0
|
) else 0
|
||||||
).apply {
|
).apply {
|
||||||
duration = 300L
|
duration = 500L
|
||||||
addUpdateListener {
|
addUpdateListener {
|
||||||
val animatedValue = animatedValue as Int
|
val animatedValue = animatedValue as Int
|
||||||
val layoutParams = preview.layoutParams
|
val layoutParams = preview.layoutParams
|
||||||
@ -253,14 +236,37 @@ class MainFragment : Fragment(), SharedPreferences.OnSharedPreferenceChangeList
|
|||||||
}
|
}
|
||||||
}.start()
|
}.start()
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
widget_loader.animate().scaleX(0f).scaleY(0f).alpha(0f).setDuration(200L)
|
time_container?.layoutParams = time_container.layoutParams.apply {
|
||||||
.start()
|
height = RelativeLayout.LayoutParams.WRAP_CONTENT
|
||||||
bitmap_container.setImageBitmap(bitmap)
|
}
|
||||||
widget.animate().alpha(1f).start()
|
time_container?.measure(0, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (preview != null && preview.height == 0) {
|
||||||
|
ValueAnimator.ofInt(
|
||||||
|
preview.height,
|
||||||
|
PREVIEW_BASE_HEIGHT.toPixel(requireContext()) + if (Preferences.showClock) 100.toPixel(
|
||||||
|
requireContext()
|
||||||
|
) else 0
|
||||||
|
).apply {
|
||||||
|
duration = 300L
|
||||||
|
addUpdateListener {
|
||||||
|
val animatedValue = animatedValue as Int
|
||||||
|
val layoutParams = preview.layoutParams
|
||||||
|
layoutParams.height = animatedValue
|
||||||
|
preview?.layoutParams = layoutParams
|
||||||
|
}
|
||||||
|
}.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
widget_loader?.animate()?.scaleX(0f)?.scaleY(0f)?.alpha(0f)?.setDuration(200L)?.start()
|
||||||
|
bitmap_container?.setImageBitmap(bitmap)
|
||||||
|
widget?.animate()?.alpha(1f)?.start()
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
} else {
|
||||||
|
if (preview != null) {
|
||||||
ValueAnimator.ofInt(
|
ValueAnimator.ofInt(
|
||||||
preview.height,
|
preview.height,
|
||||||
0
|
0
|
||||||
|
@ -5,6 +5,7 @@ import android.app.Activity
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
@ -126,6 +127,16 @@ class WeatherTabFragment : Fragment() {
|
|||||||
checkLocationPermission()
|
checkLocationPermission()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
viewModel.weatherIconPack.observe(viewLifecycleOwner, Observer {
|
||||||
|
maintainScrollPosition {
|
||||||
|
label_weather_icon_pack?.text = when (it) {
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> getString(R.string.settings_weather_icon_pack_minimal)
|
||||||
|
else -> getString(R.string.settings_weather_icon_pack_default)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checkLocationPermission()
|
||||||
|
})
|
||||||
|
|
||||||
viewModel.weatherAppName.observe(viewLifecycleOwner, Observer {
|
viewModel.weatherAppName.observe(viewLifecycleOwner, Observer {
|
||||||
maintainScrollPosition {
|
maintainScrollPosition {
|
||||||
weather_app_label?.text =
|
weather_app_label?.text =
|
||||||
@ -217,6 +228,17 @@ class WeatherTabFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
action_weather_icon_pack.setOnClickListener {
|
||||||
|
if (Preferences.showWeather) {
|
||||||
|
BottomSheetMenu<Int>(requireContext(), header = getString(R.string.settings_weather_icon_pack_title)).setSelectedValue(Preferences.weatherIconPack)
|
||||||
|
.addItem(getString(R.string.settings_weather_icon_pack_default), Constants.WeatherIconPack.DEFAULT.value)
|
||||||
|
.addItem(getString(R.string.settings_weather_icon_pack_minimal), Constants.WeatherIconPack.MINIMAL.value)
|
||||||
|
.addOnSelectItemListener { value ->
|
||||||
|
Preferences.weatherIconPack = value
|
||||||
|
}.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
action_weather_app.setOnClickListener {
|
action_weather_app.setOnClickListener {
|
||||||
if (Preferences.showWeather) {
|
if (Preferences.showWeather) {
|
||||||
startActivityForResult(
|
startActivityForResult(
|
||||||
|
@ -9,6 +9,8 @@ class MainViewModel : ViewModel() {
|
|||||||
// General Settings
|
// General Settings
|
||||||
val textGlobalColor = Preferences.asLiveData(Preferences::textGlobalColor)
|
val textGlobalColor = Preferences.asLiveData(Preferences::textGlobalColor)
|
||||||
val textGlobalAlpha = Preferences.asLiveData(Preferences::textGlobalAlpha)
|
val textGlobalAlpha = Preferences.asLiveData(Preferences::textGlobalAlpha)
|
||||||
|
val textSecondaryColor = Preferences.asLiveData(Preferences::textSecondaryColor)
|
||||||
|
val textSecondaryAlpha = Preferences.asLiveData(Preferences::textSecondaryAlpha)
|
||||||
val backgroundCardColor = Preferences.asLiveData(Preferences::backgroundCardColor)
|
val backgroundCardColor = Preferences.asLiveData(Preferences::backgroundCardColor)
|
||||||
val backgroundCardAlpha = Preferences.asLiveData(Preferences::backgroundCardAlpha)
|
val backgroundCardAlpha = Preferences.asLiveData(Preferences::backgroundCardAlpha)
|
||||||
val textMainSize = Preferences.asLiveData(Preferences::textMainSize)
|
val textMainSize = Preferences.asLiveData(Preferences::textMainSize)
|
||||||
@ -27,6 +29,7 @@ class MainViewModel : ViewModel() {
|
|||||||
val showNextEvent = Preferences.asLiveData(Preferences::showNextEvent)
|
val showNextEvent = Preferences.asLiveData(Preferences::showNextEvent)
|
||||||
val openEventDetails = Preferences.asLiveData(Preferences::openEventDetails)
|
val openEventDetails = Preferences.asLiveData(Preferences::openEventDetails)
|
||||||
val calendarAppName = Preferences.asLiveData(Preferences::calendarAppName)
|
val calendarAppName = Preferences.asLiveData(Preferences::calendarAppName)
|
||||||
|
val widgetUpdateFrequency = Preferences.asLiveData(Preferences::widgetUpdateFrequency)
|
||||||
|
|
||||||
// Clock Settings
|
// Clock Settings
|
||||||
val showClock = Preferences.asLiveData(Preferences::showClock)
|
val showClock = Preferences.asLiveData(Preferences::showClock)
|
||||||
@ -52,6 +55,7 @@ class MainViewModel : ViewModel() {
|
|||||||
val customLocationAdd = Preferences.asLiveData(Preferences::customLocationAdd)
|
val customLocationAdd = Preferences.asLiveData(Preferences::customLocationAdd)
|
||||||
|
|
||||||
val showWeatherWarning = Preferences.asLiveData(Preferences::showWeatherWarning)
|
val showWeatherWarning = Preferences.asLiveData(Preferences::showWeatherWarning)
|
||||||
|
val weatherIconPack = Preferences.asLiveData(Preferences::weatherIconPack)
|
||||||
|
|
||||||
// Glance
|
// Glance
|
||||||
val showGlance = Preferences.asLiveData(Preferences::showGlance)
|
val showGlance = Preferences.asLiveData(Preferences::showGlance)
|
||||||
|
@ -261,7 +261,7 @@ class MainWidget : AppWidgetProvider() {
|
|||||||
views.setViewVisibility(R.id.empty_layout_rect, View.GONE)
|
views.setViewVisibility(R.id.empty_layout_rect, View.GONE)
|
||||||
views.setViewVisibility(R.id.calendar_layout_rect, View.VISIBLE)
|
views.setViewVisibility(R.id.calendar_layout_rect, View.VISIBLE)
|
||||||
} else if (GlanceProviderHelper.showGlanceProviders(context)) {
|
} else if (GlanceProviderHelper.showGlanceProviders(context)) {
|
||||||
loop@ for (provider:Constants.GlanceProviderId in GlanceProviderHelper.getGlanceProviders()) {
|
loop@ for (provider:Constants.GlanceProviderId in GlanceProviderHelper.getGlanceProviders(context)) {
|
||||||
when (provider) {
|
when (provider) {
|
||||||
Constants.GlanceProviderId.PLAYING_SONG -> {
|
Constants.GlanceProviderId.PLAYING_SONG -> {
|
||||||
if (MediaPlayerHelper.isSomeonePlaying(context)) {
|
if (MediaPlayerHelper.isSomeonePlaying(context)) {
|
||||||
@ -306,6 +306,13 @@ class MainWidget : AppWidgetProvider() {
|
|||||||
}
|
}
|
||||||
Constants.GlanceProviderId.GOOGLE_FIT_STEPS -> {
|
Constants.GlanceProviderId.GOOGLE_FIT_STEPS -> {
|
||||||
if (Preferences.showDailySteps && Preferences.googleFitSteps > 0) {
|
if (Preferences.showDailySteps && Preferences.googleFitSteps > 0) {
|
||||||
|
val fitIntent = PendingIntent.getActivity(
|
||||||
|
context,
|
||||||
|
widgetID,
|
||||||
|
IntentHelper.getFitIntent(context),
|
||||||
|
0
|
||||||
|
)
|
||||||
|
views.setOnClickPendingIntent(R.id.second_row_rect, fitIntent)
|
||||||
break@loop
|
break@loop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -446,7 +453,10 @@ class MainWidget : AppWidgetProvider() {
|
|||||||
val eventRepository = EventRepository(context)
|
val eventRepository = EventRepository(context)
|
||||||
val v = View.inflate(context, R.layout.the_widget, null)
|
val v = View.inflate(context, R.layout.the_widget, null)
|
||||||
|
|
||||||
val now = Calendar.getInstance()
|
val now = Calendar.getInstance().apply {
|
||||||
|
set(Calendar.SECOND, 0)
|
||||||
|
set(Calendar.MILLISECOND, 0)
|
||||||
|
}
|
||||||
|
|
||||||
v.empty_layout.visibility = View.VISIBLE
|
v.empty_layout.visibility = View.VISIBLE
|
||||||
v.calendar_layout.visibility = View.GONE
|
v.calendar_layout.visibility = View.GONE
|
||||||
@ -466,7 +476,7 @@ class MainWidget : AppWidgetProvider() {
|
|||||||
|
|
||||||
v.next_event.text = nextEvent.title
|
v.next_event.text = nextEvent.title
|
||||||
|
|
||||||
if (Preferences.showDiffTime && now.timeInMillis < (nextEvent.startDate - 1000 * 60 * 60)) {
|
if (Preferences.showDiffTime && now.timeInMillis < nextEvent.startDate) {
|
||||||
v.next_event_difference_time.text = if (!nextEvent.allDay) {
|
v.next_event_difference_time.text = if (!nextEvent.allDay) {
|
||||||
SettingsStringHelper.getDifferenceText(
|
SettingsStringHelper.getDifferenceText(
|
||||||
context,
|
context,
|
||||||
@ -512,7 +522,7 @@ class MainWidget : AppWidgetProvider() {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
val flags: Int = DateUtils.FORMAT_SHOW_DATE or DateUtils.FORMAT_NO_YEAR or DateUtils.FORMAT_ABBREV_MONTH
|
val flags: Int = DateUtils.FORMAT_SHOW_DATE or DateUtils.FORMAT_NO_YEAR or DateUtils.FORMAT_ABBREV_MONTH
|
||||||
v.next_event_date.text = DateUtils.formatDateTime(context, now.timeInMillis, flags).getCapWordString()
|
v.next_event_date.text = DateUtils.formatDateTime(context, now.timeInMillis, flags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -520,7 +530,7 @@ class MainWidget : AppWidgetProvider() {
|
|||||||
v.calendar_layout.visibility = View.VISIBLE
|
v.calendar_layout.visibility = View.VISIBLE
|
||||||
} else if (GlanceProviderHelper.showGlanceProviders(context)) {
|
} else if (GlanceProviderHelper.showGlanceProviders(context)) {
|
||||||
v.second_row_icon.isVisible = true
|
v.second_row_icon.isVisible = true
|
||||||
loop@ for (provider:Constants.GlanceProviderId in GlanceProviderHelper.getGlanceProviders()) {
|
loop@ for (provider:Constants.GlanceProviderId in GlanceProviderHelper.getGlanceProviders(context)) {
|
||||||
when (provider) {
|
when (provider) {
|
||||||
Constants.GlanceProviderId.PLAYING_SONG -> {
|
Constants.GlanceProviderId.PLAYING_SONG -> {
|
||||||
if (MediaPlayerHelper.isSomeonePlaying(context)) {
|
if (MediaPlayerHelper.isSomeonePlaying(context)) {
|
||||||
@ -562,6 +572,7 @@ class MainWidget : AppWidgetProvider() {
|
|||||||
if (Preferences.customNotes.isNotEmpty()) {
|
if (Preferences.customNotes.isNotEmpty()) {
|
||||||
v.second_row_icon.isVisible = false
|
v.second_row_icon.isVisible = false
|
||||||
v.next_event_date.text = Preferences.customNotes
|
v.next_event_date.text = Preferences.customNotes
|
||||||
|
v.next_event_date.maxLines = 2
|
||||||
break@loop
|
break@loop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -587,14 +598,30 @@ class MainWidget : AppWidgetProvider() {
|
|||||||
|
|
||||||
|
|
||||||
// Color
|
// Color
|
||||||
listOf<TextView>(v.empty_date, v.divider1, v.temp, v.next_event, v.next_event_difference_time, v.next_event_date, v.divider2, v.calendar_temp, v.divider3, v.special_temp).forEach {
|
listOf<TextView>(v.empty_date, v.divider1, v.temp, v.next_event, v.next_event_difference_time, v.divider3, v.special_temp).forEach {
|
||||||
it.setTextColor(ColorHelper.getFontColor())
|
it.setTextColor(ColorHelper.getFontColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
listOf<ImageView>(v.second_row_icon, v.action_next, v.action_previous).forEach {
|
if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) {
|
||||||
|
listOf<ImageView>(v.action_next, v.action_previous)
|
||||||
|
} else {
|
||||||
|
listOf<ImageView>(v.action_next, v.action_previous, v.empty_weather_icon, v.special_weather_icon)
|
||||||
|
}.forEach {
|
||||||
it.setColorFilter(ColorHelper.getFontColor())
|
it.setColorFilter(ColorHelper.getFontColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
listOf<TextView>(v.next_event_date, v.divider2, v.calendar_temp).forEach {
|
||||||
|
it.setTextColor(ColorHelper.getSecondaryFontColor())
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) {
|
||||||
|
listOf<ImageView>(v.second_row_icon)
|
||||||
|
} else {
|
||||||
|
listOf<ImageView>(v.second_row_icon, v.weather_icon)
|
||||||
|
}.forEach {
|
||||||
|
it.setColorFilter(ColorHelper.getSecondaryFontColor())
|
||||||
|
}
|
||||||
|
|
||||||
// Text Size
|
// Text Size
|
||||||
listOf<Pair<TextView, Float>>(
|
listOf<Pair<TextView, Float>>(
|
||||||
v.empty_date to Preferences.textMainSize,
|
v.empty_date to Preferences.textMainSize,
|
||||||
@ -615,11 +642,11 @@ class MainWidget : AppWidgetProvider() {
|
|||||||
v.second_row_icon.scaleX = Preferences.textSecondSize / 18f
|
v.second_row_icon.scaleX = Preferences.textSecondSize / 18f
|
||||||
v.second_row_icon.scaleY = Preferences.textSecondSize / 18f
|
v.second_row_icon.scaleY = Preferences.textSecondSize / 18f
|
||||||
|
|
||||||
v.weather_icon.scaleX = Preferences.textSecondSize / 16f
|
v.weather_icon.scaleX = Preferences.textSecondSize / 14f
|
||||||
v.weather_icon.scaleY = Preferences.textSecondSize / 16f
|
v.weather_icon.scaleY = Preferences.textSecondSize / 14f
|
||||||
|
|
||||||
v.empty_weather_icon.scaleX = Preferences.textMainSize / 20f
|
v.empty_weather_icon.scaleX = Preferences.textMainSize / 18f
|
||||||
v.empty_weather_icon.scaleY = Preferences.textMainSize / 20f
|
v.empty_weather_icon.scaleY = Preferences.textMainSize / 18f
|
||||||
|
|
||||||
v.action_next.scaleX = Preferences.textMainSize / 28f
|
v.action_next.scaleX = Preferences.textMainSize / 28f
|
||||||
v.action_next.scaleY = Preferences.textMainSize / 28f
|
v.action_next.scaleY = Preferences.textMainSize / 28f
|
||||||
|
@ -212,4 +212,13 @@ fun String.getCapWordString(): String {
|
|||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
this
|
this
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun Context.checkIfFitInstalled(): Boolean {
|
||||||
|
return try {
|
||||||
|
packageManager.getPackageInfo("com.google.android.apps.fitness", PackageManager.GET_ACTIVITIES)
|
||||||
|
true
|
||||||
|
} catch (e: Exception) {
|
||||||
|
false
|
||||||
|
}
|
||||||
}
|
}
|
BIN
app/src/main/res/drawable/clear_day_2.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable/clear_night_2.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable/cloudy_weather_2.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable/haze_day_2.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/drawable/haze_night_2.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable/haze_weather_2.png
Normal file
After Width: | Height: | Size: 921 B |
BIN
app/src/main/res/drawable/mostly_cloudy_2.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/drawable/mostly_cloudy_night_2.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable/partly_cloudy_2.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable/partly_cloudy_night_2.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable/rain_snow_2.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable/rain_snow_day_2.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable/rain_snow_night_2.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable/rainy_day_2.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable/rainy_night_2.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/drawable/rainy_weather_2.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable/showcase_2.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable/snow_day_2.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable/snow_night_2.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable/snow_weather_2.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable/storm_weather_2.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable/storm_weather_day_2.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable/storm_weather_night_2.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/drawable/thunder_day_2.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/drawable/thunder_night_2.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/drawable/thunder_weather_2.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable/windy_day_2.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable/windy_night_2.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/drawable/windy_weather_2.png
Normal file
After Width: | Height: | Size: 886 B |
36
app/src/main/res/font/product_sans.xml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<font-family xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
<font
|
||||||
|
app:fontStyle="normal"
|
||||||
|
app:fontWeight="400"
|
||||||
|
app:font="@font/product_sans_regular" />
|
||||||
|
<font
|
||||||
|
app:fontStyle="italic"
|
||||||
|
app:fontWeight="400"
|
||||||
|
app:font="@font/product_sans_italic" />
|
||||||
|
<font
|
||||||
|
app:fontStyle="normal"
|
||||||
|
app:fontWeight="200"
|
||||||
|
app:font="@font/product_sans_light" />
|
||||||
|
<font
|
||||||
|
app:fontStyle="normal"
|
||||||
|
app:fontWeight="300"
|
||||||
|
app:font="@font/product_sans_thin" />
|
||||||
|
<font
|
||||||
|
app:fontStyle="normal"
|
||||||
|
app:fontWeight="700"
|
||||||
|
app:font="@font/product_sans_medium" />
|
||||||
|
<font
|
||||||
|
app:fontStyle="normal"
|
||||||
|
app:fontWeight="800"
|
||||||
|
app:font="@font/product_sans_bold" />
|
||||||
|
<font
|
||||||
|
app:fontStyle="italic"
|
||||||
|
app:fontWeight="800"
|
||||||
|
app:font="@font/product_sans_bold_italic" />
|
||||||
|
<font
|
||||||
|
app:fontStyle="normal"
|
||||||
|
app:fontWeight="900"
|
||||||
|
app:font="@font/product_sans_black" />
|
||||||
|
</font-family>
|
BIN
app/src/main/res/font/product_sans_black.ttf
Normal file
BIN
app/src/main/res/font/product_sans_bold.ttf
Executable file
BIN
app/src/main/res/font/product_sans_bold_italic.ttf
Executable file
BIN
app/src/main/res/font/product_sans_italic.ttf
Executable file
BIN
app/src/main/res/font/product_sans_light.ttf
Normal file
BIN
app/src/main/res/font/product_sans_medium.ttf
Normal file
BIN
app/src/main/res/font/product_sans_regular.ttf
Executable file
BIN
app/src/main/res/font/product_sans_thin.ttf
Normal file
@ -84,6 +84,7 @@
|
|||||||
android:textColorHint="@color/colorSecondaryText"
|
android:textColorHint="@color/colorSecondaryText"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:id="@+id/search"
|
android:id="@+id/search"
|
||||||
|
android:fontFamily="@font/product_sans"
|
||||||
android:gravity="center_vertical|start"
|
android:gravity="center_vertical|start"
|
||||||
android:hint="@string/search"
|
android:hint="@string/search"
|
||||||
android:text="@={viewModel.searchInput}"
|
android:text="@={viewModel.searchInput}"
|
||||||
|
@ -87,6 +87,7 @@
|
|||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:hint="@string/settings_date_format_title"
|
android:hint="@string/settings_date_format_title"
|
||||||
|
android:fontFamily="@font/product_sans"
|
||||||
android:text="@={viewModel.dateInput}"
|
android:text="@={viewModel.dateInput}"
|
||||||
android:autofillHints=""
|
android:autofillHints=""
|
||||||
tools:ignore="TextFields" />
|
tools:ignore="TextFields" />
|
||||||
@ -116,7 +117,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:id="@+id/date_format_value"
|
android:id="@+id/date_format_value"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Button"
|
android:textAppearance="@style/AnotherWidget.Settings.Title"
|
||||||
android:letterSpacing="0"
|
android:letterSpacing="0"
|
||||||
android:textColor="@color/colorPrimaryText"
|
android:textColor="@color/colorPrimaryText"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
android:paddingRight="16dp"
|
android:paddingRight="16dp"
|
||||||
android:inputType="textCapWords"
|
android:inputType="textCapWords"
|
||||||
android:id="@+id/location"
|
android:id="@+id/location"
|
||||||
|
android:fontFamily="@font/product_sans"
|
||||||
android:gravity="center_vertical|start"
|
android:gravity="center_vertical|start"
|
||||||
android:hint="@string/search"
|
android:hint="@string/search"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingBottom="20dp"
|
android:paddingBottom="20dp"
|
||||||
android:textColor="@color/colorSecondaryText"
|
android:textColor="@color/colorSecondaryText"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/AnotherWidget.Settings.Subtitle"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/support_dev_subtitle" />
|
android:text="@string/support_dev_subtitle" />
|
||||||
|
@ -80,6 +80,7 @@
|
|||||||
app:boxStrokeColor="@color/colorAccent"
|
app:boxStrokeColor="@color/colorAccent"
|
||||||
app:hintTextColor="@color/colorAccent"
|
app:hintTextColor="@color/colorAccent"
|
||||||
android:hint="@string/api_key_hint"
|
android:hint="@string/api_key_hint"
|
||||||
|
android:fontFamily="@font/product_sans"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textDirection="locale"
|
android:textDirection="locale"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||||
@ -88,6 +89,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textDirection="locale"
|
android:textDirection="locale"
|
||||||
|
android:fontFamily="@font/product_sans"
|
||||||
android:gravity="center_vertical|start" />
|
android:gravity="center_vertical|start" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
android:paddingBottom="16dp"
|
android:paddingBottom="16dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
|
android:textAppearance="@style/AnotherWidget.Settings.Title"
|
||||||
app:textAllCaps="false"
|
app:textAllCaps="false"
|
||||||
android:letterSpacing="0"
|
android:letterSpacing="0"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -29,7 +29,7 @@
|
|||||||
android:text="Titolo"
|
android:text="Titolo"
|
||||||
android:textColor="@color/colorPrimaryText"/>
|
android:textColor="@color/colorPrimaryText"/>
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
android:textAppearance="@style/AnotherWidget.Settings.Subtitle"
|
||||||
app:textAllCaps="false"
|
app:textAllCaps="false"
|
||||||
android:letterSpacing="0"
|
android:letterSpacing="0"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
|
android:textAppearance="@style/AnotherWidget.Settings.Title"
|
||||||
app:textAllCaps="false"
|
app:textAllCaps="false"
|
||||||
android:letterSpacing="0"
|
android:letterSpacing="0"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -22,12 +22,11 @@
|
|||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:paddingLeft="32dp"
|
android:paddingLeft="32dp"
|
||||||
android:paddingRight="32dp"
|
android:paddingRight="32dp"
|
||||||
android:textSize="16sp"
|
|
||||||
android:id="@+id/header_text"
|
android:id="@+id/header_text"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textColor="@color/colorPrimaryText"/>
|
android:textColor="@color/colorPrimaryText"/>
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
|
android:textAppearance="@style/AnotherWidget.Settings.Subtitle"
|
||||||
app:textAllCaps="false"
|
app:textAllCaps="false"
|
||||||
android:letterSpacing="0"
|
android:letterSpacing="0"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -38,7 +37,6 @@
|
|||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:paddingLeft="32dp"
|
android:paddingLeft="32dp"
|
||||||
android:paddingRight="32dp"
|
android:paddingRight="32dp"
|
||||||
android:textSize="15sp"
|
|
||||||
android:id="@+id/warning_text"
|
android:id="@+id/warning_text"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textColor="@color/warningColorText"/>
|
android:textColor="@color/warningColorText"/>
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
android:duplicateParentState="true"
|
android:duplicateParentState="true"
|
||||||
android:id="@+id/label"
|
android:id="@+id/label"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
|
android:textStyle="bold"
|
||||||
android:textColor="@color/colorAccent"
|
android:textColor="@color/colorAccent"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Button"
|
android:textAppearance="@style/TextAppearance.AppCompat.Button"
|
||||||
app:textAllCaps="false" />
|
app:textAllCaps="false" />
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
|
android:textAppearance="@style/AnotherWidget.Settings.Title"
|
||||||
app:textAllCaps="false"
|
app:textAllCaps="false"
|
||||||
android:letterSpacing="0"
|
android:letterSpacing="0"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -28,7 +28,6 @@
|
|||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:paddingLeft="32dp"
|
android:paddingLeft="32dp"
|
||||||
android:paddingRight="32dp"
|
android:paddingRight="32dp"
|
||||||
android:textSize="16sp"
|
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:id="@+id/header_text"
|
android:id="@+id/header_text"
|
||||||
@ -49,7 +48,7 @@
|
|||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
|
android:textAppearance="@style/AnotherWidget.Settings.Subtitle"
|
||||||
app:textAllCaps="false"
|
app:textAllCaps="false"
|
||||||
android:letterSpacing="0"
|
android:letterSpacing="0"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -58,7 +57,6 @@
|
|||||||
android:paddingBottom="16dp"
|
android:paddingBottom="16dp"
|
||||||
android:paddingLeft="32dp"
|
android:paddingLeft="32dp"
|
||||||
android:paddingRight="32dp"
|
android:paddingRight="32dp"
|
||||||
android:textSize="15sp"
|
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:id="@+id/text_alpha"
|
android:id="@+id/text_alpha"
|
||||||
|
@ -25,9 +25,10 @@
|
|||||||
android:paddingBottom="12dp"
|
android:paddingBottom="12dp"
|
||||||
android:duplicateParentState="true"
|
android:duplicateParentState="true"
|
||||||
android:id="@+id/label"
|
android:id="@+id/label"
|
||||||
android:textSize="15sp"
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
android:textColor="@drawable/menu_text_color"
|
android:textColor="@drawable/menu_text_color"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Button"
|
android:textAppearance="@style/AnotherWidget.Settings.Subtitle"
|
||||||
app:textAllCaps="false" />
|
app:textAllCaps="false" />
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/colorPrimaryText"
|
android:textColor="@color/colorPrimaryText"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Button"
|
android:textAppearance="@style/AnotherWidget.Settings.Title"
|
||||||
app:textAllCaps="false"
|
app:textAllCaps="false"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
@ -28,7 +28,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:textColor="@color/colorSecondaryText"
|
android:textColor="@color/colorSecondaryText"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Button"
|
android:textAppearance="@style/AnotherWidget.Settings.Title"
|
||||||
app:textAllCaps="false"
|
app:textAllCaps="false"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
|
android:textAppearance="@style/AnotherWidget.Settings.Title"
|
||||||
app:textAllCaps="false"
|
app:textAllCaps="false"
|
||||||
android:letterSpacing="0"
|
android:letterSpacing="0"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -29,7 +29,7 @@
|
|||||||
android:background="@color/disabledButtonBackground" />
|
android:background="@color/disabledButtonBackground" />
|
||||||
<EditText
|
<EditText
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="64dp"
|
||||||
android:background="@color/colorPrimaryDark"
|
android:background="@color/colorPrimaryDark"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingEnd="56dp"
|
android:paddingEnd="56dp"
|
||||||
@ -37,13 +37,12 @@
|
|||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="24dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:id="@+id/notes"
|
android:id="@+id/notes"
|
||||||
android:gravity="center_vertical|start"
|
android:gravity="center"
|
||||||
android:textDirection="locale"
|
android:textDirection="locale"
|
||||||
android:textAlignment="viewStart"
|
android:fontFamily="@font/product_sans"
|
||||||
android:lines="1"
|
android:inputType="textCapSentences|textMultiLine"
|
||||||
android:inputType="textCapSentences"
|
android:maxLines="2"
|
||||||
android:maxLines="1"
|
android:lines="2"
|
||||||
android:singleLine="true"
|
|
||||||
android:autofillHints=""
|
android:autofillHints=""
|
||||||
tools:ignore="TextFields" />
|
tools:ignore="TextFields" />
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:text="@string/app_name"
|
android:text="@string/app_name"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:textStyle="bold"
|
||||||
android:layout_marginBottom="1dp"
|
android:layout_marginBottom="1dp"
|
||||||
style="@style/AnotherWidget.Main.Title"/>
|
style="@style/AnotherWidget.Main.Title"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -274,6 +274,43 @@
|
|||||||
style="@style/AnotherWidget.Settings.Subtitle"/>
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:paddingBottom="16dp"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:id="@+id/action_widget_update_frequency"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:src="@drawable/round_update"
|
||||||
|
android:tint="@color/colorPrimaryText"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/AnotherWidget.Settings.Title"
|
||||||
|
android:text="@string/settings_widget_update_frequency_title"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/widget_update_frequency_label"
|
||||||
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
android:text="@string/clock_warning"
|
android:text="@string/clock_warning"
|
||||||
android:textColor="@color/colorPrimaryText"
|
android:textColor="@color/colorPrimaryText"
|
||||||
android:letterSpacing="0"
|
android:letterSpacing="0"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Button"
|
android:textAppearance="@style/AnotherWidget.Settings.Title"
|
||||||
app:textAllCaps="false" />
|
app:textAllCaps="false" />
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -149,6 +149,43 @@
|
|||||||
style="@style/AnotherWidget.Settings.Subtitle"/>
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:paddingBottom="16dp"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:id="@+id/action_clock_text_color"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:src="@drawable/round_palette"
|
||||||
|
android:tint="@color/colorPrimaryText"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/AnotherWidget.Settings.Title"
|
||||||
|
android:text="@string/settings_clock_text_color_title"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/clock_text_color_label"
|
||||||
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -187,43 +224,6 @@
|
|||||||
style="@style/AnotherWidget.Settings.Subtitle"/>
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingTop="16dp"
|
|
||||||
android:paddingBottom="16dp"
|
|
||||||
android:paddingLeft="8dp"
|
|
||||||
android:paddingRight="8dp"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:id="@+id/action_clock_text_color"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:src="@drawable/round_palette"
|
|
||||||
android:tint="@color/colorPrimaryText"/>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingLeft="8dp"
|
|
||||||
android:paddingRight="8dp"
|
|
||||||
android:orientation="vertical">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="@style/AnotherWidget.Settings.Title"
|
|
||||||
android:text="@string/settings_clock_text_color_title"/>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/clock_text_color_label"
|
|
||||||
style="@style/AnotherWidget.Settings.Subtitle"/>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -316,6 +316,7 @@
|
|||||||
android:text="@string/clock_warning"
|
android:text="@string/clock_warning"
|
||||||
android:textColor="@color/colorPrimaryText"
|
android:textColor="@color/colorPrimaryText"
|
||||||
android:letterSpacing="0"
|
android:letterSpacing="0"
|
||||||
|
android:fontFamily="@font/product_sans"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
app:textAllCaps="false" />
|
app:textAllCaps="false" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -55,6 +55,43 @@
|
|||||||
style="@style/AnotherWidget.Settings.Subtitle"/>
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:paddingBottom="16dp"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:id="@+id/action_font_color"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:src="@drawable/round_palette"
|
||||||
|
android:tint="@color/colorPrimaryText"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/AnotherWidget.Settings.Title"
|
||||||
|
android:text="@string/settings_font_color_title"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/font_color_label"
|
||||||
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -103,7 +140,7 @@
|
|||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:id="@+id/action_font_color"
|
android:id="@+id/action_secondary_font_color"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
@ -121,11 +158,11 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/AnotherWidget.Settings.Title"
|
style="@style/AnotherWidget.Settings.Title"
|
||||||
android:text="@string/settings_font_color_title"/>
|
android:text="@string/settings_secondary_font_color_title"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/font_color_label"
|
android:id="@+id/secondary_font_color_label"
|
||||||
style="@style/AnotherWidget.Settings.Subtitle"/>
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
android:text="@string/settings_title"
|
android:text="@string/settings_title"
|
||||||
android:textColor="@color/colorPrimaryText"
|
android:textColor="@color/colorPrimaryText"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
android:textAppearance="@style/AnotherWidget.Main.Title"
|
||||||
tools:ignore="RelativeOverlap" />
|
tools:ignore="RelativeOverlap" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
android:text="@string/weather_warning"
|
android:text="@string/weather_warning"
|
||||||
android:textColor="@color/colorPrimaryText"
|
android:textColor="@color/colorPrimaryText"
|
||||||
android:letterSpacing="0"
|
android:letterSpacing="0"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Button"
|
android:textAppearance="@style/AnotherWidget.Settings.Title"
|
||||||
app:textAllCaps="false" />
|
app:textAllCaps="false" />
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -286,6 +286,43 @@
|
|||||||
style="@style/AnotherWidget.Settings.Subtitle"/>
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:paddingBottom="16dp"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:id="@+id/action_weather_icon_pack"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:src="@drawable/round_cloud_queue"
|
||||||
|
android:tint="@color/colorPrimaryText"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/AnotherWidget.Settings.Title"
|
||||||
|
android:text="@string/settings_weather_icon_pack_title"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/label_weather_icon_pack"
|
||||||
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -39,22 +39,6 @@
|
|||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
style="@style/AnotherWidget.Settings.Title"
|
style="@style/AnotherWidget.Settings.Title"
|
||||||
android:text="@string/settings_show_music_title"/>
|
android:text="@string/settings_show_music_title"/>
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="36dp"
|
|
||||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
|
||||||
android:letterSpacing="0"
|
|
||||||
android:textAllCaps="false"
|
|
||||||
android:clickable="true"
|
|
||||||
android:layout_marginStart="-8dp"
|
|
||||||
android:layout_marginBottom="-8dp"
|
|
||||||
android:paddingBottom="0dp"
|
|
||||||
android:paddingTop="0dp"
|
|
||||||
android:focusable="true"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/button"
|
|
||||||
android:textColor="@color/errorColorText"
|
|
||||||
android:text="@string/action_grant_permission"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
android:id="@+id/header"
|
android:id="@+id/header"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
|
android:textAppearance="@style/AnotherWidget.Settings.Title"
|
||||||
app:textAllCaps="false"
|
app:textAllCaps="false"
|
||||||
android:letterSpacing="0"
|
android:letterSpacing="0"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textColor="@color/colorPrimaryText"
|
android:textColor="@color/colorPrimaryText"
|
||||||
android:letterSpacing="0"
|
android:letterSpacing="0"
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"/>
|
android:textAppearance="@style/AnotherWidget.Settings.Title"/>
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -42,6 +42,7 @@
|
|||||||
android:paddingRight="12dp"
|
android:paddingRight="12dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="12.00$"
|
android:text="12.00$"
|
||||||
|
android:fontFamily="@font/product_sans"
|
||||||
android:textColor="@color/colorAccent"
|
android:textColor="@color/colorAccent"
|
||||||
android:id="@+id/product_price"
|
android:id="@+id/product_price"
|
||||||
android:textSize="14sp"/>
|
android:textSize="14sp"/>
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:id="@+id/empty_weather_icon"
|
android:id="@+id/empty_weather_icon"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
android:layout_marginEnd="4dp"/>
|
android:layout_marginEnd="8dp"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -156,9 +156,9 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/next_event_date"
|
android:id="@+id/next_event_date"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:ellipsize="end"
|
|
||||||
android:includeFontPadding="false"
|
android:includeFontPadding="false"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/AnotherWidget.Subtitle" />
|
style="@style/AnotherWidget.Subtitle" />
|
||||||
|
@ -230,4 +230,15 @@
|
|||||||
<string name="settings_request_fitness_access">We need a few permissions to get your daily steps from Google Fit.</string>
|
<string name="settings_request_fitness_access">We need a few permissions to get your daily steps from Google Fit.</string>
|
||||||
<string name="settings_ampm_indicator_title">Show AM/PM Indicator</string>
|
<string name="settings_ampm_indicator_title">Show AM/PM Indicator</string>
|
||||||
<string name="daily_steps_counter">%d steps today</string>
|
<string name="daily_steps_counter">%d steps today</string>
|
||||||
|
<string name="settings_secondary_font_color_title">Second row text color</string>
|
||||||
|
<string name="soon">soon</string>
|
||||||
|
<string name="now">now</string>
|
||||||
|
<string name="settings_widget_update_frequency_title">Time left update frequency</string>
|
||||||
|
<string name="settings_widget_update_frequency_subtitle">High frequency causes more battery consume</string>
|
||||||
|
<string name="settings_widget_update_frequency_low">Low</string>
|
||||||
|
<string name="settings_widget_update_frequency_default">Default</string>
|
||||||
|
<string name="settings_widget_update_frequency_high">High</string>
|
||||||
|
<string name="settings_weather_icon_pack_title">Icon pack</string>
|
||||||
|
<string name="settings_weather_icon_pack_default">Default</string>
|
||||||
|
<string name="settings_weather_icon_pack_minimal">Minimal</string>
|
||||||
</resources>
|
</resources>
|
@ -210,4 +210,15 @@
|
|||||||
<string name="settings_request_fitness_access">We need a few permissions to get your daily steps from Google Fit.</string>
|
<string name="settings_request_fitness_access">We need a few permissions to get your daily steps from Google Fit.</string>
|
||||||
<string name="settings_ampm_indicator_title">Show AM/PM Indicator</string>
|
<string name="settings_ampm_indicator_title">Show AM/PM Indicator</string>
|
||||||
<string name="daily_steps_counter">%d steps today</string>
|
<string name="daily_steps_counter">%d steps today</string>
|
||||||
|
<string name="settings_secondary_font_color_title">Second row text color</string>
|
||||||
|
<string name="soon">soon</string>
|
||||||
|
<string name="now">now</string>
|
||||||
|
<string name="settings_widget_update_frequency_title">Time left update frequency</string>
|
||||||
|
<string name="settings_widget_update_frequency_subtitle">High frequency causes more battery consume</string>
|
||||||
|
<string name="settings_widget_update_frequency_low">Low</string>
|
||||||
|
<string name="settings_widget_update_frequency_default">Default</string>
|
||||||
|
<string name="settings_widget_update_frequency_high">High</string>
|
||||||
|
<string name="settings_weather_icon_pack_title">Icon pack</string>
|
||||||
|
<string name="settings_weather_icon_pack_default">Default</string>
|
||||||
|
<string name="settings_weather_icon_pack_minimal">Minimal</string>
|
||||||
</resources>
|
</resources>
|
@ -98,7 +98,8 @@
|
|||||||
<string name="settings_second_row_info_subtitle_0">Orario evento</string>
|
<string name="settings_second_row_info_subtitle_0">Orario evento</string>
|
||||||
<string name="settings_second_row_info_subtitle_1">Location evento</string>
|
<string name="settings_second_row_info_subtitle_1">Location evento</string>
|
||||||
<string name="settings_second_row_info_subtitle_2">Mostra orario prossimo allarme</string>
|
<string name="settings_second_row_info_subtitle_2">Mostra orario prossimo allarme</string>
|
||||||
<string name="settings_font_color_title">Colore Testo</string>
|
<string name="settings_font_color_title">Colore testo prima riga</string>
|
||||||
|
<string name="settings_secondary_font_color_title">Colore testo seconda riga</string>
|
||||||
<string name="title_main_text_size">Dimensione Testo Prima Riga</string>
|
<string name="title_main_text_size">Dimensione Testo Prima Riga</string>
|
||||||
<string name="title_second_text_size">Dimensione Testo Seconda Riga</string>
|
<string name="title_second_text_size">Dimensione Testo Seconda Riga</string>
|
||||||
<string name="settings_clock_title">Orologio</string>
|
<string name="settings_clock_title">Orologio</string>
|
||||||
@ -209,4 +210,14 @@
|
|||||||
<string name="settings_request_fitness_access">Abbiamo bisogno di alcuni permessi per leggere i tuoi passi di oggi da Google Fit.</string>
|
<string name="settings_request_fitness_access">Abbiamo bisogno di alcuni permessi per leggere i tuoi passi di oggi da Google Fit.</string>
|
||||||
<string name="settings_ampm_indicator_title">Mostra AM/PM</string>
|
<string name="settings_ampm_indicator_title">Mostra AM/PM</string>
|
||||||
<string name="daily_steps_counter">%d passi</string>
|
<string name="daily_steps_counter">%d passi</string>
|
||||||
|
<string name="soon">a breve</string>
|
||||||
|
<string name="now">ora</string>
|
||||||
|
<string name="settings_widget_update_frequency_title">Frequenza aggiornamento tempo rimanente</string>
|
||||||
|
<string name="settings_widget_update_frequency_subtitle">Maggiore è la frequenza maggiore sarà il consumo di batteria</string>
|
||||||
|
<string name="settings_widget_update_frequency_low">Bassa</string>
|
||||||
|
<string name="settings_widget_update_frequency_default">Default</string>
|
||||||
|
<string name="settings_widget_update_frequency_high">Alta</string>
|
||||||
|
<string name="settings_weather_icon_pack_title">Icon pack</string>
|
||||||
|
<string name="settings_weather_icon_pack_default">Default</string>
|
||||||
|
<string name="settings_weather_icon_pack_minimal">Minimal</string>
|
||||||
</resources>
|
</resources>
|
@ -104,7 +104,8 @@
|
|||||||
<string name="settings_second_row_info_subtitle_1">Event address</string>
|
<string name="settings_second_row_info_subtitle_1">Event address</string>
|
||||||
<string name="settings_second_row_info_subtitle_0">Event time</string>
|
<string name="settings_second_row_info_subtitle_0">Event time</string>
|
||||||
<string name="settings_second_row_info_subtitle_2">Show next alarm time</string>
|
<string name="settings_second_row_info_subtitle_2">Show next alarm time</string>
|
||||||
<string name="settings_font_color_title">Text color</string>
|
<string name="settings_font_color_title">First row text color</string>
|
||||||
|
<string name="settings_secondary_font_color_title">Second row text color</string>
|
||||||
<string name="settings_background_color_title">Background color</string>
|
<string name="settings_background_color_title">Background color</string>
|
||||||
<string name="title_main_text_size">First row text size</string>
|
<string name="title_main_text_size">First row text size</string>
|
||||||
<string name="title_second_text_size">Second row text size</string>
|
<string name="title_second_text_size">Second row text size</string>
|
||||||
@ -222,4 +223,14 @@
|
|||||||
<string name="battery_low_warning">Low battery level</string>
|
<string name="battery_low_warning">Low battery level</string>
|
||||||
<string name="settings_ampm_indicator_title">Show AM/PM Indicator</string>
|
<string name="settings_ampm_indicator_title">Show AM/PM Indicator</string>
|
||||||
<string name="daily_steps_counter">%d steps so far</string>
|
<string name="daily_steps_counter">%d steps so far</string>
|
||||||
|
<string name="soon">soon</string>
|
||||||
|
<string name="now">now</string>
|
||||||
|
<string name="settings_widget_update_frequency_title">Time left update frequency</string>
|
||||||
|
<string name="settings_widget_update_frequency_subtitle">High frequency causes more battery consume</string>
|
||||||
|
<string name="settings_widget_update_frequency_low">Low</string>
|
||||||
|
<string name="settings_widget_update_frequency_default">Default</string>
|
||||||
|
<string name="settings_widget_update_frequency_high">High</string>
|
||||||
|
<string name="settings_weather_icon_pack_title">Icon pack</string>
|
||||||
|
<string name="settings_weather_icon_pack_default">Default</string>
|
||||||
|
<string name="settings_weather_icon_pack_minimal">Minimal</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -19,15 +19,18 @@
|
|||||||
|
|
||||||
<style name="AnotherWidget.Main.Title" parent="TextAppearance.AppCompat.Button">
|
<style name="AnotherWidget.Main.Title" parent="TextAppearance.AppCompat.Button">
|
||||||
<item name="android:textColor">@color/colorPrimaryText</item>
|
<item name="android:textColor">@color/colorPrimaryText</item>
|
||||||
<item name="android:textSize">18sp</item>
|
<item name="android:textSize">20sp</item>
|
||||||
<item name="textAllCaps">false</item>
|
<item name="textAllCaps">false</item>
|
||||||
<item name="android:gravity">center</item>
|
<item name="android:gravity">center</item>
|
||||||
|
<item name="android:textStyle">bold</item>
|
||||||
|
<item name="android:fontFamily">@font/product_sans</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AnotherWidget.Main.Subtitle" parent="TextAppearance.AppCompat.Small">
|
<style name="AnotherWidget.Main.Subtitle" parent="TextAppearance.AppCompat.Small">
|
||||||
<item name="android:textColor">@color/colorSecondaryText</item>
|
<item name="android:textColor">@color/colorSecondaryText</item>
|
||||||
<item name="android:textSize">16sp</item>
|
<item name="android:textSize">16sp</item>
|
||||||
<item name="android:gravity">center</item>
|
<item name="android:gravity">center</item>
|
||||||
|
<item name="android:fontFamily">@font/product_sans</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AnotherWidget.Main.Description" parent="TextAppearance.AppCompat.Small">
|
<style name="AnotherWidget.Main.Description" parent="TextAppearance.AppCompat.Small">
|
||||||
@ -35,6 +38,7 @@
|
|||||||
<item name="android:textSize">18sp</item>
|
<item name="android:textSize">18sp</item>
|
||||||
<item name="android:gravity">center</item>
|
<item name="android:gravity">center</item>
|
||||||
<item name="android:alpha">0.6</item>
|
<item name="android:alpha">0.6</item>
|
||||||
|
<item name="android:fontFamily">@font/product_sans</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AnotherWidget.Main.Button" parent="TextAppearance.AppCompat.Button">
|
<style name="AnotherWidget.Main.Button" parent="TextAppearance.AppCompat.Button">
|
||||||
@ -45,6 +49,7 @@
|
|||||||
<item name="android:clickable">true</item>
|
<item name="android:clickable">true</item>
|
||||||
<item name="android:focusable">true</item>
|
<item name="android:focusable">true</item>
|
||||||
<item name="android:foreground">?android:attr/selectableItemBackground</item>
|
<item name="android:foreground">?android:attr/selectableItemBackground</item>
|
||||||
|
<item name="android:fontFamily">@font/product_sans</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AnotherWidget.Main.Button.Dark" parent="TextAppearance.AppCompat.Button">
|
<style name="AnotherWidget.Main.Button.Dark" parent="TextAppearance.AppCompat.Button">
|
||||||
@ -56,6 +61,7 @@
|
|||||||
<item name="android:focusable">true</item>
|
<item name="android:focusable">true</item>
|
||||||
<item name="android:textSize">12sp</item>
|
<item name="android:textSize">12sp</item>
|
||||||
<item name="android:foreground">?android:attr/selectableItemBackground</item>
|
<item name="android:foreground">?android:attr/selectableItemBackground</item>
|
||||||
|
<item name="android:fontFamily">@font/product_sans</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AnotherWidget.Main.Button.TabBar" parent="TextAppearance.AppCompat.Button">
|
<style name="AnotherWidget.Main.Button.TabBar" parent="TextAppearance.AppCompat.Button">
|
||||||
@ -63,23 +69,27 @@
|
|||||||
<item name="android:gravity">center</item>
|
<item name="android:gravity">center</item>
|
||||||
<item name="android:padding">8dp</item>
|
<item name="android:padding">8dp</item>
|
||||||
<item name="android:textSize">12sp</item>
|
<item name="android:textSize">12sp</item>
|
||||||
|
<item name="android:fontFamily">@font/product_sans</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AnotherWidget.Settings.Header" parent="TextAppearance.AppCompat.Medium">
|
<style name="AnotherWidget.Settings.Header" parent="TextAppearance.AppCompat.Medium">
|
||||||
<item name="android:textColor">@color/colorPrimaryText</item>
|
<item name="android:textColor">@color/colorPrimaryText</item>
|
||||||
<item name="android:textSize">14sp</item>
|
<item name="android:textSize">15sp</item>
|
||||||
<item name="android:textStyle">bold</item>
|
<item name="android:textStyle">bold</item>
|
||||||
|
<item name="android:fontFamily">@font/product_sans</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AnotherWidget.Settings.Title" parent="TextAppearance.AppCompat.Medium">
|
<style name="AnotherWidget.Settings.Title" parent="TextAppearance.AppCompat.Medium">
|
||||||
<item name="android:textColor">@color/colorPrimaryText</item>
|
<item name="android:textColor">@color/colorPrimaryText</item>
|
||||||
<item name="android:textSize">16sp</item>
|
<item name="android:textSize">17sp</item>
|
||||||
<item name="android:textStyle">bold</item>
|
<item name="android:textStyle">bold</item>
|
||||||
|
<item name="android:fontFamily">@font/product_sans</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AnotherWidget.Settings.Subtitle" parent="TextAppearance.AppCompat.Medium">
|
<style name="AnotherWidget.Settings.Subtitle" parent="TextAppearance.AppCompat.Medium">
|
||||||
<item name="android:textSize">14sp</item>
|
<item name="android:textSize">15sp</item>
|
||||||
<item name="android:textColor">@color/colorSecondaryText</item>
|
<item name="android:textColor">@color/colorSecondaryText</item>
|
||||||
|
<item name="android:fontFamily">@font/product_sans</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AnotherWidget.Title" parent="TextAppearance.AppCompat.Medium">
|
<style name="AnotherWidget.Title" parent="TextAppearance.AppCompat.Medium">
|
||||||
@ -88,12 +98,14 @@
|
|||||||
<item name="android:textSize">24sp</item>
|
<item name="android:textSize">24sp</item>
|
||||||
<item name="android:shadowRadius">5</item>
|
<item name="android:shadowRadius">5</item>
|
||||||
<item name="android:gravity">center</item>
|
<item name="android:gravity">center</item>
|
||||||
|
<item name="android:fontFamily">@font/product_sans</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AnotherWidget.Subtitle" parent="TextAppearance.AppCompat.Small">
|
<style name="AnotherWidget.Subtitle" parent="TextAppearance.AppCompat.Small">
|
||||||
<item name="android:textColor">@color/colorAccent</item>
|
<item name="android:textColor">@color/colorAccent</item>
|
||||||
<item name="android:textSize">16sp</item>
|
<item name="android:textSize">16sp</item>
|
||||||
<item name="android:gravity">center_horizontal</item>
|
<item name="android:gravity">center_horizontal</item>
|
||||||
|
<item name="android:fontFamily">@font/product_sans</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AnotherWidget.Date" parent="AnotherWidget.Subtitle">
|
<style name="AnotherWidget.Date" parent="AnotherWidget.Subtitle">
|
||||||
@ -101,6 +113,7 @@
|
|||||||
|
|
||||||
<style name="AnotherWidget.Date.Big" parent="AnotherWidget.Title">
|
<style name="AnotherWidget.Date.Big" parent="AnotherWidget.Title">
|
||||||
<item name="android:textSize">22sp</item>
|
<item name="android:textSize">22sp</item>
|
||||||
|
<item name="android:fontFamily">@font/product_sans</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="BottomSheet" parent="@style/Widget.Design.BottomSheet.Modal">
|
<style name="BottomSheet" parent="@style/Widget.Design.BottomSheet.Modal">
|
||||||
@ -113,6 +126,7 @@
|
|||||||
<item name="android:windowIsFloating">false</item>
|
<item name="android:windowIsFloating">false</item>
|
||||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
<item name="android:windowSoftInputMode">adjustResize</item>
|
<item name="android:windowSoftInputMode">adjustResize</item>
|
||||||
|
<item name="android:fontFamily">@font/product_sans</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="BottomSheetDialogTheme" parent="BaseBottomSheetDialog" />
|
<style name="BottomSheetDialogTheme" parent="BaseBottomSheetDialog" />
|
||||||
|