update to latest commons

This commit is contained in:
FunkyMuse 2023-09-18 12:51:08 +02:00
parent f944266499
commit de2fcf2f8a
4 changed files with 13 additions and 21 deletions

View File

@ -7,12 +7,11 @@ import androidx.activity.compose.setContent
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.compose.runtime.* import androidx.compose.runtime.*
import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalContext
import androidx.core.view.WindowCompat
import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.simplemobiletools.calculator.compose.SettingsScreen import com.simplemobiletools.calculator.compose.SettingsScreen
import com.simplemobiletools.calculator.extensions.* import com.simplemobiletools.calculator.extensions.*
import com.simplemobiletools.commons.activities.CustomizationActivity import com.simplemobiletools.commons.activities.CustomizationActivity
import com.simplemobiletools.commons.compose.extensions.TransparentSystemBars import com.simplemobiletools.commons.compose.extensions.enableEdgeToEdgeSimple
import com.simplemobiletools.commons.compose.extensions.onEventValue import com.simplemobiletools.commons.compose.extensions.onEventValue
import com.simplemobiletools.commons.compose.theme.AppThemeSurface import com.simplemobiletools.commons.compose.theme.AppThemeSurface
import com.simplemobiletools.commons.compose.theme.getAppIconIds import com.simplemobiletools.commons.compose.theme.getAppIconIds
@ -29,9 +28,8 @@ class SettingsActivity : AppCompatActivity() {
@SuppressLint("NewApi") @SuppressLint("NewApi")
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
WindowCompat.setDecorFitsSystemWindows(window, false) enableEdgeToEdgeSimple()
setContent { setContent {
TransparentSystemBars()
AppThemeSurface { AppThemeSurface {
val context = LocalContext.current val context = LocalContext.current
val preventPhoneFromSleeping by preferences.preventPhoneFromSleepingFlow.collectAsStateWithLifecycle(preferences.preventPhoneFromSleeping) val preventPhoneFromSleeping by preferences.preventPhoneFromSleepingFlow.collectAsStateWithLifecycle(preferences.preventPhoneFromSleeping)

View File

@ -1,14 +1,9 @@
package com.simplemobiletools.calculator.compose package com.simplemobiletools.calculator.compose
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.simplemobiletools.commons.R import com.simplemobiletools.commons.R
import com.simplemobiletools.commons.compose.extensions.MyDevices import com.simplemobiletools.commons.compose.extensions.MyDevices
import com.simplemobiletools.commons.compose.settings.SettingsCheckBoxComponent import com.simplemobiletools.commons.compose.settings.SettingsCheckBoxComponent
@ -40,7 +35,7 @@ internal fun SettingsScreen(
lockedCustomizeColorText: String?, lockedCustomizeColorText: String?,
displayLanguage: String displayLanguage: String
) { ) {
SettingsScaffold(title = stringResource(id = R.string.settings), goBack = goBack) { paddingValues -> SettingsScaffold(title = stringResource(id = R.string.settings), goBack = goBack) {
SettingsGroup(title = { SettingsGroup(title = {
SettingsTitleTextComponent(text = stringResource(id = R.string.color_customization)) SettingsTitleTextComponent(text = stringResource(id = R.string.color_customization))
}) { }) {
@ -96,7 +91,6 @@ internal fun SettingsScreen(
onChange = onUseCommaAsDecimalMarkFlow, onChange = onUseCommaAsDecimalMarkFlow,
) )
} }
Spacer(modifier = Modifier.padding(bottom = paddingValues.calculateBottomPadding()))
} }
} }

View File

@ -1,18 +1,18 @@
[versions] [versions]
#jetbrains #jetbrains
kotlin = "1.9.0" kotlin = "1.9.10"
#KSP #KSP
ksp = "1.9.0-1.0.12" ksp = "1.9.10-1.0.13"
#Androidx #Androidx
androidx-customView = "1.2.0-alpha02" androidx-customView = "1.2.0-alpha02"
androidx-customViewPooling = "1.0.0" androidx-customViewPooling = "1.0.0"
androidx-lifecycle = "2.7.0-alpha01" androidx-lifecycle = "2.7.0-alpha02"
#Compose #Compose
composeActivity = "1.8.0-alpha06" composeActivity = "1.8.0-beta01"
compose = "1.6.0-alpha03" compose = "1.6.0-alpha05"
composeCompiler = "1.5.1" composeCompiler = "1.5.3"
composeMaterial3 = "1.2.0-alpha05" composeMaterial3 = "1.2.0-alpha07"
accompanist = "0.33.0-alpha" accompanist = "0.33.1-alpha"
#AutoFitTextView #AutoFitTextView
autofittextview = "0.2.1" autofittextview = "0.2.1"
#exp4j #exp4j
@ -20,7 +20,7 @@ exp4j = "0.4.8"
#Room #Room
room = "2.5.2" room = "2.5.2"
#Simple tools #Simple tools
simple-commons = "65105a24a2" simple-commons = "257a2ab069"
#Gradle #Gradle
gradlePlugins-agp = "8.1.1" gradlePlugins-agp = "8.1.1"
#build #build

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip