Migrate to viewbinding and kotlin gradle scripts

- Replaced kotlinx sythetic with viewbinding
- Update build scripts to kotlin
- Intoduced version catalog, similar to Commons
- Updated kotlin from 1.7.10 to 1.9.0
- Updated room from 2.5.2 to 2.6.0-alpha02 (same as Commons)
- Updated Android Gradle Plugin to 8.1.0
This commit is contained in:
Ensar Sarajčić
2023-08-07 16:13:37 +02:00
parent c573e659e9
commit e1ca1d4a86
50 changed files with 1553 additions and 1309 deletions

View File

@ -65,9 +65,9 @@ open class SimpleActivity : BaseSimpleActivity() {
protected fun getTabIcon(position: Int): Drawable {
val drawableId = when (position) {
LOCATION_CONTACTS_TAB -> R.drawable.ic_person_vector
LOCATION_FAVORITES_TAB -> R.drawable.ic_star_vector
else -> R.drawable.ic_people_vector
LOCATION_CONTACTS_TAB -> com.simplemobiletools.commons.R.drawable.ic_person_vector
LOCATION_FAVORITES_TAB -> com.simplemobiletools.commons.R.drawable.ic_star_vector
else -> com.simplemobiletools.commons.R.drawable.ic_people_vector
}
return resources.getColoredDrawableWithColor(drawableId, getProperTextColor())
@ -75,9 +75,9 @@ open class SimpleActivity : BaseSimpleActivity() {
protected fun getTabLabel(position: Int): String {
val stringId = when (position) {
LOCATION_CONTACTS_TAB -> R.string.contacts_tab
LOCATION_FAVORITES_TAB -> R.string.favorites_tab
else -> R.string.groups_tab
LOCATION_CONTACTS_TAB -> com.simplemobiletools.commons.R.string.contacts_tab
LOCATION_FAVORITES_TAB -> com.simplemobiletools.commons.R.string.favorites_tab
else -> com.simplemobiletools.commons.R.string.groups_tab
}
return resources.getString(stringId)