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
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[![](https://jitpack.io/v/qiujayen/sticky-layoutmanager.svg)](https://jitpack.io/#qiujayen/sticky-layoutmanager)
[![](https://jitpack.io/v/ruslansharipov/sticky-layoutmanager.svg)](https://jitpack.io/#ruslansharipov/sticky-layoutmanager)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to remove ruslansharipov references since you are merging into qiujayen repo?



# Sticky-LayoutManager
An android recyclerView sticky item view layout manager library
An androidx recyclerView sticky item view layout manager library

|Image|Image|Image|
|:-:|:-:|:-:|
Expand All @@ -28,12 +28,12 @@ allprojects {
### Step 2. Add the dependency
```groovy
dependencies {
implementation 'com.github.qiujayen:sticky-layoutmanager:last-version'
implementation 'com.github.ruslansharipov:sticky-layoutmanager:1.0.2'
}
```
### This library dependencies
```groovy
implementation 'com.android.support:recyclerview-v7:version code'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
```

## How to use StickyLayoutManager?
Expand All @@ -50,6 +50,7 @@ RecyclerView.setLayoutManager(new StickyHeaders...xxx...LayoutManager<RecyclerVi

## Thanks
This library is inspired by ![Doist](https://github.com/Doist/RecyclerViewExtensions/tree/master/StickyHeaders), and use it to the source code for the implementation of the other two layoutmanager.
And many thanks to QiuJay, who made this library. I just added support for androidx to it.

## License
Copyright 2017 QiuJay Inc.
Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
compileSdkVersion 28
defaultConfig {
applicationId "com.jay.widget.layoutmanager.demo"
minSdkVersion 19
targetSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
Expand All @@ -19,7 +19,7 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation project(':sticky-layoutmanager')
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
package com.jay.widget.layoutmanager.demo;

import android.os.Bundle;
import android.support.v4.view.ViewCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import androidx.core.view.ViewCompat;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.JsResult;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.widget.TextView;

import com.jay.widget.StickyHeaders;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
android:layout_height="match_parent"
tools:context="com.jay.widget.layoutmanager.demo.MainActivity">

<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.3.2'


// NOTE: Do not place your application dependencies here; they belong
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m

android.useAndroidX=true
android.enableJetifier=true
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Expand Down
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 @@
#Mon Dec 04 10:20:36 CST 2017
#Wed Mar 27 09:23:57 MSK 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
8 changes: 4 additions & 4 deletions sticky-layoutmanager/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 26
compileSdkVersion 28



defaultConfig {
minSdkVersion 16
targetSdkVersion 26
versionCode 1
targetSdkVersion 28
versionCode 2
versionName "1.0"

}
Expand All @@ -24,5 +24,5 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

import android.view.View;

import androidx.recyclerview.widget.RecyclerView;

/**
* Created by jay on 2017/12/4 上午10:52
*
* Adds sticky headers capabilities to the {@link android.support.v7.widget.RecyclerView.Adapter}. Should return {@code true} for all
* Adds sticky headers capabilities to the {@link RecyclerView.Adapter}. Should return {@code true} for all
* positions that represent sticky headers.
*
* @link https://github.com/Doist/RecyclerViewExtensions/blob/master/StickyHeaders
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
import android.graphics.PointF;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewTreeObserver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import android.graphics.PointF;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.view.ViewTreeObserver;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
import android.graphics.PointF;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewTreeObserver;
Expand Down