diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index 538075b..a5f05cd 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -21,10 +21,5 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/bouncy/build.gradle b/bouncy/build.gradle
index d027026..586728b 100644
--- a/bouncy/build.gradle
+++ b/bouncy/build.gradle
@@ -6,7 +6,7 @@ apply plugin: 'maven-publish'
def libraryGroupId = 'com.factor'
def libraryArtifactId = 'bouncy'
-def libraryVersion = '1.61'
+def libraryVersion = '1.7'
task androidJavadocs(type: Javadoc) {
@@ -59,10 +59,10 @@ bintray {
vcsUrl = 'https://github.com/Valkriaine/bouncy.git'
publicDownloadNumbers = true
version {
- name = '1.61'
- desc = '1.61 release'
+ name = '1.7'
+ desc = '1.7 release'
released = new Date()
- vcsTag = '1.61'
+ vcsTag = '1.7'
}
}
}
@@ -74,8 +74,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 30
- versionCode 8
- versionName "1.61"
+ versionCode 9
+ versionName "1.7"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
diff --git a/bouncy/src/main/java/com/factor/bouncy/BouncyRecyclerView.kt b/bouncy/src/main/java/com/factor/bouncy/BouncyRecyclerView.kt
index 0621792..980a1ab 100644
--- a/bouncy/src/main/java/com/factor/bouncy/BouncyRecyclerView.kt
+++ b/bouncy/src/main/java/com/factor/bouncy/BouncyRecyclerView.kt
@@ -23,7 +23,7 @@ class BouncyRecyclerView(context: Context, attrs: AttributeSet?) : RecyclerView(
var flingAnimationSize = 0.5f
- var orientation : Int? = VERTICAL
+ var orientation : Int? = 1
set(value)
{
field = value
@@ -110,26 +110,22 @@ class BouncyRecyclerView(context: Context, attrs: AttributeSet?) : RecyclerView(
private fun setupDirection(orientation : Int?)
{
- if (stiffness > 0F)
+ when (orientation)
{
- when (orientation)
- {
- HORIZONTAL -> spring = SpringAnimation(this, SpringAnimation.TRANSLATION_X)
- .setSpring(SpringForce()
+ HORIZONTAL -> spring = SpringAnimation(this, SpringAnimation.TRANSLATION_X)
+ .setSpring(SpringForce()
.setFinalPosition(0f)
.setDampingRatio(dampingRatio)
.setStiffness(stiffness))
- VERTICAL -> spring = SpringAnimation(this, SpringAnimation.TRANSLATION_Y)
- .setSpring(SpringForce()
+ VERTICAL -> spring = SpringAnimation(this, SpringAnimation.TRANSLATION_Y)
+ .setSpring(SpringForce()
.setFinalPosition(0f)
.setDampingRatio(dampingRatio)
.setStiffness(stiffness))
- }
}
-
- Log.wtf("stiffness", "stiffness: $stiffness")
+ Log.wtf("orientation", "orientation: $orientation")
}
init {
diff --git a/build.gradle b/build.gradle
index ed95e60..88aee80 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,22 +1,21 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext.kotlin_version = "1.5.21"
+ ext.kotlin_version = "1.4.21"
repositories {
google()
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.1.3'
+ classpath 'com.android.tools.build:gradle:4.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
+
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
-plugins {
- id "com.jfrog.artifactory" version "4.24.14"
-}
-
allprojects {
repositories {
google()
@@ -24,6 +23,6 @@ allprojects {
}
}
-task clean(type: Delete){
+task clean(type: Delete) {
delete rootProject.buildDir
-}
\ No newline at end of file
+}
diff --git a/example/build.gradle b/example/build.gradle
index f426792..b06dda9 100644
--- a/example/build.gradle
+++ b/example/build.gradle
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
android {
compileSdkVersion 30
- buildToolsVersion "30.0.3"
+ buildToolsVersion "30.0.2"
defaultConfig {
minSdkVersion 14
@@ -21,24 +21,19 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
-
- compileOptions {
- sourceCompatibility 1.8
- targetCompatibility 1.8
- }
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation 'androidx.core:core-ktx:1.6.0'
+ implementation 'androidx.core:core-ktx:1.3.2'
implementation "androidx.cardview:cardview:1.0.0"
- implementation 'androidx.appcompat:appcompat:1.3.1'
+ implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
- implementation 'androidx.recyclerview:recyclerview:1.2.1'
+ implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
- testImplementation 'junit:junit:4.13.2'
- androidTestImplementation 'androidx.test.ext:junit:1.1.3'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
+ testImplementation 'junit:junit:4.13.1'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.2'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation project(path: ':bouncy')
}
\ No newline at end of file
diff --git a/example/src/main/java/com/factor/example/MainActivity.kt b/example/src/main/java/com/factor/example/MainActivity.kt
index e3cce7f..12a1fb4 100644
--- a/example/src/main/java/com/factor/example/MainActivity.kt
+++ b/example/src/main/java/com/factor/example/MainActivity.kt
@@ -15,5 +15,6 @@ class MainActivity : AppCompatActivity()
findViewById(R.id.rc).adapter = MyAdapter(30)
+ findViewById(R.id.rc).layoutManager = GridLayoutManager(this, 2, GridLayoutManager.VERTICAL, false)
}
}
\ No newline at end of file
diff --git a/example/src/main/res/layout/activity_main.xml b/example/src/main/res/layout/activity_main.xml
index f511ff2..75ab604 100644
--- a/example/src/main/res/layout/activity_main.xml
+++ b/example/src/main/res/layout/activity_main.xml
@@ -10,7 +10,6 @@