mirror of
https://github.com/Michatec/michas-droid.git
synced 2026-05-31 10:22:43 +02:00
- Migrate build system to Kotlin DSL (build.gradle.kts, settings.gradle.kts)
- Upgrade `compileSdk` and `targetSdk` to 36 - Add German (`de`) localization and string resources - Add Michachatz F-Droid repository to default list - Update dependencies and plugins in `libs.versions.toml` - Remove manual signing configuration from README.md - Refactor code to use non-deprecated `alpha` property and context-based string retrieval - Clean up `buildConfig` and locale filtering logic
This commit is contained in:
@@ -89,6 +89,12 @@ data class Repository(
|
||||
"Michachatz official repository. Everything in this repository is always built from the source code.",
|
||||
21, true, "3546DCBDD900F280EE2161CC163C1156BE2C2F3EB810415115039E0C7D3242C0", ""
|
||||
),
|
||||
if (isFdroid) null else defaultRepository(
|
||||
"https://repo.dgplayser.duckdns.org/fdroid/archive",
|
||||
"Michachatz F-Droid Repo",
|
||||
"Michachatz official repository. Everything in this repository is always built from the source code.",
|
||||
21, true, "3546DCBDD900F280EE2161CC163C1156BE2C2F3EB810415115039E0C7D3242C0 ", ""
|
||||
),
|
||||
defaultRepository(
|
||||
"https://f-droid.org/repo",
|
||||
"F-Droid",
|
||||
|
||||
@@ -39,7 +39,7 @@ open class DrawableWrapper(val drawable: Drawable): Drawable() {
|
||||
}
|
||||
|
||||
override fun getAlpha(): Int {
|
||||
return DrawableCompat.getAlpha(drawable)
|
||||
return drawable.alpha
|
||||
}
|
||||
|
||||
override fun setAlpha(alpha: Int) {
|
||||
|
||||
@@ -35,6 +35,7 @@ import android.widget.ProgressBar
|
||||
import android.widget.Switch
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.core.content.ContextCompat.getString
|
||||
import androidx.core.graphics.ColorUtils
|
||||
import androidx.core.text.HtmlCompat
|
||||
import androidx.core.text.util.LinkifyCompat
|
||||
@@ -373,7 +374,6 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private class LinkViewHolder(itemView: View): OverlappingViewHolder(itemView) {
|
||||
companion object {
|
||||
private val measurement = Measurement<Int>()
|
||||
@@ -385,7 +385,7 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
|
||||
init {
|
||||
val margin = measurement.invalidate(itemView.resources) {
|
||||
text.text = "measure"
|
||||
text.text = itemView.context.getString(R.string.measure)
|
||||
link.visibility = View.GONE
|
||||
measurement.measure(itemView)
|
||||
((itemView.measuredHeight - icon.measuredHeight) / 2f).roundToInt()
|
||||
@@ -397,7 +397,6 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private class PermissionsViewHolder(itemView: View): OverlappingViewHolder(itemView) {
|
||||
companion object {
|
||||
private val measurement = Measurement<Int>()
|
||||
@@ -408,7 +407,7 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
|
||||
init {
|
||||
val margin = measurement.invalidate(itemView.resources) {
|
||||
text.text = "measure"
|
||||
text.text = itemView.context.getString(R.string.measure)
|
||||
measurement.measure(itemView)
|
||||
((itemView.measuredHeight - icon.measuredHeight) / 2f).roundToInt()
|
||||
}
|
||||
|
||||
@@ -75,8 +75,9 @@ object Utils {
|
||||
.filter { it.language in supportedLanguages }
|
||||
.let { it.ifEmpty { listOf(Locale.US) } }
|
||||
Locale.setDefault(compatibleLocales.first())
|
||||
val newConfiguration = Configuration(configuration)
|
||||
newConfiguration.setLocales(LocaleList(*compatibleLocales.toTypedArray()))
|
||||
val newConfiguration = Configuration(configuration).apply {
|
||||
setLocales(LocaleList(*compatibleLocales.toTypedArray()))
|
||||
}
|
||||
return context.createConfigurationContext(newConfiguration)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user