Skip to content

Commit

Permalink
[CHORE] Updated various dependencies versions.
Browse files Browse the repository at this point in the history
 - This fixes the animation of lazy items when they hit the border.
[FEAT] Testing new compose blur modifier for BottomNavBar
  • Loading branch information
iZakirSheikh committed Nov 4, 2024
1 parent d50d21b commit c732eaa
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ android {
applicationId = "com.googol.android.apps.photos"
minSdk = 24
targetSdk = 35
versionCode = 26
versionName = "1.0.0-alpha03"
versionCode = 27
versionName = "1.0.0-alpha04"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
20 changes: 17 additions & 3 deletions app/src/main/java/com/zs/gallery/Gallery.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package com.zs.gallery

import android.os.Build
import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Spacer
Expand Down Expand Up @@ -65,8 +66,12 @@ import androidx.navigation.compose.NavHost
import androidx.navigation.compose.currentBackStackEntryAsState
import com.google.accompanist.permissions.ExperimentalPermissionsApi
import com.google.accompanist.permissions.rememberMultiplePermissionsState
import com.primex.core.ImageBrush
import com.primex.core.blur.legacyBackgroundBlur
import com.primex.core.blur.newBackgroundBlur
import com.primex.core.plus
import com.primex.core.textResource
import com.primex.core.visualEffect
import com.primex.material2.Label
import com.primex.material2.OutlinedButton
import com.zs.foundation.AppTheme
Expand Down Expand Up @@ -403,16 +408,25 @@ private fun NavigationBar(

else -> BottomAppBar(
windowInsets = WindowInsets.navigationBars,
backgroundColor = colors.background(1.dp),
contentColor = colors.onBackground,
backgroundColor = Color.Transparent,
contentColor = AppTheme.colors.onBackground,
elevation = 0.dp,
contentPadding = PaddingValues(
horizontal = AppTheme.padding.normal,
vertical = AppTheme.padding.medium
) + PaddingValues(top = 16.dp),
modifier = modifier
.heightIn(BOTTOM_NAV_MIN_HEIGHT)
.clip(BottomNavShape),
.clip(BottomNavShape)
.background(AppTheme.colors.background.copy(if (AppTheme.colors.isLight) 0.73f else 0.8f))
.let {
when(Build.VERSION.SDK_INT){
Build.VERSION_CODES.S -> it.newBackgroundBlur(8.dp, downsample = 0.3f)
else -> it.legacyBackgroundBlur(25f, 0.3f)
}
}
.visualEffect(ImageBrush.NoiseBrush, if (AppTheme.colors.isLight) 0.5f else 0.3f)
,
content = {
Spacer(modifier = Modifier.weight(1f))
// Display routes at the contre of available space
Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[versions]
agp = "8.7.1"
agp = "8.7.2"
kotlin = "2.0.21"
compose = "1.8.0-alpha03"
compose = "1.8.0-alpha05"
media3 = "1.4.1"
toolkit = "2.0.2-rc04"
material_icons = "1.7.3"
toolkit = "2.0.2"
material_icons = "1.7.5"

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
Expand Down

0 comments on commit c732eaa

Please sign in to comment.