Fix icon selector
This commit is contained in:
parent
0cdc5a3c6d
commit
e3f4995e93
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@ -22,8 +22,8 @@ android {
|
|||||||
applicationId "com.tommasoberlose.anotherwidget"
|
applicationId "com.tommasoberlose.anotherwidget"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 116
|
versionCode 118
|
||||||
versionName "2.2.0"
|
versionName "2.2.1"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
buildConfigField("String", "GOOGLE_API_KEY", apikeyProperties['GOOGLE_API_KEY'])
|
buildConfigField("String", "GOOGLE_API_KEY", apikeyProperties['GOOGLE_API_KEY'])
|
||||||
|
@ -17,7 +17,6 @@ import com.tommasoberlose.anotherwidget.helpers.WeatherHelper
|
|||||||
class IconPackSelector(context: Context, private val header: String? = null) : BottomSheetDialog(context, R.style.BottomSheetDialogTheme) {
|
class IconPackSelector(context: Context, private val header: String? = null) : BottomSheetDialog(context, R.style.BottomSheetDialogTheme) {
|
||||||
|
|
||||||
private var binding = BottomSheetMenuBinding.inflate(LayoutInflater.from(context))
|
private var binding = BottomSheetMenuBinding.inflate(LayoutInflater.from(context))
|
||||||
private var itemBinding = IconPackMenuItemBinding.inflate(LayoutInflater.from(context))
|
|
||||||
|
|
||||||
override fun show() {
|
override fun show() {
|
||||||
// Header
|
// Header
|
||||||
@ -28,6 +27,7 @@ class IconPackSelector(context: Context, private val header: String? = null) : B
|
|||||||
|
|
||||||
// Menu
|
// Menu
|
||||||
for (item in Constants.WeatherIconPack.values()) {
|
for (item in Constants.WeatherIconPack.values()) {
|
||||||
|
val itemBinding = IconPackMenuItemBinding.inflate(LayoutInflater.from(context))
|
||||||
itemBinding.label.text = context.getString(R.string.settings_weather_icon_pack_default).format(item.value + 1)
|
itemBinding.label.text = context.getString(R.string.settings_weather_icon_pack_default).format(item.value + 1)
|
||||||
itemBinding.root.isSelected = item.value == Preferences.weatherIconPack
|
itemBinding.root.isSelected = item.value == Preferences.weatherIconPack
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user