build: migrate to agp 8.0.2
This commit is contained in:
parent
73c87aca56
commit
90febae626
|
@ -11,3 +11,4 @@ keystore.properties
|
||||||
fastlane/fastlane.json
|
fastlane/fastlane.json
|
||||||
Gemfile
|
Gemfile
|
||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
|
/java_pid3915.hprof
|
||||||
|
|
|
@ -55,6 +55,7 @@ android {
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
viewBinding = true
|
viewBinding = true
|
||||||
compose = true
|
compose = true
|
||||||
|
buildConfig = true
|
||||||
}
|
}
|
||||||
|
|
||||||
composeOptions {
|
composeOptions {
|
||||||
|
@ -93,6 +94,7 @@ android {
|
||||||
checkReleaseBuilds = false
|
checkReleaseBuilds = false
|
||||||
abortOnError = false
|
abortOnError = false
|
||||||
}
|
}
|
||||||
|
namespace = "com.simplemobiletools.calculator"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="com.simplemobiletools.calculator"
|
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
|
|
||||||
<uses-permission
|
<uses-permission
|
||||||
|
|
|
@ -7,6 +7,7 @@ import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.compose.setContent
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
import com.simplemobiletools.calculator.compose.screens.SettingsScreen
|
import com.simplemobiletools.calculator.compose.screens.SettingsScreen
|
||||||
import com.simplemobiletools.calculator.compose.theme.AppThemeSurface
|
import com.simplemobiletools.calculator.compose.theme.AppThemeSurface
|
||||||
import com.simplemobiletools.calculator.compose.theme.Theme
|
import com.simplemobiletools.calculator.compose.theme.Theme
|
||||||
|
@ -32,7 +33,7 @@ class SettingsActivity : AppCompatActivity() {
|
||||||
AppThemeSurface {
|
AppThemeSurface {
|
||||||
SettingsScreen(
|
SettingsScreen(
|
||||||
customizeColors = ::handleCustomizeColorsClick, goBack = ::finish,
|
customizeColors = ::handleCustomizeColorsClick, goBack = ::finish,
|
||||||
backgroundColor = getProperBackgroundColor()
|
backgroundColor = getProperBackgroundColor(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.toArgb
|
import androidx.compose.ui.graphics.toArgb
|
||||||
|
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.core.graphics.toColor
|
import androidx.core.graphics.toColor
|
||||||
|
@ -21,18 +22,22 @@ import com.simplemobiletools.calculator.compose.settings.SettingsGroup
|
||||||
import com.simplemobiletools.calculator.compose.settings.SettingsPreferenceComponent
|
import com.simplemobiletools.calculator.compose.settings.SettingsPreferenceComponent
|
||||||
import com.simplemobiletools.calculator.compose.settings.SettingsTitleTextComponent
|
import com.simplemobiletools.calculator.compose.settings.SettingsTitleTextComponent
|
||||||
import com.simplemobiletools.calculator.compose.theme.AppThemeSurface
|
import com.simplemobiletools.calculator.compose.theme.AppThemeSurface
|
||||||
|
import com.simplemobiletools.calculator.compose.theme.primaryColor
|
||||||
import com.simplemobiletools.commons.R
|
import com.simplemobiletools.commons.R
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun SettingsScreen(
|
fun SettingsScreen(
|
||||||
goBack: () -> Unit,
|
goBack: () -> Unit,
|
||||||
customizeColors: () -> Unit,
|
customizeColors: () -> Unit,
|
||||||
backgroundColor: Int
|
backgroundColor: Int,
|
||||||
|
topBarsScrolledContainerColor: Color = primaryColor
|
||||||
) {
|
) {
|
||||||
|
val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior(rememberTopAppBarState())
|
||||||
Scaffold(
|
Scaffold(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.background(Color(backgroundColor)),
|
.background(Color(backgroundColor))
|
||||||
|
.nestedScroll(scrollBehavior.nestedScrollConnection),
|
||||||
topBar = {
|
topBar = {
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = {
|
title = {
|
||||||
|
@ -50,7 +55,11 @@ fun SettingsScreen(
|
||||||
.clickable { goBack() }
|
.clickable { goBack() }
|
||||||
.padding(start = 8.dp)
|
.padding(start = 8.dp)
|
||||||
)
|
)
|
||||||
}
|
},
|
||||||
|
scrollBehavior = scrollBehavior,
|
||||||
|
colors = TopAppBarDefaults.largeTopAppBarColors(
|
||||||
|
scrolledContainerColor = topBarsScrolledContainerColor,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
) { paddingValues ->
|
) { paddingValues ->
|
||||||
|
|
|
@ -95,6 +95,66 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_purchase_thank_you_holder2"
|
||||||
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_purchase_thank_you2"
|
||||||
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/purchase_simple_thank_you" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_purchase_thank_you_holder3"
|
||||||
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_purchase_thank_you3"
|
||||||
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/purchase_simple_thank_you" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_purchase_thank_you_holder4"
|
||||||
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_purchase_thank_you4"
|
||||||
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/purchase_simple_thank_you" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_purchase_thank_you_holder5"
|
||||||
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_purchase_thank_you5"
|
||||||
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/purchase_simple_thank_you" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_use_english_holder"
|
android:id="@+id/settings_use_english_holder"
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
|
|
|
@ -21,7 +21,7 @@ room = "2.5.2"
|
||||||
#Simple tools
|
#Simple tools
|
||||||
simple-commons = "4c83ec8740"
|
simple-commons = "4c83ec8740"
|
||||||
#Gradle
|
#Gradle
|
||||||
gradlePlugins-agp = "7.3.1"
|
gradlePlugins-agp = "8.0.2"
|
||||||
#build
|
#build
|
||||||
app-build-compileSDKVersion = "34"
|
app-build-compileSDKVersion = "34"
|
||||||
app-build-targetSDK = "33"
|
app-build-targetSDK = "33"
|
||||||
|
|
Loading…
Reference in New Issue