Skip to content

Commit

Permalink
更新Compose及Kotlin版本.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhujiang2 committed May 16, 2021
1 parent 5c10bc1 commit 43e20ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion banner/src/main/java/com/zj/banner/ui/Pager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.zj.banner.ui

import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.SpringSpec
import androidx.compose.animation.core.tween
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.gestures.draggable
import androidx.compose.foundation.gestures.rememberDraggableState
Expand Down Expand Up @@ -66,7 +67,7 @@ class PagerState(
}
_currentPageOffset.animateTo(
currentPageOffset.roundToInt().toFloat(),
animationSpec = SpringSpec()
animationSpec = tween(durationMillis = 2000)
)
currentPage -= currentPageOffset.roundToInt()
snapToOffset(0f)
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
compose_version = '1.0.0-beta03'
compose_version = '1.0.0-beta04'
}
repositories {
google()
Expand All @@ -10,8 +10,8 @@ buildscript {
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0-alpha13'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31"
classpath 'com.android.tools.build:gradle:7.0.0-alpha14'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down

0 comments on commit 43e20ca

Please sign in to comment.