Skip to content

Commit

Permalink
Update demo project
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Oct 2, 2023
1 parent 7065e5e commit 007b82a
Show file tree
Hide file tree
Showing 8 changed files with 201 additions and 147 deletions.
15 changes: 8 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@ plugins {
}

android {
compileSdk 33
namespace "io.getstream.androiddeveloperroadmap"
compileSdk 34

defaultConfig {
applicationId "io.getstream.androiddeveloperroadmap"
minSdk 21
targetSdk 33
minSdk 23
targetSdk 34
versionCode 1
versionName "1.0"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}

buildFeatures {
Expand Down Expand Up @@ -50,5 +51,5 @@ dependencies {
implementation "com.github.skydoves:landscapist-coil:$landscapist_version"
implementation "com.github.skydoves:landscapist-placeholder:$landscapist_version"

implementation "com.mxalbert.zoomable:zoomable:$zoomable_version"
implementation "me.saket.telephoto:zoomable:0.6.2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.tooling.preview.Preview
import com.mxalbert.zoomable.Zoomable
import com.skydoves.landscapist.ImageOptions
import com.skydoves.landscapist.coil.CoilImage
import com.skydoves.landscapist.components.rememberImageComponent
import com.skydoves.landscapist.placeholder.shimmer.ShimmerPlugin
import io.getstream.androiddeveloperroadmap.ui.theme.AndroidDeveloperRoadmapTheme
import io.getstream.androiddeveloperroadmap.ui.theme.shimmerHighLight
import me.saket.telephoto.zoomable.rememberZoomableState
import me.saket.telephoto.zoomable.zoomable

class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -52,22 +53,21 @@ class MainActivity : ComponentActivity() {

@Composable
private fun AndroidRoadmap() {
Zoomable(
modifier = Modifier.fillMaxSize(),
) {
val background = MaterialTheme.colors.background
CoilImage(
imageModel = "https://user-images.githubusercontent.com/24237865/144350753-5a52e6e5-3517-476c-8e5c-adad919abe8e.png",
component = rememberImageComponent {
// shows a shimmering effect when loading an image.
+ShimmerPlugin(
baseColor = background,
highlightColor = shimmerHighLight
)
},
imageOptions = ImageOptions(contentScale = ContentScale.Fit)
)
}
val background = MaterialTheme.colors.background
CoilImage(
modifier = Modifier
.fillMaxSize()
.zoomable(rememberZoomableState()),
imageModel = { "https://user-images.githubusercontent.com/24237865/144350753-5a52e6e5-3517-476c-8e5c-adad919abe8e.png" },
component = rememberImageComponent {
// shows a shimmering effect when loading an image.
+ShimmerPlugin(
baseColor = background,
highlightColor = shimmerHighLight
)
},
imageOptions = ImageOptions(contentScale = ContentScale.Fit)
)
}

@Preview(showBackground = true)
Expand Down
12 changes: 7 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
buildscript {
ext {
compose_version = '1.3.0-rc01'
compose_compiler_version = '1.3.2'
compose_activity_version = '1.4.0'
landscapist_version = '2.0.0'
compose_version = '1.5.2'
compose_compiler_version = '1.5.3'
compose_activity_version = '1.7.2'
landscapist_version = '2.2.10'
zoomable_version = '1.5.1'
}
}

plugins {
id "com.diffplug.spotless" version "6.3.0"
id 'com.android.application' version '8.1.2' apply false
id 'org.jetbrains.kotlin.android' version '1.9.10' apply false
id "com.diffplug.spotless" version "6.7.0" apply false
}

subprojects {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Wed Dec 01 10:04:43 KST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 007b82a

Please sign in to comment.