diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index fb7f4a8..b589d56 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
index 9123189..32db293 100644
--- a/.idea/deploymentTargetDropDown.xml
+++ b/.idea/deploymentTargetDropDown.xml
@@ -7,11 +7,11 @@
-
+
-
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 35ffc65..ae388c2 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -7,14 +7,13 @@
-
+
-
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 2842237..d235beb 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -2,18 +2,23 @@
+
+
+
+
+
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 0000000..0fc3113
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index a54a75d..197a854 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -9,7 +9,7 @@
-
+
diff --git a/README.md b/README.md
index 3357b15..91016ff 100644
--- a/README.md
+++ b/README.md
@@ -90,7 +90,7 @@
Rotate Two Dots
-
diff --git a/app/build.gradle b/app/build.gradle
index 27697a5..a7bae87 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -4,12 +4,12 @@ plugins {
}
android {
- compileSdk 31
-
+ compileSdk 34
+ namespace "com.canopas.composeanimations"
defaultConfig {
applicationId "com.canopas.composeanimations"
minSdk 21
- targetSdk 31
+ targetSdk 34
versionCode 1
versionName "1.0"
@@ -26,11 +26,11 @@ android {
}
}
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 {
compose true
@@ -47,15 +47,15 @@ android {
dependencies {
- implementation 'androidx.core:core-ktx:1.7.0'
+ implementation 'androidx.core:core-ktx:1.10.1'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
- implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
- implementation 'androidx.activity:activity-compose:1.3.1'
+ implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
+ implementation 'androidx.activity:activity-compose:1.7.2'
testImplementation 'junit:junit:4.13.2'
- androidTestImplementation 'androidx.test.ext:junit:1.1.3'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.5'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
}
\ No newline at end of file
diff --git a/app/src/main/java/com/canopas/composeanimations/animations/ProgressAnimation.kt b/app/src/main/java/com/canopas/composeanimations/animations/ProgressAnimation.kt
index ac94fb3..c25b024 100644
--- a/app/src/main/java/com/canopas/composeanimations/animations/ProgressAnimation.kt
+++ b/app/src/main/java/com/canopas/composeanimations/animations/ProgressAnimation.kt
@@ -39,11 +39,6 @@ fun ProgressAnimation() {
remember { Animatable(0f) },
)
- val animationSpec = infiniteRepeatable(
- animation = tween(4000, easing = FastOutLinearInEasing),
- repeatMode = RepeatMode.Restart,
- )
-
dots.forEachIndexed { index, animatable ->
LaunchedEffect(animatable) {
delay(index * 100L)
@@ -64,7 +59,7 @@ fun ProgressAnimation() {
val dys = dots.map { it.value }
- val travelDistance = with(LocalDensity.current) { 15.dp.toPx() }
+ val travelDistance = with(LocalDensity.current) { 30.dp.toPx() }
Row(
modifier = Modifier.fillMaxSize(),
diff --git a/app/src/main/java/com/canopas/composeanimations/animations/RotateDotAnimation.kt b/app/src/main/java/com/canopas/composeanimations/animations/RotateDotAnimation.kt
index a896eae..02087a8 100644
--- a/app/src/main/java/com/canopas/composeanimations/animations/RotateDotAnimation.kt
+++ b/app/src/main/java/com/canopas/composeanimations/animations/RotateDotAnimation.kt
@@ -1,6 +1,10 @@
package com.canopas.composeanimations.animations
-import androidx.compose.animation.core.*
+import androidx.compose.animation.core.FastOutSlowInEasing
+import androidx.compose.animation.core.animateFloat
+import androidx.compose.animation.core.infiniteRepeatable
+import androidx.compose.animation.core.rememberInfiniteTransition
+import androidx.compose.animation.core.tween
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
diff --git a/app/src/main/java/com/canopas/composeanimations/animations/RotateTwoDotsAnimation.kt b/app/src/main/java/com/canopas/composeanimations/animations/RotateTwoDotsAnimation.kt
index eb3de81..0727062 100644
--- a/app/src/main/java/com/canopas/composeanimations/animations/RotateTwoDotsAnimation.kt
+++ b/app/src/main/java/com/canopas/composeanimations/animations/RotateTwoDotsAnimation.kt
@@ -53,8 +53,8 @@ fun RotateTwoDotsAnimation() {
)
)
val rotation by infiniteTransition.animateFloat(
- initialValue = 360F,
- targetValue = 0F,
+ initialValue = 0F,
+ targetValue = 360F,
animationSpec = infiniteRepeatable(
animation = tween(1500, easing = FastOutSlowInEasing),
repeatMode = RepeatMode.Reverse
@@ -78,7 +78,7 @@ fun RotateTwoDotsAnimation() {
})
- val x = (center.x + cos(Math.toRadians(rotation.toDouble())) * 140f).toFloat()
+ val x = (center.x + cos(Math.toRadians(rotation.toDouble())) * 10f).toFloat()
val y = (center.y + sin(Math.toRadians(rotation.toDouble())) * 140f).toFloat()
withTransform({
diff --git a/app/src/main/java/com/canopas/composeanimations/animations/SquareFillLoaderAnimation.kt b/app/src/main/java/com/canopas/composeanimations/animations/SquareFillLoaderAnimation.kt
index a9aa7e4..bf81269 100644
--- a/app/src/main/java/com/canopas/composeanimations/animations/SquareFillLoaderAnimation.kt
+++ b/app/src/main/java/com/canopas/composeanimations/animations/SquareFillLoaderAnimation.kt
@@ -2,7 +2,6 @@ package com.canopas.composeanimations.animations
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.animate
-import androidx.compose.animation.core.rememberInfiniteTransition
import androidx.compose.animation.core.tween
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Box
@@ -22,7 +21,7 @@ import com.canopas.composeanimations.ui.theme.ThemeColor
@Preview
@Composable
-fun previewSquareFillLoaderAnimation() {
+fun PreviewSquareFillLoaderAnimation() {
Surface(
modifier = Modifier
.fillMaxSize(),
@@ -35,8 +34,6 @@ fun previewSquareFillLoaderAnimation() {
@Composable
fun SquareFillLoaderAnimation() {
- val infiniteTransition = rememberInfiniteTransition()
-
var rotation by remember {
mutableStateOf(0f)
}
diff --git a/app/src/main/java/com/canopas/composeanimations/animations/ThreeBounceAnimation.kt b/app/src/main/java/com/canopas/composeanimations/animations/ThreeBounceAnimation.kt
index 4929be2..5f0bb7e 100644
--- a/app/src/main/java/com/canopas/composeanimations/animations/ThreeBounceAnimation.kt
+++ b/app/src/main/java/com/canopas/composeanimations/animations/ThreeBounceAnimation.kt
@@ -59,7 +59,7 @@ fun ThreeBounceAnimation() {
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center
) {
- dys.forEachIndexed { index, dy ->
+ dys.forEachIndexed { _, dy ->
Box(
Modifier
diff --git a/app/src/main/java/com/canopas/composeanimations/animations/TwinCircleAnimation.kt b/app/src/main/java/com/canopas/composeanimations/animations/TwinCircleAnimation.kt
index 1fded9d..fd3c4ce 100644
--- a/app/src/main/java/com/canopas/composeanimations/animations/TwinCircleAnimation.kt
+++ b/app/src/main/java/com/canopas/composeanimations/animations/TwinCircleAnimation.kt
@@ -34,7 +34,7 @@ fun TwinCircleAnimation() {
val twinCircleAnimation by infiniteTransition.animateFloat(
initialValue = 1f,
- targetValue = 7f,
+ targetValue = 9f,
animationSpec = infiniteRepeatable(
animation = tween(1500, easing = FastOutSlowInEasing),
repeatMode = RepeatMode.Reverse
diff --git a/app/src/main/java/com/canopas/composeanimations/animations/WavesAnimation.kt b/app/src/main/java/com/canopas/composeanimations/animations/WavesAnimation.kt
index b5b120f..5afd6d8 100644
--- a/app/src/main/java/com/canopas/composeanimations/animations/WavesAnimation.kt
+++ b/app/src/main/java/com/canopas/composeanimations/animations/WavesAnimation.kt
@@ -12,7 +12,6 @@ import androidx.compose.material.Surface
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.remember
-import androidx.compose.ui.Alignment
import androidx.compose.ui.Alignment.Companion.Center
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
@@ -71,7 +70,7 @@ fun WavesAnimation() {
Box(
Modifier
.size(50.dp)
- .align(Alignment.Center)
+ .align(Center)
.graphicsLayer {
scaleX = dy * 4 + 1
scaleY = dy * 4 + 1
@@ -90,7 +89,7 @@ fun WavesAnimation() {
Box(
Modifier
.size(50.dp)
- .align(Alignment.Center)
+ .align(Center)
.background(color = Color.White, shape = CircleShape)
) {
Icon(
@@ -99,7 +98,7 @@ fun WavesAnimation() {
tint = Color.Black,
modifier = Modifier
.size(32.dp)
- .align(Alignment.Center)
+ .align(Center)
)
}
diff --git a/build.gradle b/build.gradle
index e9d8424..819cfda 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,12 +1,12 @@
buildscript {
ext {
- compose_version = '1.0.1'
+ compose_version = '1.4.3'
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
- id 'com.android.application' version '7.1.1' apply false
- id 'com.android.library' version '7.1.1' apply false
- id 'org.jetbrains.kotlin.android' version '1.5.21' apply false
+ id 'com.android.application' version '8.1.0' apply false
+ id 'com.android.library' version '8.1.0' apply false
+ id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
}
task clean(type: Delete) {
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 6a59299..2a30920 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sat Jan 22 20:12:26 IST 2022
+#Wed Aug 30 21:05:23 IST 2023
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists
-zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists