Skip to content

Commit

Permalink
Bump target&compile SDK to 35 in the demo app (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamGrzybkowski authored Feb 14, 2025
1 parent 717ab28 commit 2a9fa15
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
4 changes: 2 additions & 2 deletions demo-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ fun secretProperties(): Properties {

android {
namespace = "com.gravatar.demoapp"
compileSdk = 34
compileSdk = 35
buildFeatures.buildConfig = true

defaultConfig {
applicationId = "com.gravatar.demoapp"
minSdk = 23
targetSdk = 34
targetSdk = 35
versionCode = 1
versionName = "1.0"

Expand Down
6 changes: 0 additions & 6 deletions demo-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@
</intent-filter>
</activity>


<!-- Lib activities -->
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:theme="@style/Theme.AppCompat" />

<provider
android:name=".DemoFileProvider"
android:authorities="${applicationId}.fileprovider"
Expand Down
4 changes: 1 addition & 3 deletions demo-app/src/main/java/com/gravatar/demoapp/theme/Theme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView
import androidx.core.view.WindowCompat
Expand Down Expand Up @@ -59,8 +58,7 @@ fun GravatarDemoAppTheme(
if (!view.isInEditMode) {
SideEffect {
val window = (view.context as Activity).window
window.statusBarColor = colorScheme.primary.toArgb()
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
Expand Down Expand Up @@ -90,7 +89,6 @@ fun DemoGravatarApp() {

Scaffold(
snackbarHost = { SnackbarHost(hostState = snackbarHostState) },
modifier = Modifier.systemBarsPadding(),
) { innerPadding ->
val defaultErrorMessage = stringResource(R.string.snackbar_unknown_error_message)
GravatarTabs(
Expand Down Expand Up @@ -151,7 +149,7 @@ private fun GravatarTabs(
stringResource(R.string.tab_label_avatar_update),
)

Column(modifier = Modifier.fillMaxSize()) {
Column(modifier = modifier.fillMaxSize()) {
TabRow(selectedTabIndex = tabIndex) {
tabs.forEachIndexed { index, title ->
Tab(
Expand All @@ -162,9 +160,14 @@ private fun GravatarTabs(
}
}
when (tabIndex) {
0 -> AvatarTab(modifier, gravatarUrl, onGravatarUrlChanged, showSnackBar)
1 -> ProfileTab(modifier, showSnackBar)
2 -> AvatarUpdateTab(modifier)
0 -> AvatarTab(
gravatarUrl = gravatarUrl,
onGravatarUrlChanged = onGravatarUrlChanged,
onError = showSnackBar,
)

1 -> ProfileTab(onError = showSnackBar)
2 -> AvatarUpdateTab()
}
}
}
Expand Down

0 comments on commit 2a9fa15

Please sign in to comment.