Skip to content

Commit

Permalink
Migrate to AndroidX
Browse files Browse the repository at this point in the history
Dsiner committed Dec 27, 2020
1 parent 5d776a3 commit 1088032
Showing 66 changed files with 217 additions and 178 deletions.
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
compileSdkVersion 28

defaultConfig {
applicationId "com.d.pulllayout"
minSdkVersion 14
targetSdkVersion 27
targetSdkVersion 26
versionCode 1
versionName "1.0"

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

buildTypes {
@@ -27,14 +27,14 @@ android {

dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':lib')
implementation project(':integration:edge_ripple')
implementation project(':integration:edge_elastic')
implementation('com.dsiner.lib:common:1.1.1') {
implementation('com.dsiner.lib:common:1.2.0') {
exclude group: 'com.dsiner.lib', module: 'pulllayout'
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.d.pulllayout;

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;
4 changes: 2 additions & 2 deletions app/src/main/java/com/d/pulllayout/edge/EdgeListActivity.java
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@
import android.widget.PopupWindow;

import com.d.lib.common.util.ViewHelper;
import com.d.lib.common.view.popup.MenuPopup;
import com.d.lib.common.view.popup.PopupWindowFactory;
import com.d.lib.common.widget.popup.MenuPopup;
import com.d.lib.common.widget.popup.PopupWindowFactory;
import com.d.pulllayout.R;
import com.d.pulllayout.list.activity.ListActivity;
import com.d.pulllayout.list.model.EdgeType;
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package com.d.pulllayout.list.activity;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.PopupWindow;

import com.d.lib.common.component.loader.v4.AbsPageFragmentActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;

import com.d.lib.common.component.loader.v4.BasePagerFragmentActivity;
import com.d.lib.common.component.mvp.MvpBasePresenter;
import com.d.lib.common.util.ViewHelper;
import com.d.lib.common.view.popup.MenuPopup;
import com.d.lib.common.view.popup.PopupWindowFactory;
import com.d.lib.common.widget.popup.MenuPopup;
import com.d.lib.common.widget.popup.PopupWindowFactory;
import com.d.pulllayout.R;
import com.d.pulllayout.list.fragment.CoordinatorLayoutFragment;
import com.d.pulllayout.list.model.ListType;
@@ -24,7 +25,7 @@
* CoordinatorTabActivity
* Created by D on 2018/5/31.
*/
public class CoordinatorTabActivity extends AbsPageFragmentActivity<MvpBasePresenter> {
public class CoordinatorTabActivity extends BasePagerFragmentActivity<MvpBasePresenter> {

private int mListType = ListType.PULLRECYCLERLAYOUT_PULLRECYCLERVIEW;

Original file line number Diff line number Diff line change
@@ -4,18 +4,19 @@
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.View;
import android.widget.ImageView;
import android.widget.PopupWindow;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.d.lib.common.component.mvp.MvpBasePresenter;
import com.d.lib.common.component.mvp.app.v4.BaseFragmentActivity;
import com.d.lib.common.util.ViewHelper;
import com.d.lib.common.view.TitleLayout;
import com.d.lib.common.view.popup.MenuPopup;
import com.d.lib.common.view.popup.PopupWindowFactory;
import com.d.lib.common.widget.TitleLayout;
import com.d.lib.common.widget.popup.MenuPopup;
import com.d.lib.common.widget.popup.PopupWindowFactory;
import com.d.pulllayout.R;
import com.d.pulllayout.list.fragment.CoordinatorLayoutFragment;
import com.d.pulllayout.list.fragment.ItemTouchFragment;
@@ -102,7 +103,7 @@ public void onClick(PopupWindow popup, int position, String item) {
protected int getLayoutRes() {
return mType == TYPE_COORDINATOR_LIST
? R.layout.fragment_list_coordinatorlayout
: R.layout.lib_pub_activity_abs_content;
: R.layout.lib_pub_activity_loader_content;
}

@Override
Original file line number Diff line number Diff line change
@@ -2,11 +2,12 @@

import android.annotation.SuppressLint;
import android.content.Context;
import android.support.v4.content.ContextCompat;
import android.view.MotionEvent;
import android.view.View;
import android.widget.TextView;

import androidx.core.content.ContextCompat;

import com.d.lib.pulllayout.rv.adapter.CommonAdapter;
import com.d.lib.pulllayout.rv.adapter.CommonHolder;
import com.d.lib.pulllayout.rv.itemtouchhelper.ItemTouchHelperViewHolder;
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package com.d.pulllayout.list.adapter.rv;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import androidx.recyclerview.widget.RecyclerView;

/**
* SpaceItemDecoration
* Created by D on 2016/8/6.
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
package com.d.pulllayout.list.fragment;

import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;
import android.view.View;
import android.widget.ImageView;
import android.widget.PopupWindow;

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

import com.d.lib.common.component.mvp.MvpBasePresenter;
import com.d.lib.common.component.mvp.MvpView;
import com.d.lib.common.component.mvp.app.v4.BaseFragment;
import com.d.lib.common.util.ViewHelper;
import com.d.lib.common.view.TitleLayout;
import com.d.lib.common.view.popup.MenuPopup;
import com.d.lib.common.view.popup.PopupWindowFactory;
import com.d.lib.common.widget.TitleLayout;
import com.d.lib.common.widget.popup.MenuPopup;
import com.d.lib.common.widget.popup.PopupWindowFactory;
import com.d.lib.pulllayout.rv.PullRecyclerView;
import com.d.lib.pulllayout.rv.adapter.CommonAdapter;
import com.d.lib.pulllayout.rv.itemtouchhelper.OnStartDragListener;
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.d.pulllayout.list.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.d.lib.common.component.loader.v4.AbsFragment;
import androidx.annotation.Nullable;

import com.d.lib.common.component.loader.v4.BaseLoaderFragment;
import com.d.lib.common.component.mvp.MvpView;
import com.d.lib.common.view.DSLayout;
import com.d.lib.common.widget.DSLayout;
import com.d.lib.pulllayout.loader.CommonLoader;
import com.d.lib.pulllayout.loader.RecyclerAdapter;
import com.d.lib.pulllayout.rv.adapter.MultiItemTypeSupport;
@@ -24,7 +25,7 @@
* Multiple Type
* Created by D on 2017/4/26.
*/
public class MultipleFragment extends AbsFragment<Bean, LoadPresenter> {
public class MultipleFragment extends BaseLoaderFragment<Bean, LoadPresenter> {
private int mListType;

@Override
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package com.d.pulllayout.list.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;

import com.d.lib.common.component.loader.v4.AbsFragment;
import androidx.annotation.Nullable;

import com.d.lib.common.component.loader.v4.BaseLoaderFragment;
import com.d.lib.common.component.mvp.MvpView;
import com.d.lib.pulllayout.Pullable;
import com.d.lib.pulllayout.loader.RecyclerAdapter;
@@ -22,7 +23,7 @@
* Simple Type
* Created by D on 2017/4/26.
*/
public class SimpleFragment extends AbsFragment<Bean, LoadPresenter> {
public class SimpleFragment extends BaseLoaderFragment<Bean, LoadPresenter> {
private int mListType;
private int mEdgeType;

Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

import android.content.Context;

import com.d.lib.common.view.popup.MenuPopup;
import com.d.lib.common.widget.popup.MenuPopup;
import com.d.lib.pulllayout.edge.IEdgeView;
import com.d.pulllayout.R;

4 changes: 2 additions & 2 deletions app/src/main/java/com/d/pulllayout/list/model/ListType.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.d.pulllayout.list.model;

import com.d.lib.common.view.popup.MenuPopup;
import com.d.lib.common.widget.popup.MenuPopup;
import com.d.pulllayout.R;

import java.util.Arrays;
@@ -12,7 +12,7 @@ public class ListType {
public static final int PULLRECYCLERLAYOUT_LISTVIEW = 2;
public static final int PULLRECYCLERVIEW = 3;

public static int[] S_RES_IDS = new int[]{R.layout.lib_pub_fragment_abs,
public static int[] S_RES_IDS = new int[]{R.layout.lib_pub_fragment_loader,
R.layout.fragment_list_pullrecyclerlayout_recyclerview,
R.layout.fragment_list_pullrecyclerlayout_listview,
R.layout.fragment_list_pullrecyclerview};
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import android.os.Handler;
import android.os.Looper;

import com.d.lib.common.component.loader.AbsPresenter;
import com.d.lib.common.component.loader.MvpBaseLoaderPresenter;
import com.d.lib.common.event.bus.callback.SimpleCallback;
import com.d.pulllayout.list.model.Bean;

@@ -15,7 +15,7 @@
* LoadPresenter
* Created by D on 2017/4/26.
*/
public class LoadPresenter extends AbsPresenter<Bean> {
public class LoadPresenter extends MvpBaseLoaderPresenter<Bean> {

public LoadPresenter(Context context) {
super(context);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.d.pulllayout.pull.activity;

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

import com.d.lib.common.component.mvp.MvpBasePresenter;
import com.d.lib.common.component.mvp.MvpView;
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.d.pulllayout.view;

import android.content.Context;
import android.support.v4.view.NestedScrollingChild;
import android.support.v4.view.NestedScrollingChildHelper;
import android.util.AttributeSet;
import android.widget.ListView;

import androidx.core.view.NestedScrollingChild;
import androidx.core.view.NestedScrollingChildHelper;

public class NestedScrollingListView extends ListView implements NestedScrollingChild {

private NestedScrollingChildHelper mScrollingChildHelper;
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.d.pulllayout.view;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.viewpager.widget.ViewPager;

/**
* NoScrollViewPager
* Created by D on 2020/3/11.
22 changes: 11 additions & 11 deletions app/src/main/res/layout/activity_coordinatorlayout.xml
Original file line number Diff line number Diff line change
@@ -5,22 +5,22 @@
android:layout_height="match_parent"
android:background="@color/lib_pub_color_bg_main">

<android.support.design.widget.CoordinatorLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false">

<android.support.design.widget.AppBarLayout
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
android:clipToPadding="false"
app:elevation="0dp">

<android.support.design.widget.CollapsingToolbarLayout
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -43,15 +43,15 @@
android:visibility="visible"
app:layout_collapseMode="parallax" />

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
app:contentInsetStartWithNavigation="0dp"
app:layout_collapseMode="pin">

<com.d.lib.common.view.TitleLayout
<com.d.lib.common.widget.TitleLayout
android:id="@+id/tl_title"
android:layout_width="match_parent"
android:layout_height="@dimen/lib_pub_dimen_title_height"
@@ -61,10 +61,10 @@
app:lib_pub_tl_middleText="CoordinatorLayout"
app:lib_pub_tl_rightDrawable="@drawable/lib_pub_ic_title_more"
app:lib_pub_tl_rightDrawablePadding="3dp" />
</android.support.v7.widget.Toolbar>
</android.support.design.widget.CollapsingToolbarLayout>
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout>

<com.d.lib.common.view.tab.ScrollTab
<com.d.lib.common.widget.tab.ScrollTab
android:id="@+id/indicator"
android:layout_width="match_parent"
android:layout_height="@dimen/lib_pub_dimen_tab_height"
@@ -75,13 +75,13 @@
app:lib_pub_stab_indicatorType="none"
app:lib_pub_stab_indicatorWeight="0dp"
app:lib_pub_stab_type="view_group" />
</android.support.design.widget.AppBarLayout>
</com.google.android.material.appbar.AppBarLayout>

<android.support.v4.view.ViewPager
<androidx.viewpager.widget.ViewPager
android:id="@+id/vp_page"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/lib_pub_color_bg_sub"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</FrameLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
android:background="@color/lib_pub_color_bg_main"
android:orientation="vertical">

<com.d.lib.common.view.TitleLayout
<com.d.lib.common.widget.TitleLayout
android:id="@+id/tl_title"
style="@style/lib_pub_title_style"
app:lib_pub_tl_middleText="@string/app_name" />
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_pull.xml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
android:background="@color/lib_pub_color_bg_main"
android:orientation="vertical">

<com.d.lib.common.view.TitleLayout
<com.d.lib.common.widget.TitleLayout
android:id="@+id/tl_title"
style="@style/lib_pub_title_style"
app:lib_pub_tl_middleText="Pull" />
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_pull_listview.xml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
android:layout_height="match_parent"
android:layout_marginTop="@dimen/lib_pub_dimen_title_height" />

<com.d.lib.common.view.TitleLayout
<com.d.lib.common.widget.TitleLayout
android:id="@+id/tl_title"
style="@style/lib_pub_title_style"
app:lib_pub_tl_middleText="ListView" />
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_pull_recyclerview.xml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
android:layout_height="match_parent"
android:layout_marginTop="@dimen/lib_pub_dimen_title_height" />

<com.d.lib.common.view.TitleLayout
<com.d.lib.common.widget.TitleLayout
android:id="@+id/tl_title"
style="@style/lib_pub_title_style"
app:lib_pub_tl_middleText="RecyclerView" />
@@ -23,7 +23,7 @@
app:lib_pull_enable="true"
app:lib_pull_gravity="top|left|right|bottom">

<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_pull_scrollview.xml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
android:layout_height="match_parent"
android:layout_marginTop="@dimen/lib_pub_dimen_title_height" />

<com.d.lib.common.view.TitleLayout
<com.d.lib.common.widget.TitleLayout
android:id="@+id/tl_title"
style="@style/lib_pub_title_style"
app:lib_pub_tl_middleText="ScrollView" />
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_pull_view.xml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
android:layout_height="match_parent"
android:layout_marginTop="@dimen/lib_pub_dimen_title_height" />

<com.d.lib.common.view.TitleLayout
<com.d.lib.common.widget.TitleLayout
android:id="@+id/tl_title"
style="@style/lib_pub_title_style"
app:lib_pub_tl_middleText="View" />
18 changes: 9 additions & 9 deletions app/src/main/res/layout/fragment_list_coordinatorlayout.xml
Original file line number Diff line number Diff line change
@@ -5,22 +5,22 @@
android:layout_height="match_parent"
android:background="@color/lib_pub_color_bg_main">

<android.support.design.widget.CoordinatorLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false">

<android.support.design.widget.AppBarLayout
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
android:clipToPadding="false"
app:elevation="0dp">

<android.support.design.widget.CollapsingToolbarLayout
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -43,15 +43,15 @@
android:visibility="visible"
app:layout_collapseMode="parallax" />

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
app:contentInsetStartWithNavigation="0dp"
app:layout_collapseMode="pin">

<com.d.lib.common.view.TitleLayout
<com.d.lib.common.widget.TitleLayout
android:id="@+id/tl_title"
android:layout_width="match_parent"
android:layout_height="@dimen/lib_pub_dimen_title_height"
@@ -61,15 +61,15 @@
app:lib_pub_tl_middleText="CoordinatorLayout"
app:lib_pub_tl_rightDrawable="@drawable/lib_pub_ic_title_more"
app:lib_pub_tl_rightDrawablePadding="3dp" />
</android.support.v7.widget.Toolbar>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>

<FrameLayout
android:id="@+id/fragment_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/lib_pub_corner_dialog_top"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</FrameLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_list_item_touch.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
android:layout_height="match_parent"
android:orientation="vertical">

<com.d.lib.common.view.TitleLayout
<com.d.lib.common.widget.TitleLayout
android:id="@+id/tl_title"
style="@style/lib_pub_title_back_style"
app:lib_pub_tl_middleText="title" />
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.d.lib.common.view.DSLayout
<com.d.lib.common.widget.DSLayout
android:id="@+id/dsl_ds"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.d.lib.common.view.DSLayout
<com.d.lib.common.widget.DSLayout
android:id="@+id/dsl_ds"
android:layout_width="match_parent"
android:layout_height="match_parent" />
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_list_pullrecyclerview.xml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.d.lib.common.view.DSLayout
<com.d.lib.common.widget.DSLayout
android:id="@+id/dsl_ds"
android:layout_width="match_parent"
android:layout_height="match_parent" />
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.android.tools.build:gradle:3.6.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -12,4 +12,6 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
org.gradle.jvmargs=-Xmx1536m -Dfile.encoding=UTF-8
android.injected.testOnly=false
android.injected.testOnly=false
android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
12 changes: 6 additions & 6 deletions integration/edge_elastic/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 27
compileSdkVersion 28
resourcePrefix 'lib_pull_edge_elastic_'

defaultConfig {
minSdkVersion 11
targetSdkVersion 27
targetSdkVersion 26
versionCode 1
versionName "1.0"

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

buildTypes {
@@ -27,10 +27,10 @@ android {

dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'

implementation fileTree(dir: 'libs', include: ['*.jar'])
compileOnly project(':lib')
compileOnly 'com.android.support:appcompat-v7:27.1.1'
compileOnly 'androidx.appcompat:appcompat:1.0.0'
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.d.lib.pulllayout.edge.elastic;

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;
Original file line number Diff line number Diff line change
@@ -5,10 +5,11 @@
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;

import androidx.annotation.Nullable;

import com.d.lib.pulllayout.util.Utils;

public class BezierWaveView extends View {
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.d.lib.pulllayout.edge.elastic;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.Gravity;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.d.lib.pulllayout.edge.EdgeView;

public class HeaderView extends EdgeView {
12 changes: 6 additions & 6 deletions integration/edge_ripple/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 27
compileSdkVersion 28
resourcePrefix 'lib_pull_edge_ripple_'

defaultConfig {
minSdkVersion 11
targetSdkVersion 27
targetSdkVersion 26
versionCode 1
versionName "1.0"

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

buildTypes {
@@ -27,10 +27,10 @@ android {

dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'

implementation fileTree(dir: 'libs', include: ['*.jar'])
compileOnly project(':lib')
compileOnly 'com.android.support:appcompat-v7:27.1.1'
compileOnly 'androidx.appcompat:appcompat:1.0.0'
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.d.lib.pulllayout.edge.ripple;

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;
Original file line number Diff line number Diff line change
@@ -3,10 +3,11 @@
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.d.lib.pulllayout.edge.EdgeView;

public class FooterView extends EdgeView {
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.d.lib.pulllayout.edge.ripple;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.Gravity;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.d.lib.pulllayout.edge.EdgeView;

public class HeaderView extends EdgeView {
Original file line number Diff line number Diff line change
@@ -2,9 +2,10 @@

import android.content.Context;
import android.graphics.Canvas;
import android.support.v4.content.ContextCompat;
import android.view.View;

import androidx.core.content.ContextCompat;

import com.d.lib.pulllayout.edge.ripple.R;

/**
16 changes: 8 additions & 8 deletions lib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 27
compileSdkVersion 28
resourcePrefix 'lib_pull_'

defaultConfig {
minSdkVersion 11
targetSdkVersion 27
targetSdkVersion 26
versionCode 1
versionName "1.0"
consumerProguardFiles 'consumer-proguard-rules.pro'

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

buildTypes {
@@ -28,11 +28,11 @@ android {

dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'

implementation fileTree(dir: 'libs', include: ['*.jar'])
api 'com.android.support:appcompat-v7:27.1.1'
api 'com.android.support:recyclerview-v7:27.1.1'
api 'com.android.support:design:27.1.1'
api 'androidx.appcompat:appcompat:1.0.0'
api 'androidx.recyclerview:recyclerview:1.0.0'
api 'com.google.android.material:material:1.0.0'
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.d.lib.pulllayout;

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;
3 changes: 2 additions & 1 deletion lib/src/main/java/com/d/lib/pulllayout/PullLayout.java
Original file line number Diff line number Diff line change
@@ -4,14 +4,15 @@
import android.content.Context;
import android.content.res.TypedArray;
import android.os.SystemClock;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;

import androidx.annotation.Nullable;

import com.d.lib.pulllayout.edge.IEdgeView;
import com.d.lib.pulllayout.util.AppBarHelper;
import com.d.lib.pulllayout.util.NestedAnimHelper;
Original file line number Diff line number Diff line change
@@ -5,9 +5,6 @@
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.support.annotation.NonNull;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
@@ -16,6 +13,10 @@
import android.widget.ListAdapter;
import android.widget.ListView;

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

import com.d.lib.pulllayout.edge.IEdgeView;
import com.d.lib.pulllayout.edge.IState;
import com.d.lib.pulllayout.edge.arrow.FooterView;
5 changes: 3 additions & 2 deletions lib/src/main/java/com/d/lib/pulllayout/edge/EdgeView.java
Original file line number Diff line number Diff line change
@@ -2,14 +2,15 @@

import android.animation.TimeInterpolator;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.d.lib.pulllayout.Pullable;
import com.d.lib.pulllayout.util.NestedAnimHelper;
import com.d.lib.pulllayout.util.Utils;
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.d.lib.pulllayout.edge.arrow;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.d.lib.pulllayout.R;
import com.d.lib.pulllayout.edge.EdgeView;

Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package com.d.lib.pulllayout.edge.arrow;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.RotateAnimation;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.d.lib.pulllayout.R;
import com.d.lib.pulllayout.edge.EdgeView;

Original file line number Diff line number Diff line change
@@ -6,10 +6,11 @@
import android.graphics.Paint;
import android.graphics.RectF;
import android.os.Handler;
import android.support.v4.content.ContextCompat;
import android.util.AttributeSet;
import android.view.View;

import androidx.core.content.ContextCompat;

import com.d.lib.pulllayout.R;

import java.lang.ref.WeakReference;
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.d.lib.pulllayout.lv.adapter;

import android.content.Context;
import android.support.annotation.NonNull;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import androidx.annotation.NonNull;

import com.d.lib.pulllayout.loader.RecyclerAdapter;

import java.util.ArrayList;
Original file line number Diff line number Diff line change
@@ -2,11 +2,6 @@

import android.content.Context;
import android.graphics.Bitmap;
import android.support.annotation.ColorInt;
import android.support.annotation.DrawableRes;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
@@ -16,6 +11,12 @@
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.ColorInt;
import androidx.annotation.DrawableRes;
import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
* CommonHolder for ListView
* Created by D on 2017/4/25.
3 changes: 2 additions & 1 deletion lib/src/main/java/com/d/lib/pulllayout/rv/ItemViewList.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.d.lib.pulllayout.rv;

import android.support.annotation.Nullable;
import android.view.View;

import androidx.annotation.Nullable;

import java.util.ArrayList;
import java.util.List;

Original file line number Diff line number Diff line change
@@ -2,15 +2,16 @@

import android.animation.TimeInterpolator;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.d.lib.pulllayout.Pullable;
import com.d.lib.pulllayout.Refreshable;
import com.d.lib.pulllayout.edge.IEdgeView;
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.d.lib.pulllayout.rv.adapter;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.d.lib.pulllayout.loader.RecyclerAdapter;
import com.d.lib.pulllayout.rv.itemtouchhelper.ItemTouchHelperAdapter;
import com.d.lib.pulllayout.rv.itemtouchhelper.OnStartDragListener;
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.d.lib.pulllayout.rv.adapter;

import android.content.Context;
import android.support.annotation.NonNull;

import androidx.annotation.NonNull;

import java.util.ArrayList;
import java.util.Collections;
Original file line number Diff line number Diff line change
@@ -2,11 +2,12 @@

import android.content.Context;
import android.database.Cursor;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.d.lib.pulllayout.util.Utils;

/**
Original file line number Diff line number Diff line change
@@ -2,10 +2,6 @@

import android.content.Context;
import android.graphics.Bitmap;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
@@ -14,6 +10,11 @@
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

import com.d.lib.pulllayout.rv.itemtouchhelper.ItemTouchHelperViewHolder;

public class CommonHolder extends RecyclerView.ViewHolder implements ItemTouchHelperViewHolder {
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.d.lib.pulllayout.rv.adapter;

import android.support.annotation.NonNull;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;

import com.d.lib.pulllayout.edge.IEdgeView;
import com.d.lib.pulllayout.rv.ItemViewList;

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.d.lib.pulllayout.rv.adapter;

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

/**
* WrapAdapterDataObserver for RecyclerView
Original file line number Diff line number Diff line change
@@ -3,10 +3,11 @@
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.view.View;

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

import com.d.lib.pulllayout.rv.adapter.WrapAdapter;

/**
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.d.lib.pulllayout.rv.itemtouchhelper;

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

/**
* Listener for manual initiation of a drag.
Original file line number Diff line number Diff line change
@@ -2,9 +2,10 @@

import android.graphics.Canvas;
import android.os.Build;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;

import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.RecyclerView;

/**
* An implementation of ItemTouchHelper.Callback that enables basic drag drop and swipe-to-dismiss
6 changes: 4 additions & 2 deletions lib/src/main/java/com/d/lib/pulllayout/util/AppBarHelper.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.d.lib.pulllayout.util;

import android.support.design.widget.AppBarLayout;
import android.support.design.widget.CoordinatorLayout;
import android.view.View;
import android.view.ViewParent;

import androidx.coordinatorlayout.widget.CoordinatorLayout;

import com.google.android.material.appbar.AppBarLayout;

public class AppBarHelper {
private final View mView;
private final AppBarLayout.OnOffsetChangedListener mOnOffsetChangedListener;
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package com.d.lib.pulllayout.util;

import android.support.design.widget.CoordinatorLayout;
import android.support.v4.view.ViewCompat;
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 android.view.View;
import android.view.ViewParent;
import android.widget.AbsListView;
import android.widget.ScrollView;

import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.view.ViewCompat;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;

import com.d.lib.pulllayout.Pullable;

public class NestedScrollHelper {
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package com.d.lib.pulllayout.util;

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 android.view.View;
import android.widget.AbsListView;
import android.widget.ListView;

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

import java.util.ArrayList;
import java.util.List;

Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package com.d.lib.pulllayout.util;

import android.os.Build;
import android.support.annotation.LayoutRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.ListView;

import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

import com.d.lib.pulllayout.PullRecyclerLayout;
import com.d.lib.pulllayout.Refreshable;
import com.d.lib.pulllayout.loader.RecyclerAdapter;
3 changes: 2 additions & 1 deletion lib/src/main/java/com/d/lib/pulllayout/util/Utils.java
Original file line number Diff line number Diff line change
@@ -3,10 +3,11 @@
import android.content.Context;
import android.database.Cursor;
import android.graphics.Paint;
import android.support.annotation.NonNull;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;

/**
* Utils
* Created by D on 2017/4/19.

0 comments on commit 1088032

Please sign in to comment.