Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
90f0d7de00 | |||
66ad5e0839 | |||
2ac7e072e5 | |||
a3392dabcf | |||
c2c54a04d2 | |||
2c237058b3 | |||
aa2b4b0510 |
BIN
.idea/caches/build_file_checksums.ser
generated
@ -18,8 +18,8 @@ android {
|
|||||||
applicationId "com.tommasoberlose.anotherwidget"
|
applicationId "com.tommasoberlose.anotherwidget"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 96
|
versionCode 98
|
||||||
versionName "2.0.9"
|
versionName "2.0.10"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ object Constants {
|
|||||||
|
|
||||||
enum class WeatherIconPack(val value: Int) {
|
enum class WeatherIconPack(val value: Int) {
|
||||||
DEFAULT(0),
|
DEFAULT(0),
|
||||||
MINIMAL(1)
|
MINIMAL(1),
|
||||||
|
COOL(2)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -128,10 +128,8 @@ object IntentHelper {
|
|||||||
|
|
||||||
putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, e.startDate + start.timeZone.getOffset(start.timeInMillis))
|
putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, e.startDate + start.timeZone.getOffset(start.timeInMillis))
|
||||||
putExtra(CalendarContract.EXTRA_EVENT_END_TIME, e.endDate + end.timeZone.getOffset(end.timeInMillis))
|
putExtra(CalendarContract.EXTRA_EVENT_END_TIME, e.endDate + end.timeZone.getOffset(end.timeInMillis))
|
||||||
// putExtra(CalendarContract.EXTRA_EVENT_ALL_DAY, 1)
|
putExtra(CalendarContract.EXTRA_EVENT_ALL_DAY, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.d("ciao", "intent: ${this} - extras: ${this.extras}")
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
getCalendarIntent(context).apply {
|
getCalendarIntent(context).apply {
|
||||||
|
@ -47,81 +47,177 @@ object WeatherHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getWeatherIconResource(icon: String): Int {
|
fun getWeatherIconResource(icon: String): Int {
|
||||||
when (icon) {
|
return when (icon) {
|
||||||
"01d" -> {
|
"01d" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.clear_day else R.drawable.clear_day_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.clear_day_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.clear_day_2
|
||||||
|
else -> R.drawable.clear_day
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"02d" -> {
|
"02d" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.partly_cloudy else R.drawable.partly_cloudy_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.partly_cloudy_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.partly_cloudy_2
|
||||||
|
else -> R.drawable.partly_cloudy
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"03d" -> {
|
"03d" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.mostly_cloudy else R.drawable.mostly_cloudy_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.mostly_cloudy_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.mostly_cloudy_2
|
||||||
|
else -> R.drawable.mostly_cloudy
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"04d" -> {
|
"04d" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.cloudy_weather else R.drawable.cloudy_weather_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.cloudy_weather_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.cloudy_weather_2
|
||||||
|
else -> R.drawable.cloudy_weather
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"09d" -> {
|
"09d" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.storm_weather_day else R.drawable.storm_weather_day_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.storm_weather_day_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.storm_weather_day_2
|
||||||
|
else -> R.drawable.storm_weather_day
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"10d" -> {
|
"10d" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.rainy_day else R.drawable.rainy_day_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.rainy_day_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.rainy_day_2
|
||||||
|
else -> R.drawable.rainy_day
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"11d" -> {
|
"11d" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.thunder_day else R.drawable.thunder_day_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.thunder_day_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.thunder_day_2
|
||||||
|
else -> R.drawable.thunder_day
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"13d" -> {
|
"13d" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.snow_day else R.drawable.snow_day_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.snow_day_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.snow_day_2
|
||||||
|
else -> R.drawable.snow_day
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"50d" -> {
|
"50d" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.haze_day else R.drawable.haze_day_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.haze_day_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.haze_day_2
|
||||||
|
else -> R.drawable.haze_day
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"80d" -> {
|
"80d" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.windy_day else R.drawable.windy_day_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.windy_day_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.windy_day_2
|
||||||
|
else -> R.drawable.windy_day
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"81d" -> {
|
"81d" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.rain_snow_day else R.drawable.rain_snow_day_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.rain_snow_day_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.rain_snow_day_2
|
||||||
|
else -> R.drawable.rain_snow_day
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"82d" -> {
|
"82d" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.haze_weather else R.drawable.haze_weather_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.haze_weather_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.haze_weather_2
|
||||||
|
else -> R.drawable.haze_weather
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"01n" -> {
|
"01n" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.clear_night else R.drawable.clear_night_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.clear_night_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.clear_night_2
|
||||||
|
else -> R.drawable.clear_night
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"02n" -> {
|
"02n" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.partly_cloudy_night else R.drawable.partly_cloudy_night_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.partly_cloudy_night_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.partly_cloudy_night_2
|
||||||
|
else -> R.drawable.partly_cloudy_night
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"03n" -> {
|
"03n" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.mostly_cloudy_night else R.drawable.mostly_cloudy_night_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.mostly_cloudy_night_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.mostly_cloudy_night_2
|
||||||
|
else -> R.drawable.mostly_cloudy_night
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"04n" -> {
|
"04n" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.cloudy_weather else R.drawable.cloudy_weather_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.cloudy_weather_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.cloudy_weather_2
|
||||||
|
else -> R.drawable.cloudy_weather
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"09n" -> {
|
"09n" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.storm_weather_night else R.drawable.storm_weather_night_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.storm_weather_night_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.storm_weather_night_2
|
||||||
|
else -> R.drawable.storm_weather_night
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"10n" -> {
|
"10n" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.rainy_night else R.drawable.rainy_night_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.rainy_night_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.rainy_night_2
|
||||||
|
else -> R.drawable.rainy_night
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"11n" -> {
|
"11n" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.thunder_night else R.drawable.thunder_night_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.thunder_night_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.thunder_night_2
|
||||||
|
else -> R.drawable.thunder_night
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"13n" -> {
|
"13n" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.snow_night else R.drawable.snow_night_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.snow_night_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.snow_night_2
|
||||||
|
else -> R.drawable.snow_night
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"50n" -> {
|
"50n" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.haze_night else R.drawable.haze_night_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.haze_night_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.haze_night_2
|
||||||
|
else -> R.drawable.haze_night
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"80n" -> {
|
"80n" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.windy_night else R.drawable.windy_night_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.windy_night_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.windy_night_2
|
||||||
|
else -> R.drawable.windy_night
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"81n" -> {
|
"81n" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.rain_snow_night else R.drawable.rain_snow_night_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.rain_snow_night_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.rain_snow_night_2
|
||||||
|
else -> R.drawable.rain_snow_night
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"82n" -> {
|
"82n" -> {
|
||||||
return if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) R.drawable.haze_weather else R.drawable.haze_weather_2
|
when (Preferences.weatherIconPack) {
|
||||||
|
Constants.WeatherIconPack.COOL.value -> R.drawable.haze_weather_3
|
||||||
|
Constants.WeatherIconPack.MINIMAL.value -> R.drawable.haze_weather_2
|
||||||
|
else -> R.drawable.haze_weather
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
return R.drawable.unknown
|
return R.drawable.unknown
|
||||||
|
@ -300,7 +300,7 @@ class CalendarTabFragment : Fragment() {
|
|||||||
action_show_until.setOnClickListener {
|
action_show_until.setOnClickListener {
|
||||||
if (Preferences.showEvents) {
|
if (Preferences.showEvents) {
|
||||||
val dialog = BottomSheetMenu<Int>(requireContext(), header = getString(R.string.settings_show_until_title)).setSelectedValue(Preferences.showUntil)
|
val dialog = BottomSheetMenu<Int>(requireContext(), header = getString(R.string.settings_show_until_title)).setSelectedValue(Preferences.showUntil)
|
||||||
intArrayOf(6,7,0,1,2,3).forEach {
|
intArrayOf(6,7,0,1,2,3, 4, 5).forEach {
|
||||||
dialog.addItem(getString(SettingsStringHelper.getShowUntilString(it)), it)
|
dialog.addItem(getString(SettingsStringHelper.getShowUntilString(it)), it)
|
||||||
}
|
}
|
||||||
dialog.addOnSelectItemListener { value ->
|
dialog.addOnSelectItemListener { value ->
|
||||||
|
@ -251,7 +251,6 @@ class GeneralTabFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
action_date_format.setOnClickListener {
|
action_date_format.setOnClickListener {
|
||||||
if (Preferences.showEvents) {
|
|
||||||
val now = Calendar.getInstance()
|
val now = Calendar.getInstance()
|
||||||
val dialog = BottomSheetMenu<String>(requireContext(), header = getString(R.string.settings_date_format_title)).setSelectedValue(Preferences.dateFormat)
|
val dialog = BottomSheetMenu<String>(requireContext(), header = getString(R.string.settings_date_format_title)).setSelectedValue(Preferences.dateFormat)
|
||||||
|
|
||||||
@ -269,7 +268,6 @@ class GeneralTabFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
action_background_color.setOnClickListener {
|
action_background_color.setOnClickListener {
|
||||||
BottomSheetColorPicker(requireContext(),
|
BottomSheetColorPicker(requireContext(),
|
||||||
|
@ -10,6 +10,7 @@ import android.view.LayoutInflater
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.os.BuildCompat
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import androidx.databinding.DataBindingUtil
|
import androidx.databinding.DataBindingUtil
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
@ -28,7 +29,9 @@ import com.tommasoberlose.anotherwidget.databinding.FragmentWeatherSettingsBindi
|
|||||||
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.global.RequestCode
|
import com.tommasoberlose.anotherwidget.global.RequestCode
|
||||||
|
import com.tommasoberlose.anotherwidget.helpers.ColorHelper
|
||||||
import com.tommasoberlose.anotherwidget.helpers.SettingsStringHelper
|
import com.tommasoberlose.anotherwidget.helpers.SettingsStringHelper
|
||||||
|
import com.tommasoberlose.anotherwidget.helpers.WeatherHelper
|
||||||
import com.tommasoberlose.anotherwidget.receivers.WeatherReceiver
|
import com.tommasoberlose.anotherwidget.receivers.WeatherReceiver
|
||||||
import com.tommasoberlose.anotherwidget.ui.activities.ChooseApplicationActivity
|
import com.tommasoberlose.anotherwidget.ui.activities.ChooseApplicationActivity
|
||||||
import com.tommasoberlose.anotherwidget.ui.activities.CustomLocationActivity
|
import com.tommasoberlose.anotherwidget.ui.activities.CustomLocationActivity
|
||||||
@ -129,9 +132,12 @@ class WeatherTabFragment : Fragment() {
|
|||||||
|
|
||||||
viewModel.weatherIconPack.observe(viewLifecycleOwner, Observer {
|
viewModel.weatherIconPack.observe(viewLifecycleOwner, Observer {
|
||||||
maintainScrollPosition {
|
maintainScrollPosition {
|
||||||
label_weather_icon_pack?.text = when (it) {
|
label_weather_icon_pack?.text = getString(R.string.settings_weather_icon_pack_default).format((it + 1))
|
||||||
Constants.WeatherIconPack.MINIMAL.value -> getString(R.string.settings_weather_icon_pack_minimal)
|
weather_icon_pack.setImageDrawable(ContextCompat.getDrawable(requireContext(), WeatherHelper.getWeatherIconResource("01d")))
|
||||||
else -> getString(R.string.settings_weather_icon_pack_default)
|
if (it == Constants.WeatherIconPack.MINIMAL.value) {
|
||||||
|
weather_icon_pack.setColorFilter(ContextCompat.getColor(requireContext(), R.color.colorPrimaryText))
|
||||||
|
} else {
|
||||||
|
weather_icon_pack.setColorFilter(ContextCompat.getColor(requireContext(), android.R.color.transparent))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
checkLocationPermission()
|
checkLocationPermission()
|
||||||
@ -230,10 +236,11 @@ class WeatherTabFragment : Fragment() {
|
|||||||
|
|
||||||
action_weather_icon_pack.setOnClickListener {
|
action_weather_icon_pack.setOnClickListener {
|
||||||
if (Preferences.showWeather) {
|
if (Preferences.showWeather) {
|
||||||
BottomSheetMenu<Int>(requireContext(), header = getString(R.string.settings_weather_icon_pack_title)).setSelectedValue(Preferences.weatherIconPack)
|
val dialog = 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)
|
Constants.WeatherIconPack.values().forEach {
|
||||||
.addItem(getString(R.string.settings_weather_icon_pack_minimal), Constants.WeatherIconPack.MINIMAL.value)
|
dialog.addItem(getString(R.string.settings_weather_icon_pack_default).format(it.value + 1), it.value)
|
||||||
.addOnSelectItemListener { value ->
|
}
|
||||||
|
dialog.addOnSelectItemListener { value ->
|
||||||
Preferences.weatherIconPack = value
|
Preferences.weatherIconPack = value
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
@ -625,7 +625,7 @@ class MainWidget : AppWidgetProvider() {
|
|||||||
it.setTextColor(ColorHelper.getFontColor())
|
it.setTextColor(ColorHelper.getFontColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) {
|
if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value || Preferences.weatherIconPack == Constants.WeatherIconPack.COOL.value) {
|
||||||
listOf<ImageView>(v.action_next, v.action_previous)
|
listOf<ImageView>(v.action_next, v.action_previous)
|
||||||
} else {
|
} else {
|
||||||
listOf<ImageView>(v.action_next, v.action_previous, v.empty_weather_icon, v.special_weather_icon)
|
listOf<ImageView>(v.action_next, v.action_previous, v.empty_weather_icon, v.special_weather_icon)
|
||||||
@ -637,7 +637,7 @@ class MainWidget : AppWidgetProvider() {
|
|||||||
it.setTextColor(ColorHelper.getSecondaryFontColor())
|
it.setTextColor(ColorHelper.getSecondaryFontColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value) {
|
if (Preferences.weatherIconPack == Constants.WeatherIconPack.DEFAULT.value || Preferences.weatherIconPack == Constants.WeatherIconPack.COOL.value) {
|
||||||
listOf<ImageView>(v.second_row_icon)
|
listOf<ImageView>(v.second_row_icon)
|
||||||
} else {
|
} else {
|
||||||
listOf<ImageView>(v.second_row_icon, v.weather_icon)
|
listOf<ImageView>(v.second_row_icon, v.weather_icon)
|
||||||
|
BIN
app/src/main/res/drawable/clear_day_3.png
Normal file
After Width: | Height: | Size: 685 B |
BIN
app/src/main/res/drawable/clear_night_3.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/drawable/cloudy_weather_3.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable/haze_day_3.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
app/src/main/res/drawable/haze_night_3.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
app/src/main/res/drawable/haze_weather_3.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable/mostly_cloudy_3.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/drawable/mostly_cloudy_night_3.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/drawable/partly_cloudy_3.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/drawable/partly_cloudy_night_3.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/drawable/rain_snow_3.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/drawable/rain_snow_day_3.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
app/src/main/res/drawable/rain_snow_night_3.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
app/src/main/res/drawable/rainy_day_3.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
app/src/main/res/drawable/rainy_night_3.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable/rainy_weather_3.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable/showcase_3.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/drawable/snow_day_3.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
app/src/main/res/drawable/snow_night_3.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
app/src/main/res/drawable/snow_weather_3.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable/storm_weather_3.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/drawable/storm_weather_day_3.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/drawable/storm_weather_night_3.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
app/src/main/res/drawable/thunder_day_3.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
app/src/main/res/drawable/thunder_night_3.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
app/src/main/res/drawable/thunder_weather_3.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable/unknown_3.png
Normal file
After Width: | Height: | Size: 90 B |
BIN
app/src/main/res/drawable/windy_day_3.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
app/src/main/res/drawable/windy_night_3.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
app/src/main/res/drawable/windy_weather_3.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
@ -310,7 +310,6 @@
|
|||||||
style="@style/AnotherWidget.Settings.Subtitle"/>
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -361,5 +360,6 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</layout>
|
</layout>
|
@ -327,6 +327,7 @@
|
|||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
|
android:id="@+id/weather_icon_pack"
|
||||||
android:src="@drawable/round_cloud_queue"
|
android:src="@drawable/round_cloud_queue"
|
||||||
android:tint="@color/colorPrimaryText"/>
|
android:tint="@color/colorPrimaryText"/>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -106,8 +106,7 @@
|
|||||||
<string name="action_open_provider">Gå til OpenWeatherMap.com</string>
|
<string name="action_open_provider">Gå til OpenWeatherMap.com</string>
|
||||||
<string name="api_key_info_all_set">Der kan gå op til 10 minutter inden din API nøgle er aktiveret. Vejret vil blive opdateret så snart det er tilgængeligt.</string>
|
<string name="api_key_info_all_set">Der kan gå op til 10 minutter inden din API nøgle er aktiveret. Vejret vil blive opdateret så snart det er tilgængeligt.</string>
|
||||||
<string name="settings_weather_icon_pack_title">Ikonpakke</string>
|
<string name="settings_weather_icon_pack_title">Ikonpakke</string>
|
||||||
<string name="settings_weather_icon_pack_default">Standard</string>
|
<string name="settings_weather_icon_pack_default">Ikonpakke %d</string>
|
||||||
<string name="settings_weather_icon_pack_minimal">Minimal</string>
|
|
||||||
|
|
||||||
<!-- Clock -->
|
<!-- Clock -->
|
||||||
<string name="settings_clock_title">Ur</string>
|
<string name="settings_clock_title">Ur</string>
|
||||||
|
@ -104,8 +104,7 @@
|
|||||||
<string name="action_open_provider">Kunjungi OpenWeatherMap.com</string>
|
<string name="action_open_provider">Kunjungi OpenWeatherMap.com</string>
|
||||||
<string name="api_key_info_all_set">Mungkin membutuhkan lebih kurang 10 menit sebelum kunci API anda diaktifkan. Cuaca akan diperbarui segera setelah data tersedia.</string>
|
<string name="api_key_info_all_set">Mungkin membutuhkan lebih kurang 10 menit sebelum kunci API anda diaktifkan. Cuaca akan diperbarui segera setelah data tersedia.</string>
|
||||||
<string name="settings_weather_icon_pack_title">Paket ikon</string>
|
<string name="settings_weather_icon_pack_title">Paket ikon</string>
|
||||||
<string name="settings_weather_icon_pack_default">Bawaan</string>
|
<string name="settings_weather_icon_pack_default">Paket ikon %d</string>
|
||||||
<string name="settings_weather_icon_pack_minimal">Minimal</string>
|
|
||||||
|
|
||||||
<!-- Clock -->
|
<!-- Clock -->
|
||||||
<string name="settings_clock_title">Jam</string>
|
<string name="settings_clock_title">Jam</string>
|
||||||
|
@ -102,9 +102,8 @@
|
|||||||
<string name="api_key_subtitle_3">Copia qui la chiave API e salva la nuova configurazione.</string>
|
<string name="api_key_subtitle_3">Copia qui la chiave API e salva la nuova configurazione.</string>
|
||||||
<string name="action_open_provider">Apri OpenWeatherMap.com</string>
|
<string name="action_open_provider">Apri OpenWeatherMap.com</string>
|
||||||
<string name="api_key_info_all_set">La chiave API potrebbe aver bisogno di più di 20 minuti per diventare attiva, aggiorneremo il meteo non appena sarà possibile.</string>
|
<string name="api_key_info_all_set">La chiave API potrebbe aver bisogno di più di 20 minuti per diventare attiva, aggiorneremo il meteo non appena sarà possibile.</string>
|
||||||
<string name="settings_weather_icon_pack_title">Stile icone</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_default">Icon pack %d</string>
|
||||||
<string name="settings_weather_icon_pack_minimal">Minimal</string>
|
|
||||||
|
|
||||||
<!-- Clock -->
|
<!-- Clock -->
|
||||||
<string name="settings_clock_title">Orologio</string>
|
<string name="settings_clock_title">Orologio</string>
|
||||||
|
@ -103,8 +103,7 @@
|
|||||||
<string name="action_open_provider">Перейти на OpenWeatherMap.com</string>
|
<string name="action_open_provider">Перейти на OpenWeatherMap.com</string>
|
||||||
<string name="api_key_info_all_set">Активация ключа может занять до десяти минут. Погода обновится как только появится возможность.</string>
|
<string name="api_key_info_all_set">Активация ключа может занять до десяти минут. Погода обновится как только появится возможность.</string>
|
||||||
<string name="settings_weather_icon_pack_title">Набор иконок</string>
|
<string name="settings_weather_icon_pack_title">Набор иконок</string>
|
||||||
<string name="settings_weather_icon_pack_default">По умолчанию</string>
|
<string name="settings_weather_icon_pack_default">Набор иконок %d</string>
|
||||||
<string name="settings_weather_icon_pack_minimal">Минималистичный</string>
|
|
||||||
|
|
||||||
<!-- Clock -->
|
<!-- Clock -->
|
||||||
<string name="settings_clock_title">Часы</string>
|
<string name="settings_clock_title">Часы</string>
|
||||||
|
@ -57,14 +57,14 @@
|
|||||||
<string name="settings_second_row_info_title">Event info</string>
|
<string name="settings_second_row_info_title">Event info</string>
|
||||||
<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_show_diff_time_title">Time left to the event</string>
|
<string name="settings_show_diff_time_title">Time until the event</string>
|
||||||
<string name="settings_show_declined_events_title">Declined events</string>
|
<string name="settings_show_declined_events_title">Declined events</string>
|
||||||
<string name="default_event_app">Event details</string>
|
<string name="default_event_app">Event details</string>
|
||||||
<string name="default_calendar_app">Default calendar app</string>
|
<string name="default_calendar_app">Default calendar app</string>
|
||||||
<string name="settings_show_multiple_events_title">Multiple events switcher</string>
|
<string name="settings_show_multiple_events_title">Multiple events switcher</string>
|
||||||
<string name="soon">soon</string>
|
<string name="soon">soon</string>
|
||||||
<string name="now">now</string>
|
<string name="now">now</string>
|
||||||
<string name="settings_widget_update_frequency_title">Time left update frequency</string>
|
<string name="settings_widget_update_frequency_title">Time until event update frequency</string>
|
||||||
<string name="settings_widget_update_frequency_subtitle">High frequency causes more battery consumption</string>
|
<string name="settings_widget_update_frequency_subtitle">High frequency causes more battery consumption</string>
|
||||||
<string name="settings_widget_update_frequency_low">Low</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_default">Default</string>
|
||||||
@ -88,8 +88,8 @@
|
|||||||
<string name="settings_weather_refresh_period_subtitle_5">24 hours</string>
|
<string name="settings_weather_refresh_period_subtitle_5">24 hours</string>
|
||||||
<string name="settings_custom_location_title">Location</string>
|
<string name="settings_custom_location_title">Location</string>
|
||||||
<string name="custom_location_gps">Use geolocation</string>
|
<string name="custom_location_gps">Use geolocation</string>
|
||||||
<string name="show_weather_visible">Weather info are visible</string>
|
<string name="show_weather_visible">Weather info is visible</string>
|
||||||
<string name="show_weather_not_visible">Weather info are hidden</string>
|
<string name="show_weather_not_visible">Weather info is hidden</string>
|
||||||
<string name="settings_weather_app_title">Tap on weather opens</string>
|
<string name="settings_weather_app_title">Tap on weather opens</string>
|
||||||
<string name="settings_weather_provider_api_key_title">Weather API key</string>
|
<string name="settings_weather_provider_api_key_title">Weather API key</string>
|
||||||
<string name="settings_weather_provider_api_key_subtitle_all_set">The weather provider is configured correctly</string>
|
<string name="settings_weather_provider_api_key_subtitle_all_set">The weather provider is configured correctly</string>
|
||||||
@ -106,8 +106,7 @@
|
|||||||
<string name="action_open_provider">Go to OpenWeatherMap.com</string>
|
<string name="action_open_provider">Go to OpenWeatherMap.com</string>
|
||||||
<string name="api_key_info_all_set">It may take up to ten minutes before your API key is activated. The weather will be updated as soon as it is available.</string>
|
<string name="api_key_info_all_set">It may take up to ten minutes before your API key is activated. The weather will be updated as soon as it is available.</string>
|
||||||
<string name="settings_weather_icon_pack_title">Icon pack</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_default">Icon pack %d</string>
|
||||||
<string name="settings_weather_icon_pack_minimal">Minimal</string>
|
|
||||||
|
|
||||||
<!-- Clock -->
|
<!-- Clock -->
|
||||||
<string name="settings_clock_title">Clock</string>
|
<string name="settings_clock_title">Clock</string>
|
||||||
|