Skip to content

Commit

Permalink
Updated Example to android x
Browse files Browse the repository at this point in the history
  • Loading branch information
mdhanif-simformsolutions committed Feb 23, 2021
1 parent d2ac196 commit 85c6c9e
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 16 deletions.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ buildscript {
maven {
url "https://jitpack.io"
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.github.dcendents:android-maven-plugin:1.2'

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -22,5 +23,6 @@ allprojects {
maven {
url "https://jitpack.io"
}
google()
}
}
2 changes: 1 addition & 1 deletion demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {

dependencies {
compile project(":library")
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'androidx.recyclerview:recyclerview:1.0.0'
compile 'com.daimajia.easing:library:1.0.0@aar'
compile 'com.daimajia.androidanimations:library:1.1.2@aar'
compile 'com.nineoldandroids:library:2.4.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;

import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.daimajia.swipe.util.Attributes;
import com.daimajia.swipedemo.adapter.RecyclerViewAdapter;
import com.daimajia.swipedemo.adapter.util.DividerItemDecoration;

import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -52,7 +53,7 @@ protected void onCreate(Bundle savedInstanceState) {
recyclerView.setLayoutManager(new LinearLayoutManager(this));

// Item Decorator:
recyclerView.addItemDecoration(new DividerItemDecoration(getResources().getDrawable(R.drawable.divider)));
recyclerView.addItemDecoration(new DividerItemDecoration(this, (R.drawable.divider)));
recyclerView.setItemAnimator(new FadeInLeftAnimator());

// Adapter:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.daimajia.swipedemo.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;

import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import androidx.recyclerview.widget.RecyclerView;
import com.daimajia.androidanimations.library.Techniques;
import com.daimajia.androidanimations.library.YoYo;
import com.daimajia.swipe.SimpleSwipeListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

public class DividerItemDecoration extends RecyclerView.ItemDecoration {

private Drawable mDivider;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.daimajia.swipedemo.adapter.util;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;

import androidx.recyclerview.widget.RecyclerView;

public class RecyclerItemClickListener implements RecyclerView.OnItemTouchListener {
private OnItemClickListener mListener;

Expand Down
8 changes: 5 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ VERSION_NAME=1.2.0
VERSION_CODE=22
GROUP=com.daimajia.swipelayout

ANDROID_BUILD_MIN_SDK_VERSION=9
ANDROID_BUILD_TARGET_SDK_VERSION=25
ANDROID_BUILD_SDK_VERSION=25
ANDROID_BUILD_MIN_SDK_VERSION=21
ANDROID_BUILD_TARGET_SDK_VERSION=29
ANDROID_BUILD_SDK_VERSION=29
ANDROID_BUILD_TOOLS_VERSION=25.0.2
android.useAndroidX=true
android.enableJetifier=true
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Mar 09 16:07:03 CST 2017
#Tue Feb 23 16:45:22 IST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip

0 comments on commit 85c6c9e

Please sign in to comment.