Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/*
/.idea/libraries
.DS_Store
/build
Expand Down
20 changes: 16 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@

buildscript {
repositories {
jcenter()
maven {url 'https://maven.aliyun.com/repository/public/'}
maven {url 'https://maven.aliyun.com/repository/google/'}
maven {url 'https://maven.aliyun.com/repository/central/'}
maven {url 'https://maven.aliyun.com/repository/gradle-plugin/'}
mavenLocal()
mavenCentral()
maven { url 'https://jitpack.io' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.android.tools.build:gradle:7.0.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -15,8 +22,13 @@ buildscript {

allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven {url 'https://maven.aliyun.com/repository/public/'}
maven {url 'https://maven.aliyun.com/repository/google/'}
maven {url 'https://maven.aliyun.com/repository/central/'}
maven {url 'https://maven.aliyun.com/repository/gradle-plugin/'}
mavenLocal()
mavenCentral()
google()
}
}

Expand Down
19 changes: 10 additions & 9 deletions demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
compileSdkVersion 30
defaultConfig {
applicationId "com.wangxiandeng.swipecardrecyclerview"
minSdkVersion 19
targetSdkVersion 24
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
Expand All @@ -20,11 +19,13 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.0'
testCompile 'junit:junit:4.12'
compile 'com.github.HalfStackDeveloper:SwipeCardRecyclerView:v1.0.1'
implementation project(':swipecardrecyclerview')
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'junit:junit:4.12'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
// implementation 'com.github.HalfStackDeveloper:SwipeCardRecyclerView:v1.0.1'
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.wangxiandeng.swipecardrecyclerview;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/com/wangxiandeng/demo/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.wangxiandeng.demo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.widget.Toast;

import com.wangxiandeng.swipecardrecyclerview.ItemRemovedListener;
Expand Down
3 changes: 2 additions & 1 deletion demo/src/main/java/com/wangxiandeng/demo/MyAdapter.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.wangxiandeng.demo;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.recyclerview.widget.RecyclerView;

import com.wangxiandeng.swipecardrecyclerview.SwipeCardAdapter;

import java.util.List;
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
Expand Down
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
#org.gradle.java.home=E\:\\myprogram\\Java\\jdk1.8.0_91
org.gradle.java.home=D\:\\mysoftware\\android-studio-2020.3.1.24-windows\\android-studio\\jre
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':demo', ':swipecardrecyclerview'
include ':demo', ':swipecardrecyclerview'
20 changes: 10 additions & 10 deletions swipecardrecyclerview/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
compileSdkVersion 30
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion 19
targetSdkVersion 24
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

}
buildTypes {
Expand All @@ -21,13 +21,13 @@ android {
}
}

group='com.github.HalfStackDeveloper'
group = 'com.github.HalfStackDeveloper'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.0.0-alpha1'
testCompile 'junit:junit:4.12'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
testImplementation 'junit:junit:4.12'
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.wangxiandeng.swipecardrecyclerview;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.wangxiandeng.swipecardrecyclerview;

import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.wangxiandeng.swipecardrecyclerview;

import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewPropertyAnimator;
import android.view.animation.Animation;
import android.view.animation.LinearInterpolator;
import android.view.animation.OvershootInterpolator;
import android.widget.FrameLayout;
Expand Down