Add weather icon pack, updates frequency and fix google fit

This commit is contained in:
Tommaso Berlose 2020-05-12 23:54:07 +02:00
parent ba5a860e75
commit ac381c8542
89 changed files with 702 additions and 263 deletions

Binary file not shown.

View File

@ -22,7 +22,7 @@ android {
applicationId "com.tommasoberlose.anotherwidget"
minSdkVersion 23
targetSdkVersion 29
versionCode 87
versionCode 89
versionName "2.0.8"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Binary file not shown.

View File

@ -131,6 +131,7 @@
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
<action android:name="android.intent.action.BATTERY_LOW"/>
<action android:name="android.intent.action.BATTERY_OKAY"/>
<action android:name="android.intent.action.CONFIGURATION_CHANGED"/>
</intent-filter>
</receiver>
@ -143,10 +144,6 @@
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<meta-data
android:name="com.google.android.awareness.API_KEY"
android:value="${AWARENESS_API_KEY}"/>
</application>
</manifest>

View File

@ -70,7 +70,7 @@ class GlanceProviderSortMenu(
// move item in `fromPos` to `toPos` in adapter.
adapter.notifyItemMoved(fromPos, toPos)
val list = GlanceProviderHelper.getGlanceProviders()
val list = GlanceProviderHelper.getGlanceProviders(context)
Collections.swap(list, fromPos, toPos)
GlanceProviderHelper.saveGlanceProviderOrder(list)
return true
@ -87,8 +87,7 @@ class GlanceProviderSortMenu(
mIth.attachToRecyclerView(view.menu)
adapter.updateData(
GlanceProviderHelper.getGlanceProviders()
.filter { it != Constants.GlanceProviderId.BATTERY_LEVEL_LOW }
GlanceProviderHelper.getGlanceProviders(context)
.mapNotNull { GlanceProviderHelper.getGlanceProviderById(context, it) }
)

View File

@ -22,4 +22,15 @@ object Constants {
CUSTOM_INFO("CUSTOM_INFO"),
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)
}
}

View File

@ -40,9 +40,15 @@ object Preferences : KotprefModel() {
var eventAppName by stringPref(key = "PREF_EVENT_APP_NAME", default = "")
var eventAppPackage by stringPref(key = "PREF_EVENT_APP_PACKAGE", default = "")
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 textGlobalAlpha by stringPref(default = "FF")
var textSecondaryColor by stringPref(default = "#FFFFFF")
var textSecondaryAlpha by stringPref(default = "FF")
var backgroundCardColor by stringPref(default = "#000000")
var backgroundCardAlpha by stringPref(default = "00")
@ -50,6 +56,8 @@ object Preferences : KotprefModel() {
var clockTextAlpha by stringPref(default = "FF")
var showAMPMIndicator by booleanPref(default = true)
var weatherIconPack by intPref(default = Constants.WeatherIconPack.DEFAULT.value)
// Global
var textMainSize by floatPref(key = "PREF_TEXT_MAIN_SIZE", default = 26f)
var textSecondSize by floatPref(key = "PREF_TEXT_SECOND_SIZE", default = 18f)

View File

@ -30,6 +30,31 @@ object ColorHelper {
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 {
return try {
Color.parseColor("#%s%s".format(Preferences.clockTextAlpha, Preferences.clockTextColor.replace("#", "")))

View File

@ -23,7 +23,7 @@ object DateHelper {
"%s, %s".format(
SimpleDateFormat("EEEE", Locale.getDefault()).format(date.time),
DateUtils.formatDateTime(context, date.timeInMillis, flags)
).getCapWordString()
)
}
}
@ -33,6 +33,6 @@ object DateHelper {
return "%s, %s".format(
SimpleDateFormat("EEEE", Locale.getDefault()).format(date.time),
DateUtils.formatDateTime(context, date.timeInMillis, flags)
).getCapWordString()
)
}
}

View File

@ -6,12 +6,18 @@ import com.tommasoberlose.anotherwidget.db.EventRepository
import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
import com.tommasoberlose.anotherwidget.models.GlanceProvider
import com.tommasoberlose.anotherwidget.utils.checkIfFitInstalled
import java.util.ArrayList
object GlanceProviderHelper {
fun getGlanceProviders(): ArrayList<Constants.GlanceProviderId> {
fun getGlanceProviders(context: Context): ArrayList<Constants.GlanceProviderId> {
val enabledProviders = Preferences.enabledGlanceProviderOrder.split(",").filter { it != "" }
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 ->
when {

View File

@ -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()
}
}
}

View File

@ -3,6 +3,8 @@ package com.tommasoberlose.anotherwidget.helpers
import android.content.Context
import android.text.format.DateUtils
import com.tommasoberlose.anotherwidget.R
import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
import org.joda.time.DateTime
import java.util.concurrent.TimeUnit
@ -68,9 +70,21 @@ object SettingsStringHelper {
difference += 60 * 1000 - (difference % (60 * 1000))
when {
difference <= 0 || TimeUnit.MILLISECONDS.toHours(difference) < 1 -> {
difference <= 0 -> {
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 -> {
return DateUtils.getRelativeTimeSpanString(start, now, DateUtils.HOUR_IN_MILLIS, DateUtils.FORMAT_ABBREV_RELATIVE).toString()
}

View File

@ -6,6 +6,7 @@ import android.os.Build
import com.google.android.gms.location.LocationServices
import com.tommasoberlose.anotherwidget.R
import com.tommasoberlose.anotherwidget.db.EventRepository
import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
import com.tommasoberlose.anotherwidget.network.WeatherNetworkApi
import com.tommasoberlose.anotherwidget.ui.fragments.MainFragment
@ -49,79 +50,79 @@ object WeatherHelper {
fun getWeatherIconResource(icon: String): Int {
when (icon) {
"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" -> {
return R.drawable.partly_cloudy
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.partly_cloudy else R.drawable.partly_cloudy_2
}
"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" -> {
return R.drawable.cloudy_weather
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.cloudy_weather else R.drawable.cloudy_weather_2
}
"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" -> {
return R.drawable.rainy_day
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.rainy_day else R.drawable.rainy_day_2
}
"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" -> {
return R.drawable.snow_day
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.snow_day else R.drawable.snow_day_2
}
"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" -> {
return R.drawable.windy_day
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.windy_day else R.drawable.windy_day_2
}
"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" -> {
return R.drawable.haze_weather
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.haze_weather else R.drawable.haze_weather_2
}
"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" -> {
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" -> {
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" -> {
return R.drawable.cloudy_weather
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.cloudy_weather else R.drawable.cloudy_weather_2
}
"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" -> {
return R.drawable.rainy_night
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.rainy_night else R.drawable.rainy_night_2
}
"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" -> {
return R.drawable.snow_night
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.snow_night else R.drawable.snow_night_2
}
"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" -> {
return R.drawable.windy_night
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.windy_night else R.drawable.windy_night_2
}
"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" -> {
return R.drawable.haze_weather
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.haze_weather else R.drawable.haze_weather_2
}
else -> {
return R.drawable.unknown

View File

@ -30,6 +30,7 @@ class ActivityDetectionReceiver : BroadcastReceiver() {
val result = ActivityTransitionResult.extractResult(intent)!!
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) {
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)) {
resetDailySteps()
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) {
cancel(PendingIntent.getBroadcast(context, 0, Intent(context, ActivityDetectionReceiver::class.java), 0))
cancel(PendingIntent.getBroadcast(context, 5, Intent(context, ActivityDetectionReceiver::class.java), 0))
setExactAndAllowWhileIdle(
AlarmManager.RTC,
Calendar.getInstance().timeInMillis + 15 * 60 * 1000,
Calendar.getInstance().timeInMillis + 5 * 60 * 1000,
PendingIntent.getBroadcast(
context,
0,
5,
Intent(context, ActivityDetectionReceiver::class.java),
0
)

View File

@ -4,6 +4,7 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.os.BatteryManager
import android.util.Log
import com.tommasoberlose.anotherwidget.global.Preferences
import com.tommasoberlose.anotherwidget.ui.widgets.MainWidget
@ -14,6 +15,8 @@ class BatteryLevelReceiver : BroadcastReceiver() {
Intent.ACTION_BATTERY_OKAY -> Preferences.isBatteryLevelLow = false
}
MainWidget.updateWidget(context)
Log.d("ciao", "intent: ${intent}")
}
}

View File

@ -10,6 +10,8 @@ import androidx.core.app.AlarmManagerCompat
import androidx.core.content.ContextCompat.getSystemService
import com.tommasoberlose.anotherwidget.db.EventRepository
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.models.Event
import com.tommasoberlose.anotherwidget.ui.widgets.MainWidget
@ -68,24 +70,54 @@ class UpdatesReceiver : BroadcastReceiver() {
val diff = Period(now.timeInMillis, event.startDate)
if (event.startDate > now.timeInMillis) {
// Update the widget every hour till the event
setExactAndAllowWhileIdle(
AlarmManager.RTC,
if (event.startDate - diff.hours * 1000 * 60 * 60 > (now.timeInMillis + 120 * 1000)) event.startDate - diff.hours * 1000 * 60 * 60 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
if (diff.hours == 0) {
var minutes = 0
when (Preferences.widgetUpdateFrequency) {
Constants.WidgetUpdateFrequency.DEFAULT.value -> {
minutes = when {
diff.minutes > 50 -> 50
diff.minutes > 30 -> 30
diff.minutes > 15 -> 15
else -> 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 {
// Update the widget one second after the event is finished
val fireTime =
if (event.endDate > now.timeInMillis + 120 * 1000) event.endDate else now.timeInMillis + 120000
setExactAndAllowWhileIdle(
setExact(
AlarmManager.RTC,
fireTime,
PendingIntent.getBroadcast(

View File

@ -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 {
maintainScrollPosition {
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 {
if (Preferences.showEvents) {
val dialog = BottomSheetMenu<Int>(requireContext(), header = getString(R.string.settings_second_row_info_title)).setSelectedValue(Preferences.secondRowInformation)

View File

@ -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 {
maintainScrollPosition {
if (Preferences.backgroundCardAlpha == "00") {
@ -211,6 +233,23 @@ class GeneralTabFragment : Fragment() {
).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 {
if (Preferences.showEvents) {
val now = Calendar.getInstance()

View File

@ -43,7 +43,10 @@ import com.tommasoberlose.anotherwidget.receivers.ActivityDetectionReceiver.Comp
import com.tommasoberlose.anotherwidget.ui.activities.MainActivity
import com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel
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.scrollView
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
@ -79,6 +82,8 @@ class GlanceTabFragment : Fragment() {
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
action_show_steps.isVisible = requireContext().checkIfFitInstalled()
setupListener()
updateNextAlarmWarningUi()
}

View File

@ -124,127 +124,110 @@ class MainFragment : Fragment(), SharedPreferences.OnSharedPreferenceChangeList
private fun updateUI() {
uiJob?.cancel()
if (preview != null) {
preview.clearAnimation()
time_container.clearAnimation()
if (Preferences.showPreview) {
preview.setCardBackgroundColor(
ContextCompat.getColor(
requireContext(),
if (ColorHelper.getFontColor()
.isColorDark()
) android.R.color.white else R.color.colorAccent
)
preview?.clearAnimation()
time_container?.clearAnimation()
if (Preferences.showPreview) {
preview?.setCardBackgroundColor(
ContextCompat.getColor(
requireContext(),
if (ColorHelper.getFontColor()
.isColorDark()
) android.R.color.white else R.color.colorAccent
)
widget_shape_background?.setImageDrawable(
BitmapHelper.getTintedDrawable(
requireContext(),
R.drawable.card_background,
ColorHelper.getBackgroundColor()
)
)
widget_shape_background?.setImageDrawable(
BitmapHelper.getTintedDrawable(
requireContext(),
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) {
generatedView.measure(0, 0)
preview.measure(0, 0)
}
withContext(Dispatchers.Main) {
generatedView.measure(0, 0)
preview?.measure(0, 0)
}
val bitmap = BitmapHelper.getBitmapFromView(
val bitmap = if (preview != null) {
BitmapHelper.getBitmapFromView(
generatedView,
if (preview.width > 0) preview.width else generatedView.measuredWidth,
generatedView.measuredHeight
)
withContext(Dispatchers.Main) {
// Clock
time.setTextColor(ColorHelper.getClockFontColor())
time_am_pm.setTextColor(ColorHelper.getClockFontColor())
time.setTextSize(
TypedValue.COMPLEX_UNIT_SP,
Preferences.clockTextSize.toPixel(requireContext())
)
time_am_pm.setTextSize(
TypedValue.COMPLEX_UNIT_SP,
Preferences.clockTextSize.toPixel(requireContext()) / 5 * 2
)
time_am_pm.isVisible = Preferences.showAMPMIndicator
} else {
null
}
withContext(Dispatchers.Main) {
// Clock
time?.setTextColor(ColorHelper.getClockFontColor())
time_am_pm?.setTextColor(ColorHelper.getClockFontColor())
time?.setTextSize(
TypedValue.COMPLEX_UNIT_SP,
Preferences.clockTextSize.toPixel(requireContext())
)
time_am_pm?.setTextSize(
TypedValue.COMPLEX_UNIT_SP,
Preferences.clockTextSize.toPixel(requireContext()) / 5 * 2
)
time_am_pm?.isVisible = Preferences.showAMPMIndicator
// Clock bottom margin
clock_bottom_margin_none.isVisible =
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.NONE.value
clock_bottom_margin_small.isVisible =
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.SMALL.value
clock_bottom_margin_medium.isVisible =
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.MEDIUM.value
clock_bottom_margin_large.isVisible =
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.LARGE.value
// Clock bottom margin
clock_bottom_margin_none?.isVisible =
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.NONE.value
clock_bottom_margin_small?.isVisible =
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.SMALL.value
clock_bottom_margin_medium?.isVisible =
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.MEDIUM.value
clock_bottom_margin_large?.isVisible =
Preferences.showClock && Preferences.clockBottomMargin == Constants.ClockBottomMargin.LARGE.value
if ((Preferences.showClock && !time_container.isVisible) || (!Preferences.showClock && time_container.isVisible)) {
if (Preferences.showClock) {
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 {
if ((Preferences.showClock && time_container?.isVisible == false) || (!Preferences.showClock && time_container?.isVisible == true)) {
if (Preferences.showClock) {
time_container?.layoutParams = time_container.layoutParams.apply {
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(
preview.height,
PREVIEW_BASE_HEIGHT.toPixel(requireContext()) + if (Preferences.showClock) 100.toPixel(
requireContext()
) else 0
).apply {
duration = 300L
duration = 500L
addUpdateListener {
val animatedValue = animatedValue as Int
val layoutParams = preview.layoutParams
@ -253,14 +236,37 @@ class MainFragment : Fragment(), SharedPreferences.OnSharedPreferenceChangeList
}
}.start()
}
widget_loader.animate().scaleX(0f).scaleY(0f).alpha(0f).setDuration(200L)
.start()
bitmap_container.setImageBitmap(bitmap)
widget.animate().alpha(1f).start()
} else {
time_container?.layoutParams = time_container.layoutParams.apply {
height = RelativeLayout.LayoutParams.WRAP_CONTENT
}
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(
preview.height,
0

View File

@ -5,6 +5,7 @@ import android.app.Activity
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@ -126,6 +127,16 @@ class WeatherTabFragment : Fragment() {
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 {
maintainScrollPosition {
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 {
if (Preferences.showWeather) {
startActivityForResult(

View File

@ -9,6 +9,8 @@ class MainViewModel : ViewModel() {
// General Settings
val textGlobalColor = Preferences.asLiveData(Preferences::textGlobalColor)
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 backgroundCardAlpha = Preferences.asLiveData(Preferences::backgroundCardAlpha)
val textMainSize = Preferences.asLiveData(Preferences::textMainSize)
@ -27,6 +29,7 @@ class MainViewModel : ViewModel() {
val showNextEvent = Preferences.asLiveData(Preferences::showNextEvent)
val openEventDetails = Preferences.asLiveData(Preferences::openEventDetails)
val calendarAppName = Preferences.asLiveData(Preferences::calendarAppName)
val widgetUpdateFrequency = Preferences.asLiveData(Preferences::widgetUpdateFrequency)
// Clock Settings
val showClock = Preferences.asLiveData(Preferences::showClock)
@ -52,6 +55,7 @@ class MainViewModel : ViewModel() {
val customLocationAdd = Preferences.asLiveData(Preferences::customLocationAdd)
val showWeatherWarning = Preferences.asLiveData(Preferences::showWeatherWarning)
val weatherIconPack = Preferences.asLiveData(Preferences::weatherIconPack)
// Glance
val showGlance = Preferences.asLiveData(Preferences::showGlance)

View File

@ -261,7 +261,7 @@ class MainWidget : AppWidgetProvider() {
views.setViewVisibility(R.id.empty_layout_rect, View.GONE)
views.setViewVisibility(R.id.calendar_layout_rect, View.VISIBLE)
} else if (GlanceProviderHelper.showGlanceProviders(context)) {
loop@ for (provider:Constants.GlanceProviderId in GlanceProviderHelper.getGlanceProviders()) {
loop@ for (provider:Constants.GlanceProviderId in GlanceProviderHelper.getGlanceProviders(context)) {
when (provider) {
Constants.GlanceProviderId.PLAYING_SONG -> {
if (MediaPlayerHelper.isSomeonePlaying(context)) {
@ -306,6 +306,13 @@ class MainWidget : AppWidgetProvider() {
}
Constants.GlanceProviderId.GOOGLE_FIT_STEPS -> {
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
}
}
@ -446,7 +453,10 @@ class MainWidget : AppWidgetProvider() {
val eventRepository = EventRepository(context)
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.calendar_layout.visibility = View.GONE
@ -466,7 +476,7 @@ class MainWidget : AppWidgetProvider() {
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) {
SettingsStringHelper.getDifferenceText(
context,
@ -512,7 +522,7 @@ class MainWidget : AppWidgetProvider() {
} else {
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
} else if (GlanceProviderHelper.showGlanceProviders(context)) {
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) {
Constants.GlanceProviderId.PLAYING_SONG -> {
if (MediaPlayerHelper.isSomeonePlaying(context)) {
@ -562,6 +572,7 @@ class MainWidget : AppWidgetProvider() {
if (Preferences.customNotes.isNotEmpty()) {
v.second_row_icon.isVisible = false
v.next_event_date.text = Preferences.customNotes
v.next_event_date.maxLines = 2
break@loop
}
}
@ -587,14 +598,30 @@ class MainWidget : AppWidgetProvider() {
// 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())
}
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())
}
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
listOf<Pair<TextView, Float>>(
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.scaleY = Preferences.textSecondSize / 18f
v.weather_icon.scaleX = Preferences.textSecondSize / 16f
v.weather_icon.scaleY = Preferences.textSecondSize / 16f
v.weather_icon.scaleX = Preferences.textSecondSize / 14f
v.weather_icon.scaleY = Preferences.textSecondSize / 14f
v.empty_weather_icon.scaleX = Preferences.textMainSize / 20f
v.empty_weather_icon.scaleY = Preferences.textMainSize / 20f
v.empty_weather_icon.scaleX = Preferences.textMainSize / 18f
v.empty_weather_icon.scaleY = Preferences.textMainSize / 18f
v.action_next.scaleX = Preferences.textMainSize / 28f
v.action_next.scaleY = Preferences.textMainSize / 28f

View File

@ -212,4 +212,13 @@ fun String.getCapWordString(): String {
} catch (e: Exception) {
this
}
}
fun Context.checkIfFitInstalled(): Boolean {
return try {
packageManager.getPackageInfo("com.google.android.apps.fitness", PackageManager.GET_ACTIVITIES)
true
} catch (e: Exception) {
false
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

View 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>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -84,6 +84,7 @@
android:textColorHint="@color/colorSecondaryText"
android:textAlignment="viewStart"
android:id="@+id/search"
android:fontFamily="@font/product_sans"
android:gravity="center_vertical|start"
android:hint="@string/search"
android:text="@={viewModel.searchInput}"

View File

@ -87,6 +87,7 @@
android:maxLines="1"
android:singleLine="true"
android:hint="@string/settings_date_format_title"
android:fontFamily="@font/product_sans"
android:text="@={viewModel.dateInput}"
android:autofillHints=""
tools:ignore="TextFields" />
@ -116,7 +117,7 @@
android:layout_width="match_parent"
android:layout_height="48dp"
android:id="@+id/date_format_value"
android:textAppearance="@style/TextAppearance.AppCompat.Button"
android:textAppearance="@style/AnotherWidget.Settings.Title"
android:letterSpacing="0"
android:textColor="@color/colorPrimaryText"
android:textSize="20sp"

View File

@ -70,6 +70,7 @@
android:paddingRight="16dp"
android:inputType="textCapWords"
android:id="@+id/location"
android:fontFamily="@font/product_sans"
android:gravity="center_vertical|start"
android:hint="@string/search"
android:textAlignment="viewStart"

View File

@ -55,7 +55,7 @@
android:layout_height="wrap_content"
android:paddingBottom="20dp"
android:textColor="@color/colorSecondaryText"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textAppearance="@style/AnotherWidget.Settings.Subtitle"
android:textSize="16sp"
android:gravity="center"
android:text="@string/support_dev_subtitle" />

View File

@ -80,6 +80,7 @@
app:boxStrokeColor="@color/colorAccent"
app:hintTextColor="@color/colorAccent"
android:hint="@string/api_key_hint"
android:fontFamily="@font/product_sans"
android:textAlignment="viewStart"
android:textDirection="locale"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
@ -88,6 +89,7 @@
android:layout_height="wrap_content"
android:textAlignment="viewStart"
android:textDirection="locale"
android:fontFamily="@font/product_sans"
android:gravity="center_vertical|start" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>

View File

@ -16,7 +16,7 @@
android:paddingBottom="16dp"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
android:textAppearance="@style/AnotherWidget.Settings.Title"
app:textAllCaps="false"
android:letterSpacing="0"
android:layout_width="match_parent"
@ -29,7 +29,7 @@
android:text="Titolo"
android:textColor="@color/colorPrimaryText"/>
<androidx.appcompat.widget.AppCompatTextView
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textAppearance="@style/AnotherWidget.Settings.Subtitle"
app:textAllCaps="false"
android:letterSpacing="0"
android:layout_width="match_parent"

View File

@ -11,7 +11,7 @@
android:visibility="gone"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
android:textAppearance="@style/AnotherWidget.Settings.Title"
app:textAllCaps="false"
android:letterSpacing="0"
android:layout_width="match_parent"
@ -22,12 +22,11 @@
android:paddingBottom="8dp"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:textSize="16sp"
android:id="@+id/header_text"
android:text=""
android:textColor="@color/colorPrimaryText"/>
<androidx.appcompat.widget.AppCompatTextView
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
android:textAppearance="@style/AnotherWidget.Settings.Subtitle"
app:textAllCaps="false"
android:letterSpacing="0"
android:layout_width="match_parent"
@ -38,7 +37,6 @@
android:paddingBottom="8dp"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:textSize="15sp"
android:id="@+id/warning_text"
android:text=""
android:textColor="@color/warningColorText"/>

View File

@ -21,6 +21,7 @@
android:duplicateParentState="true"
android:id="@+id/label"
android:textSize="15sp"
android:textStyle="bold"
android:textColor="@color/colorAccent"
android:textAppearance="@style/TextAppearance.AppCompat.Button"
app:textAllCaps="false" />

View File

@ -19,7 +19,7 @@
android:visibility="gone"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
android:textAppearance="@style/AnotherWidget.Settings.Title"
app:textAllCaps="false"
android:letterSpacing="0"
android:layout_width="match_parent"
@ -28,7 +28,6 @@
android:paddingBottom="8dp"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:textSize="16sp"
android:gravity="start"
android:textAlignment="viewStart"
android:id="@+id/header_text"
@ -49,7 +48,7 @@
android:gravity="center_vertical"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
android:textAppearance="@style/AnotherWidget.Settings.Subtitle"
app:textAllCaps="false"
android:letterSpacing="0"
android:layout_width="match_parent"
@ -58,7 +57,6 @@
android:paddingBottom="16dp"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:textSize="15sp"
android:gravity="start"
android:textAlignment="viewStart"
android:id="@+id/text_alpha"

View File

@ -25,9 +25,10 @@
android:paddingBottom="12dp"
android:duplicateParentState="true"
android:id="@+id/label"
android:textSize="15sp"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@drawable/menu_text_color"
android:textAppearance="@style/TextAppearance.AppCompat.Button"
android:textAppearance="@style/AnotherWidget.Settings.Subtitle"
app:textAllCaps="false" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="24dp"

View File

@ -14,7 +14,7 @@
android:layout_weight="1"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimaryText"
android:textAppearance="@style/TextAppearance.AppCompat.Button"
android:textAppearance="@style/AnotherWidget.Settings.Title"
app:textAllCaps="false"
android:gravity="start"
android:textSize="18sp"
@ -28,7 +28,7 @@
android:layout_height="wrap_content"
android:gravity="start"
android:textColor="@color/colorSecondaryText"
android:textAppearance="@style/TextAppearance.AppCompat.Button"
android:textAppearance="@style/AnotherWidget.Settings.Title"
app:textAllCaps="false"
android:textSize="18sp"
android:textAlignment="viewStart"

View File

@ -6,7 +6,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
android:textAppearance="@style/AnotherWidget.Settings.Title"
app:textAllCaps="false"
android:letterSpacing="0"
android:layout_width="match_parent"
@ -29,7 +29,7 @@
android:background="@color/disabledButtonBackground" />
<EditText
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_height="64dp"
android:background="@color/colorPrimaryDark"
android:paddingStart="16dp"
android:paddingEnd="56dp"
@ -37,13 +37,12 @@
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:id="@+id/notes"
android:gravity="center_vertical|start"
android:gravity="center"
android:textDirection="locale"
android:textAlignment="viewStart"
android:lines="1"
android:inputType="textCapSentences"
android:maxLines="1"
android:singleLine="true"
android:fontFamily="@font/product_sans"
android:inputType="textCapSentences|textMultiLine"
android:maxLines="2"
android:lines="2"
android:autofillHints=""
tools:ignore="TextFields" />
<LinearLayout

View File

@ -45,6 +45,7 @@
android:layout_height="match_parent"
android:text="@string/app_name"
android:gravity="center"
android:textStyle="bold"
android:layout_marginBottom="1dp"
style="@style/AnotherWidget.Main.Title"/>
</LinearLayout>

View File

@ -274,6 +274,43 @@
style="@style/AnotherWidget.Settings.Subtitle"/>
</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
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -48,7 +48,7 @@
android:text="@string/clock_warning"
android:textColor="@color/colorPrimaryText"
android:letterSpacing="0"
android:textAppearance="@style/TextAppearance.AppCompat.Button"
android:textAppearance="@style/AnotherWidget.Settings.Title"
app:textAllCaps="false" />
<com.google.android.material.button.MaterialButton
android:layout_width="wrap_content"
@ -149,6 +149,43 @@
style="@style/AnotherWidget.Settings.Subtitle"/>
</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
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -187,43 +224,6 @@
style="@style/AnotherWidget.Settings.Subtitle"/>
</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
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -316,6 +316,7 @@
android:text="@string/clock_warning"
android:textColor="@color/colorPrimaryText"
android:letterSpacing="0"
android:fontFamily="@font/product_sans"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:textAllCaps="false" />
</LinearLayout>

View File

@ -55,6 +55,43 @@
style="@style/AnotherWidget.Settings.Subtitle"/>
</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
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -103,7 +140,7 @@
android:focusable="true"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical"
android:id="@+id/action_font_color"
android:id="@+id/action_secondary_font_color"
android:orientation="horizontal">
<ImageView
android:layout_width="48dp"
@ -121,11 +158,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Settings.Title"
android:text="@string/settings_font_color_title"/>
android:text="@string/settings_secondary_font_color_title"/>
<TextView
android:layout_width="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"/>
</LinearLayout>
</LinearLayout>

View File

@ -45,7 +45,7 @@
android:text="@string/settings_title"
android:textColor="@color/colorPrimaryText"
android:gravity="center"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textAppearance="@style/AnotherWidget.Main.Title"
tools:ignore="RelativeOverlap" />
</RelativeLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -48,7 +48,7 @@
android:text="@string/weather_warning"
android:textColor="@color/colorPrimaryText"
android:letterSpacing="0"
android:textAppearance="@style/TextAppearance.AppCompat.Button"
android:textAppearance="@style/AnotherWidget.Settings.Title"
app:textAllCaps="false" />
<com.google.android.material.button.MaterialButton
android:layout_width="wrap_content"
@ -286,6 +286,43 @@
style="@style/AnotherWidget.Settings.Subtitle"/>
</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
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -39,22 +39,6 @@
android:textSize="16sp"
style="@style/AnotherWidget.Settings.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>
<ImageView
android:layout_width="48dp"

View File

@ -10,7 +10,7 @@
android:id="@+id/header"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
android:textAppearance="@style/AnotherWidget.Settings.Title"
app:textAllCaps="false"
android:letterSpacing="0"
android:layout_width="match_parent"

View File

@ -26,7 +26,7 @@
android:textSize="16sp"
android:textColor="@color/colorPrimaryText"
android:letterSpacing="0"
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"/>
android:textAppearance="@style/AnotherWidget.Settings.Title"/>
<com.google.android.material.card.MaterialCardView
android:layout_width="wrap_content"
@ -42,6 +42,7 @@
android:paddingRight="12dp"
android:gravity="center"
android:text="12.00$"
android:fontFamily="@font/product_sans"
android:textColor="@color/colorAccent"
android:id="@+id/product_price"
android:textSize="14sp"/>

View File

@ -43,7 +43,7 @@
android:layout_height="20dp"
android:id="@+id/empty_weather_icon"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"/>
android:layout_marginEnd="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -156,9 +156,9 @@
<TextView
android:id="@+id/next_event_date"
android:layout_width="wrap_content"
android:ellipsize="end"
android:lines="1"
android:maxLines="1"
android:ellipsize="end"
android:includeFontPadding="false"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Subtitle" />

View File

@ -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_ampm_indicator_title">Show AM/PM Indicator</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>

View File

@ -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_ampm_indicator_title">Show AM/PM Indicator</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>

View File

@ -98,7 +98,8 @@
<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_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_second_text_size">Dimensione Testo Seconda Riga</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_ampm_indicator_title">Mostra AM/PM</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>

View File

@ -104,7 +104,8 @@
<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_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="title_main_text_size">First 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="settings_ampm_indicator_title">Show AM/PM Indicator</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>

View File

@ -19,15 +19,18 @@
<style name="AnotherWidget.Main.Title" parent="TextAppearance.AppCompat.Button">
<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="android:gravity">center</item>
<item name="android:textStyle">bold</item>
<item name="android:fontFamily">@font/product_sans</item>
</style>
<style name="AnotherWidget.Main.Subtitle" parent="TextAppearance.AppCompat.Small">
<item name="android:textColor">@color/colorSecondaryText</item>
<item name="android:textSize">16sp</item>
<item name="android:gravity">center</item>
<item name="android:fontFamily">@font/product_sans</item>
</style>
<style name="AnotherWidget.Main.Description" parent="TextAppearance.AppCompat.Small">
@ -35,6 +38,7 @@
<item name="android:textSize">18sp</item>
<item name="android:gravity">center</item>
<item name="android:alpha">0.6</item>
<item name="android:fontFamily">@font/product_sans</item>
</style>
<style name="AnotherWidget.Main.Button" parent="TextAppearance.AppCompat.Button">
@ -45,6 +49,7 @@
<item name="android:clickable">true</item>
<item name="android:focusable">true</item>
<item name="android:foreground">?android:attr/selectableItemBackground</item>
<item name="android:fontFamily">@font/product_sans</item>
</style>
<style name="AnotherWidget.Main.Button.Dark" parent="TextAppearance.AppCompat.Button">
@ -56,6 +61,7 @@
<item name="android:focusable">true</item>
<item name="android:textSize">12sp</item>
<item name="android:foreground">?android:attr/selectableItemBackground</item>
<item name="android:fontFamily">@font/product_sans</item>
</style>
<style name="AnotherWidget.Main.Button.TabBar" parent="TextAppearance.AppCompat.Button">
@ -63,23 +69,27 @@
<item name="android:gravity">center</item>
<item name="android:padding">8dp</item>
<item name="android:textSize">12sp</item>
<item name="android:fontFamily">@font/product_sans</item>
</style>
<style name="AnotherWidget.Settings.Header" parent="TextAppearance.AppCompat.Medium">
<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:fontFamily">@font/product_sans</item>
</style>
<style name="AnotherWidget.Settings.Title" parent="TextAppearance.AppCompat.Medium">
<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:fontFamily">@font/product_sans</item>
</style>
<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:fontFamily">@font/product_sans</item>
</style>
<style name="AnotherWidget.Title" parent="TextAppearance.AppCompat.Medium">
@ -88,12 +98,14 @@
<item name="android:textSize">24sp</item>
<item name="android:shadowRadius">5</item>
<item name="android:gravity">center</item>
<item name="android:fontFamily">@font/product_sans</item>
</style>
<style name="AnotherWidget.Subtitle" parent="TextAppearance.AppCompat.Small">
<item name="android:textColor">@color/colorAccent</item>
<item name="android:textSize">16sp</item>
<item name="android:gravity">center_horizontal</item>
<item name="android:fontFamily">@font/product_sans</item>
</style>
<style name="AnotherWidget.Date" parent="AnotherWidget.Subtitle">
@ -101,6 +113,7 @@
<style name="AnotherWidget.Date.Big" parent="AnotherWidget.Title">
<item name="android:textSize">22sp</item>
<item name="android:fontFamily">@font/product_sans</item>
</style>
<style name="BottomSheet" parent="@style/Widget.Design.BottomSheet.Modal">
@ -113,6 +126,7 @@
<item name="android:windowIsFloating">false</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowSoftInputMode">adjustResize</item>
<item name="android:fontFamily">@font/product_sans</item>
</style>
<style name="BottomSheetDialogTheme" parent="BaseBottomSheetDialog" />