Skip to content

Commit

Permalink
support版本。
Browse files Browse the repository at this point in the history
  • Loading branch information
梁任彦 committed Mar 28, 2020
1 parent 8780419 commit be10eef
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 45 deletions.
13 changes: 6 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.donkingliang.consecutivescroller"
minSdkVersion 19
targetSdkVersion 29
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -21,11 +21,10 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.android.support:appcompat-v7:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation project(':consecutivescroller')
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.donkingliang.consecutivescrollerdemo;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.donkingliang.consecutivescrollerdemo.adapter.RecyclerViewAdapter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.donkingliang.consecutivescrollerdemo;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

public class MainActivity extends AppCompatActivity {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.donkingliang.consecutivescrollerdemo;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.webkit.WebChromeClient;
import android.webkit.WebView;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.donkingliang.consecutivescrollerdemo;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.webkit.WebChromeClient;
import android.webkit.WebView;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.donkingliang.consecutivescrollerdemo.adapter;

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 com.donkingliang.consecutivescrollerdemo.R;

import androidx.recyclerview.widget.RecyclerView;

/**
* @Author donkingliang
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/activity_consecutive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:textColor="@android:color/black"
android:textSize="16sp"/>

<androidx.recyclerview.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView1"
android:layout_width="match_parent"
android:layout_height="300dp"
Expand Down Expand Up @@ -138,7 +138,7 @@
android:textColor="@android:color/black"
android:textSize="16sp" />

<androidx.core.widget.NestedScrollView
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="250dp"
app:layout_isConsecutive="false"
Expand Down Expand Up @@ -200,9 +200,9 @@
android:textSize="24sp" />

</LinearLayout>
</androidx.core.widget.NestedScrollView>
</android.support.v4.widget.NestedScrollView>

<androidx.recyclerview.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView2"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/activity_sample.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

</LinearLayout>

<androidx.core.widget.NestedScrollView
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down Expand Up @@ -94,9 +94,9 @@
android:textSize="24sp" />

</LinearLayout>
</androidx.core.widget.NestedScrollView>
</android.support.v4.widget.NestedScrollView>

<androidx.recyclerview.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
Expand Down Expand Up @@ -169,7 +169,7 @@
</LinearLayout>
</ScrollView>

<androidx.recyclerview.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView2"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/activity_sticky.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

</LinearLayout>

<androidx.recyclerview.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
Expand All @@ -53,7 +53,7 @@
android:textSize="18sp"
app:layout_isSticky="true" />

<androidx.core.widget.NestedScrollView
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down Expand Up @@ -113,7 +113,7 @@
android:textSize="24sp" />

</LinearLayout>
</androidx.core.widget.NestedScrollView>
</android.support.v4.widget.NestedScrollView>


<TextView
Expand All @@ -126,7 +126,7 @@
android:textSize="18sp"
app:layout_isSticky="true" />

<androidx.recyclerview.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView2"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
Expand Down
8 changes: 4 additions & 4 deletions consecutivescroller/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apply plugin: 'com.android.library'

group='com.github.donkingliang' // 指定group,com.github.<用户名>
group='com.github.donkingliang.support' // 指定group,com.github.<用户名>

android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
buildToolsVersion "28.0.3"


defaultConfig {
minSdkVersion 19
targetSdkVersion 29
targetSdkVersion 28
versionCode 1
versionName "1.0"

Expand All @@ -28,7 +28,7 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compileOnly 'androidx.appcompat:appcompat:1.0.2'
compileOnly 'com.android.support:appcompat-v7:28.0.0'
}

//---------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.v4.view.NestedScrollingParent;
import android.support.v4.view.NestedScrollingParentHelper;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.VelocityTracker;
Expand All @@ -16,11 +20,6 @@
import java.util.ArrayList;
import java.util.List;

import androidx.annotation.NonNull;
import androidx.core.view.NestedScrollingParent;
import androidx.core.view.NestedScrollingParentHelper;
import androidx.core.view.ViewCompat;

/**
* @Author donkingliang QQ:1043214265 github:https://github.com/donkingliang
* @Description
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ org.gradle.jvmargs=-Xmx1536m
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
#android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
#android.enableJetifier=true

0 comments on commit be10eef

Please sign in to comment.