From 3d44c02fbcf4d9bad8b75a68fef847d7618548ec Mon Sep 17 00:00:00 2001 From: canyinghao Date: Thu, 25 Jul 2019 10:39:52 +0800 Subject: [PATCH 1/3] 5.0.0 --- app/build.gradle | 22 +++---- .../canrefreshdemo/ui/BaseFragment.java | 18 ++---- .../canrefreshdemo/ui/CooActivity.java | 47 ++++++++------- .../canrefreshdemo/ui/CooActivity2.java | 59 ++++++++++--------- .../canrefreshdemo/ui/CustomActivity.java | 25 ++++---- .../ui/LinearLayoutFragment.java | 8 +-- .../canrefreshdemo/ui/ListViewFragment.java | 13 ++-- .../canrefreshdemo/ui/MainActivity.java | 22 +++---- .../canrefreshdemo/ui/RVRefreshFragment.java | 19 +++--- .../canrefreshdemo/ui/RVRefreshFragment1.java | 50 ++++++++-------- .../canrefreshdemo/ui/RvActivity.java | 35 ++++++----- .../canrefreshdemo/ui/ScrollActivity.java | 30 +++++----- .../canrefreshdemo/ui/ScrollViewFragment.java | 3 +- .../canrefreshdemo/ui/TestFragment.java | 9 +-- .../canrefreshdemo/ui/TestFragment1.java | 12 ++-- .../canrefreshdemo/ui/TextViewFragment.java | 12 ++-- .../canrefreshdemo/ui/ViewActivity.java | 30 +++++----- app/src/main/res/layout/activity_coo.xml | 18 +++--- app/src/main/res/layout/activity_coo2.xml | 20 +++---- app/src/main/res/layout/activity_main.xml | 12 ++-- app/src/main/res/layout/activity_pager.xml | 16 ++--- app/src/main/res/layout/activity_pager2.xml | 12 ++-- app/src/main/res/layout/fragment_listview.xml | 2 +- .../main/res/layout/fragment_rv_classic.xml | 2 +- .../main/res/layout/fragment_rv_google.xml | 2 +- app/src/main/res/layout/fragment_rv_load.xml | 2 +- app/src/main/res/layout/fragment_rv_store.xml | 2 +- .../main/res/layout/fragment_rv_yalantis.xml | 2 +- .../main/res/layout/fragment_scroll_view.xml | 4 +- build.gradle | 6 +- canrefresh/build.gradle | 12 ++-- .../canrefresh/CanRefreshLayout.java | 24 ++++---- .../classic/ClassicRefreshView.java | 2 +- .../canrefresh/classic/RotateRefreshView.java | 4 +- .../google/GoogleCircleHookRefreshView.java | 5 +- .../google/GoogleCircleProgressView.java | 6 +- .../google/MaterialProgressDrawable.java | 5 +- .../shapeloading/ShapeLoadingRefreshView.java | 3 +- .../yalantis/BaseRefreshDrawable.java | 4 +- gradle.properties | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 41 files changed, 295 insertions(+), 288 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4e92efa..49d64f4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,13 +1,12 @@ apply plugin: 'com.android.application' -apply plugin: 'android-apt' android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" + compileSdkVersion 28 + buildToolsVersion "28.0.3" defaultConfig { applicationId "com.canyinghao.canrefreshdemo" - minSdkVersion 9 - targetSdkVersion 22 + minSdkVersion 14 + targetSdkVersion 23 versionCode 1 versionName "1.0" } @@ -25,12 +24,13 @@ repositories { } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:25.2.0' - compile 'com.android.support:design:25.2.0' - compile 'com.canyinghao:canadapter:1.1.4' - compile 'com.jakewharton:butterknife:8.4.0' - apt 'com.jakewharton:butterknife-compiler:8.4.0' - compile 'com.canyinghao:canrecyclerview:1.1.5' + implementation 'androidx.appcompat:appcompat:1.0.2' + implementation 'androidx.recyclerview:recyclerview:1.0.0' + implementation 'com.google.android.material:material:1.0.0' + implementation 'androidx.annotation:annotation:1.1.0' + compile 'com.canyinghao:canadapter:5.0.0' + + compile 'com.canyinghao:canrecyclerview:5.0.0' compile project(':canrefresh') diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/BaseFragment.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/BaseFragment.java index 1a8b170..0d880d7 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/BaseFragment.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/BaseFragment.java @@ -1,21 +1,14 @@ package com.canyinghao.canrefreshdemo.ui; import android.app.Activity; -import android.content.res.TypedArray; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; -import com.canyinghao.canrefreshdemo.R; - -import java.lang.reflect.Field; - -import butterknife.Unbinder; public abstract class BaseFragment extends Fragment { @@ -27,7 +20,7 @@ public abstract class BaseFragment extends Fragment { public LayoutInflater mInflater; - protected Unbinder unbinder; + @Override public void onCreate(Bundle savedInstanceState) { @@ -106,10 +99,7 @@ public View getRootView() { @Override public void onDestroy() { - if (unbinder != null) { - unbinder.unbind(); - unbinder = null; - } + super.onDestroy(); context = null; mInflater = null; diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/CooActivity.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/CooActivity.java index 6e95c6e..910993f 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/CooActivity.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/CooActivity.java @@ -1,14 +1,6 @@ package com.canyinghao.canrefreshdemo.ui; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.AppBarLayout; -import android.support.design.widget.CollapsingToolbarLayout; -import android.support.design.widget.CoordinatorLayout; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; import android.widget.ImageView; import com.canyinghao.canadapter.CanHolderHelper; @@ -18,9 +10,16 @@ import com.canyinghao.canrefresh.shapeloading.ShapeLoadingRefreshView; import com.canyinghao.canrefreshdemo.R; import com.canyinghao.canrefreshdemo.model.MainBean; +import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.appbar.CollapsingToolbarLayout; + +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; -import butterknife.BindView; -import butterknife.ButterKnife; /** * Created by canyinghao on 16/6/29. @@ -28,31 +27,39 @@ public class CooActivity extends AppCompatActivity implements CanRefreshLayout.OnRefreshListener, CanRefreshLayout.OnLoadMoreListener { - @BindView(R.id.can_refresh_footer) + RotateRefreshView canRefreshFooter; - @BindView(R.id.header) + ImageView header; - @BindView(R.id.toolbar) + Toolbar toolbar; - @BindView(R.id.toolbarlayout) + CollapsingToolbarLayout toolbarlayout; - @BindView(R.id.appbar) + AppBarLayout appbar; - @BindView(R.id.can_scroll_view) + RecyclerView recyclerView; - @BindView(R.id.can_content_view) + CoordinatorLayout canContentView; - @BindView(R.id.refresh) + CanRefreshLayout refresh; CanRVAdapter adapter; - @BindView(R.id.can_refresh_header) + ShapeLoadingRefreshView canRefreshHeader; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_coo); - ButterKnife.bind(this); + canRefreshFooter = findViewById(R.id.can_refresh_footer); + header = findViewById(R.id.header); + toolbar = findViewById(R.id.toolbar); + toolbarlayout = findViewById(R.id.toolbarlayout); + appbar = findViewById(R.id.appbar); + recyclerView = findViewById(R.id.can_scroll_view); + canContentView = findViewById(R.id.can_content_view); + refresh = findViewById(R.id.refresh); + canRefreshHeader = findViewById(R.id.can_refresh_header); refresh.setOnLoadMoreListener(this); diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/CooActivity2.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/CooActivity2.java index e7b7170..dd0ea31 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/CooActivity2.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/CooActivity2.java @@ -1,33 +1,28 @@ package com.canyinghao.canrefreshdemo.ui; +import android.annotation.SuppressLint; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.AppBarLayout; -import android.support.design.widget.CollapsingToolbarLayout; -import android.support.design.widget.CoordinatorLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; import android.widget.ImageView; -import com.canyinghao.canadapter.CanHolderHelper; -import com.canyinghao.canadapter.CanRVAdapter; import com.canyinghao.canrefresh.CanRefreshLayout; import com.canyinghao.canrefresh.classic.RotateRefreshView; import com.canyinghao.canrefresh.shapeloading.ShapeLoadingRefreshView; import com.canyinghao.canrefreshdemo.R; -import com.canyinghao.canrefreshdemo.model.MainBean; +import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.appbar.CollapsingToolbarLayout; import java.util.ArrayList; import java.util.List; -import butterknife.BindView; -import butterknife.ButterKnife; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; +import androidx.viewpager.widget.ViewPager; + /** * Created by canyinghao on 16/6/29. @@ -35,31 +30,41 @@ public class CooActivity2 extends AppCompatActivity implements CanRefreshLayout.OnRefreshListener, CanRefreshLayout.OnLoadMoreListener { - @BindView(R.id.can_refresh_footer) + RotateRefreshView canRefreshFooter; - @BindView(R.id.header) + ImageView header; - @BindView(R.id.toolbar) + Toolbar toolbar; - @BindView(R.id.toolbarlayout) + CollapsingToolbarLayout toolbarlayout; - @BindView(R.id.appbar) + AppBarLayout appbar; - @BindView(R.id.can_scroll_view) + ViewPager viewPager; - @BindView(R.id.can_content_view) + CoordinatorLayout canContentView; - @BindView(R.id.refresh) + CanRefreshLayout refresh; - @BindView(R.id.can_refresh_header) + ShapeLoadingRefreshView canRefreshHeader; + @SuppressLint("WrongViewCast") @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_coo2); - ButterKnife.bind(this); + + canRefreshFooter = findViewById(R.id.can_refresh_footer); + header = findViewById(R.id.header); + toolbar = findViewById(R.id.toolbar); + toolbarlayout = findViewById(R.id.toolbarlayout); + appbar = findViewById(R.id.appbar); + viewPager = findViewById(R.id.can_scroll_view); + canContentView = findViewById(R.id.can_content_view); + refresh = findViewById(R.id.refresh); + canRefreshHeader = findViewById(R.id.can_refresh_header); refresh.setOnLoadMoreListener(this); diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/CustomActivity.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/CustomActivity.java index 838a6d9..b7c9eff 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/CustomActivity.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/CustomActivity.java @@ -4,8 +4,6 @@ import android.app.Dialog; import android.content.DialogInterface; import android.os.Bundle; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -20,16 +18,16 @@ import com.canyinghao.canrefresh.yalantis.YalantisPhoenixRefreshView; import com.canyinghao.canrefreshdemo.R; -import butterknife.BindView; -import butterknife.ButterKnife; -import butterknife.OnClick; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; + /** * Created by canyinghao on 16/1/24. */ public class CustomActivity extends AppCompatActivity implements CanRefreshLayout.OnRefreshListener, CanRefreshLayout.OnLoadMoreListener{ - @BindView(R.id.refresh) + CanRefreshLayout refresh; int headStyle; @@ -48,7 +46,7 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.fragment_linear); - ButterKnife.bind(this); + refresh = findViewById(R.id.refresh); context =this; initView(); @@ -63,18 +61,19 @@ private void initView() { refresh.setOnLoadMoreListener(this); refresh.setOnRefreshListener(this); + findViewById(R.id.iv).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + showConfigDialog(); + } + }); + // showConfigDialog(); } - @OnClick({R.id.iv}) - public void click(View v){ - - showConfigDialog(); - } - private void showConfigDialog() { if (dialog == null) { diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/LinearLayoutFragment.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/LinearLayoutFragment.java index 8f46725..9b74239 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/LinearLayoutFragment.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/LinearLayoutFragment.java @@ -1,7 +1,6 @@ package com.canyinghao.canrefreshdemo.ui; import android.os.Bundle; -import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -9,8 +8,7 @@ import com.canyinghao.canrefresh.CanRefreshLayout; import com.canyinghao.canrefreshdemo.R; -import butterknife.BindView; -import butterknife.ButterKnife; +import androidx.fragment.app.Fragment; /** @@ -19,7 +17,7 @@ public class LinearLayoutFragment extends Fragment implements CanRefreshLayout.OnRefreshListener, CanRefreshLayout.OnLoadMoreListener { - @BindView(R.id.refresh) + CanRefreshLayout refresh; @@ -30,7 +28,7 @@ public class LinearLayoutFragment extends Fragment implements CanRefreshLayout.O public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_linear, container, false); - ButterKnife.bind(this, v); + refresh = v.findViewById(R.id.refresh); initView(v); return v; } diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ListViewFragment.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ListViewFragment.java index da6058e..2fa1825 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ListViewFragment.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ListViewFragment.java @@ -1,7 +1,7 @@ package com.canyinghao.canrefreshdemo.ui; +import android.annotation.SuppressLint; import android.os.Bundle; -import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -15,8 +15,7 @@ import com.canyinghao.canrefreshdemo.R; import com.canyinghao.canrefreshdemo.model.MainBean; -import butterknife.BindView; -import butterknife.ButterKnife; +import androidx.fragment.app.Fragment; /** @@ -24,19 +23,21 @@ */ public class ListViewFragment extends Fragment implements CanRefreshLayout.OnRefreshListener,CanRefreshLayout.OnLoadMoreListener { - @BindView(R.id.can_content_view) + ListView listView; - @BindView(R.id.refresh) + CanRefreshLayout refresh; CanAdapter adapter; + @SuppressLint("WrongViewCast") @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_listview, container, false); - ButterKnife.bind(this, v); + listView = v.findViewById(R.id.can_content_view); + refresh = v.findViewById(R.id.refresh); initView(); return v; diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/MainActivity.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/MainActivity.java index ca85860..c686c4a 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/MainActivity.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/MainActivity.java @@ -2,12 +2,7 @@ import android.content.Intent; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; import android.view.View; -import android.view.ViewGroup; import com.canyinghao.canadapter.CanHolderHelper; import com.canyinghao.canadapter.CanOnItemListener; @@ -15,8 +10,11 @@ import com.canyinghao.canrefreshdemo.R; import com.canyinghao.canrefreshdemo.model.MainBean; -import butterknife.BindView; -import butterknife.ButterKnife; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + /** * Created by canyinghao on 16/1/24. @@ -24,12 +22,12 @@ public class MainActivity extends AppCompatActivity { - @BindView(R.id.toolbar) + Toolbar toolbar; - @BindView(R.id.viewPager) + RecyclerView viewPager; - @BindView(R.id.cd) + View cd; @Override @@ -39,7 +37,9 @@ protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.activity_main); - ButterKnife.bind(this); + toolbar = findViewById(R.id.toolbar); + viewPager = findViewById(R.id.viewPager); + cd = findViewById(R.id.cd); toolbar.setTitle("CanRefreshDemo"); LinearLayoutManager mLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false); diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/RVRefreshFragment.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/RVRefreshFragment.java index d4a72ff..980373e 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/RVRefreshFragment.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/RVRefreshFragment.java @@ -1,11 +1,6 @@ package com.canyinghao.canrefreshdemo.ui; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -19,8 +14,11 @@ import com.canyinghao.canrefreshdemo.R; import com.canyinghao.canrefreshdemo.model.MainBean; -import butterknife.BindView; -import butterknife.ButterKnife; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; /** @@ -31,9 +29,9 @@ public class RVRefreshFragment extends Fragment implements CanRefreshLayout.OnRe public final static String TYPE = "type"; - @BindView(R.id.can_content_view) + RecyclerView recyclerView; - @BindView(R.id.refresh) + CanRefreshLayout refresh; CanRVAdapter adapter; @@ -88,7 +86,8 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa View v = inflater.inflate(layoutId, container, false); - ButterKnife.bind(this, v); + recyclerView = v.findViewById(R.id.can_content_view); + refresh = v.findViewById(R.id.refresh); if (type == 3) { diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/RVRefreshFragment1.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/RVRefreshFragment1.java index 13c5660..b98fec3 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/RVRefreshFragment1.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/RVRefreshFragment1.java @@ -1,12 +1,6 @@ package com.canyinghao.canrefreshdemo.ui; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.StaggeredGridLayoutManager; -import android.text.method.KeyListener; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -24,9 +18,11 @@ import com.canyinghao.canrefreshdemo.R; import com.canyinghao.canrefreshdemo.model.MainBean; -import butterknife.BindView; -import butterknife.ButterKnife; -import butterknife.OnClick; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.StaggeredGridLayoutManager; /** @@ -37,23 +33,23 @@ public class RVRefreshFragment1 extends Fragment implements CanRefreshLayout.OnR public final static String TYPE = "type"; - @BindView(R.id.can_content_view) + RecyclerView recyclerView; - @BindView(R.id.refresh) + CanRefreshLayout refresh; CanRVAdapter adapter; int type; - @BindView(R.id.iv_head) + ImageView ivHead; - @BindView(R.id.header) + CanRecyclerViewHeaderFooter header; - @BindView(R.id.pb) + ProgressBar pb; - @BindView(R.id.tv_loadmore) + TextView tvLoadmore; - @BindView(R.id.footer) + CanRecyclerViewHeaderFooter footer; @@ -78,7 +74,14 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa View v = inflater.inflate(R.layout.fragment_rv_load, container, false); - ButterKnife.bind(this, v); + + recyclerView = v.findViewById(R.id.can_content_view); + refresh = v.findViewById(R.id.refresh); + ivHead = v.findViewById(R.id.iv_head); + header = v.findViewById(R.id.header); + pb = v.findViewById(R.id.pb); + tvLoadmore = v.findViewById(R.id.tv_loadmore); + footer = v.findViewById(R.id.footer); initView(); @@ -158,17 +161,16 @@ public void onRVItemClick(ViewGroup parent, View itemView, int position) { header.attachTo(recyclerView, true); footer.attachTo(recyclerView, false); footer.setLoadMoreListener(this); - - + ivHead.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + App.getInstance().show("click head"); + } + }); } - @OnClick(R.id.iv_head) - public void click(View v) { - - App.getInstance().show("click head"); - } @Override diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/RvActivity.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/RvActivity.java index c0f6285..2fded33 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/RvActivity.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/RvActivity.java @@ -1,24 +1,23 @@ package com.canyinghao.canrefreshdemo.ui; import android.os.Bundle; -import android.support.design.widget.AppBarLayout; -import android.support.design.widget.TabLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.View; import com.canyinghao.canrefreshdemo.R; +import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.tabs.TabLayout; import java.util.ArrayList; import java.util.List; -import butterknife.BindView; -import butterknife.ButterKnife; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; +import androidx.viewpager.widget.ViewPager; + /** * Created by canyinghao on 16/1/21. @@ -26,18 +25,18 @@ public class RvActivity extends AppCompatActivity { - @BindView(R.id.toolbar) + Toolbar toolbar; - @BindView(R.id.tabLayout) + TabLayout tabLayout; - @BindView(R.id.viewPager) + ViewPager viewPager; - @BindView(R.id.appbar) + AppBarLayout appbar; Adapter adapter; - @BindView(R.id.cd) + View cd; @Override @@ -45,7 +44,11 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_pager); - ButterKnife.bind(this); + toolbar = findViewById(R.id.toolbar); + tabLayout = findViewById(R.id.tabLayout); + viewPager = findViewById(R.id.viewPager); + appbar = findViewById(R.id.appbar); + cd = findViewById(R.id.cd); toolbar.setTitle(R.string.app_name); diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ScrollActivity.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ScrollActivity.java index 39a20a6..e76282c 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ScrollActivity.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ScrollActivity.java @@ -1,23 +1,22 @@ package com.canyinghao.canrefreshdemo.ui; import android.os.Bundle; -import android.support.design.widget.TabLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.View; import com.canyinghao.canrefreshdemo.R; +import com.google.android.material.tabs.TabLayout; import java.util.ArrayList; import java.util.List; -import butterknife.BindView; -import butterknife.ButterKnife; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; +import androidx.viewpager.widget.ViewPager; + /** * Created by canyinghao on 16/1/21. @@ -25,15 +24,15 @@ public class ScrollActivity extends AppCompatActivity { - @BindView(R.id.toolbar) + Toolbar toolbar; - @BindView(R.id.tabLayout) + TabLayout tabLayout; - @BindView(R.id.viewPager) + ViewPager viewPager; Adapter adapter; - @BindView(R.id.cd) + View cd; @Override @@ -41,7 +40,10 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_pager2); - ButterKnife.bind(this); + toolbar =findViewById(R.id.toolbar); + tabLayout =findViewById(R.id.tabLayout); + viewPager =findViewById(R.id.viewPager); + cd =findViewById(R.id.cd); toolbar.setTitle(R.string.app_name); diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ScrollViewFragment.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ScrollViewFragment.java index 226520a..c35d8bb 100755 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ScrollViewFragment.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ScrollViewFragment.java @@ -2,7 +2,6 @@ import android.os.Bundle; -import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -10,6 +9,8 @@ import com.canyinghao.canrefresh.CanRefreshLayout; import com.canyinghao.canrefreshdemo.R; +import androidx.fragment.app.Fragment; + public class ScrollViewFragment extends Fragment implements CanRefreshLayout.OnRefreshListener,CanRefreshLayout.OnLoadMoreListener { private CanRefreshLayout refresh; diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/TestFragment.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/TestFragment.java index 40d34e6..08ae788 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/TestFragment.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/TestFragment.java @@ -1,16 +1,9 @@ package com.canyinghao.canrefreshdemo.ui; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; import com.canyinghao.canrefreshdemo.R; -import butterknife.ButterKnife; - /** * Created by canyinghao on 2016/12/6. */ @@ -30,7 +23,7 @@ public static TestFragment newInstance() { public void initView(Bundle savedInstanceState) { setContentView(R.layout.fragment_test); - ButterKnife.bind(this,rootView); + } @Override diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/TestFragment1.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/TestFragment1.java index 71cec81..f4a97c1 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/TestFragment1.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/TestFragment1.java @@ -1,18 +1,14 @@ package com.canyinghao.canrefreshdemo.ui; import android.os.Bundle; -import android.support.v7.widget.LinearLayoutManager; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; import com.canyinghao.canadapter.CanHolderHelper; import com.canyinghao.canadapter.CanRVAdapter; import com.canyinghao.canrecyclerview.RecyclerViewEmpty; import com.canyinghao.canrefreshdemo.R; -import butterknife.BindView; -import butterknife.ButterKnife; +import androidx.recyclerview.widget.LinearLayoutManager; + /** * Created by canyinghao on 2016/12/6. @@ -21,7 +17,7 @@ public class TestFragment1 extends BaseFragment { - @BindView(R.id.recycler) + RecyclerViewEmpty recycler; public static TestFragment1 newInstance() { @@ -35,7 +31,7 @@ public static TestFragment1 newInstance() { public void initView(Bundle savedInstanceState) { setContentView(R.layout.fragment_test1); - ButterKnife.bind(this, rootView); + recycler = rootView.findViewById(R.id.recycler); recycler.setLayoutManager(new LinearLayoutManager(context)); diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/TextViewFragment.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/TextViewFragment.java index b3ed3dd..15f05d6 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/TextViewFragment.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/TextViewFragment.java @@ -1,7 +1,6 @@ package com.canyinghao.canrefreshdemo.ui; import android.os.Bundle; -import android.support.v4.app.Fragment; import android.text.Html; import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; @@ -12,17 +11,17 @@ import com.canyinghao.canrefresh.CanRefreshLayout; import com.canyinghao.canrefreshdemo.R; -import butterknife.BindView; -import butterknife.ButterKnife; +import androidx.fragment.app.Fragment; + /** * Created by canyinghao on 16/1/24. */ public class TextViewFragment extends Fragment implements CanRefreshLayout.OnRefreshListener, CanRefreshLayout.OnLoadMoreListener { - @BindView(R.id.can_content_view) + TextView tvAbout; - @BindView(R.id.refresh) + CanRefreshLayout refresh; @@ -33,7 +32,8 @@ public class TextViewFragment extends Fragment implements CanRefreshLayout.OnRef public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_text_view, container, false); - ButterKnife.bind(this, v); + tvAbout = v.findViewById(R.id.can_content_view); + refresh = v.findViewById(R.id.refresh); initView(v); return v; } diff --git a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ViewActivity.java b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ViewActivity.java index e83dfad..1f9236b 100644 --- a/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ViewActivity.java +++ b/app/src/main/java/com/canyinghao/canrefreshdemo/ui/ViewActivity.java @@ -1,23 +1,22 @@ package com.canyinghao.canrefreshdemo.ui; import android.os.Bundle; -import android.support.design.widget.TabLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.View; import com.canyinghao.canrefreshdemo.R; +import com.google.android.material.tabs.TabLayout; import java.util.ArrayList; import java.util.List; -import butterknife.BindView; -import butterknife.ButterKnife; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; +import androidx.viewpager.widget.ViewPager; + /** * Created by canyinghao on 16/1/21. @@ -25,15 +24,15 @@ public class ViewActivity extends AppCompatActivity { - @BindView(R.id.toolbar) + Toolbar toolbar; - @BindView(R.id.tabLayout) + TabLayout tabLayout; - @BindView(R.id.viewPager) + ViewPager viewPager; Adapter adapter; - @BindView(R.id.cd) + View cd; @Override @@ -41,7 +40,10 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_pager2); - ButterKnife.bind(this); + toolbar = findViewById(R.id.toolbar); + tabLayout = findViewById(R.id.tabLayout); + viewPager = findViewById(R.id.viewPager); + cd = findViewById(R.id.cd); toolbar.setTitle(R.string.app_name); diff --git a/app/src/main/res/layout/activity_coo.xml b/app/src/main/res/layout/activity_coo.xml index 6339dbf..d5c3eb2 100644 --- a/app/src/main/res/layout/activity_coo.xml +++ b/app/src/main/res/layout/activity_coo.xml @@ -24,19 +24,19 @@ android:layout_width="match_parent" android:layout_height="wrap_content" /> - - - - - + - + - - + diff --git a/app/src/main/res/layout/activity_coo2.xml b/app/src/main/res/layout/activity_coo2.xml index c7077f5..33d99bb 100644 --- a/app/src/main/res/layout/activity_coo2.xml +++ b/app/src/main/res/layout/activity_coo2.xml @@ -24,19 +24,19 @@ android:layout_width="match_parent" android:layout_height="wrap_content" /> - - - - - + - + - + - - + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index b5d63fb..e5a58b3 100755 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,17 +1,17 @@ - - - - + - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_pager.xml b/app/src/main/res/layout/activity_pager.xml index 9dc4b0d..c1d51fb 100755 --- a/app/src/main/res/layout/activity_pager.xml +++ b/app/src/main/res/layout/activity_pager.xml @@ -1,26 +1,26 @@ - - - + - - - + - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_pager2.xml b/app/src/main/res/layout/activity_pager2.xml index 9404188..bd45765 100755 --- a/app/src/main/res/layout/activity_pager2.xml +++ b/app/src/main/res/layout/activity_pager2.xml @@ -6,13 +6,13 @@ android:layout_width="match_parent" android:layout_height="match_parent" > - - + - - - + - - - - - - + 0 - && (absListView.getFirstVisiblePosition() > 0 || absListView.getChildAt(0) - .getTop() < absListView.getPaddingTop()); - } else { - return ViewCompat.canScrollVertically(view, -1) || view.getScrollY() > 0; - } - } else { - return ViewCompat.canScrollVertically(view, -1); - } + + return view.canScrollVertically(-1); + } @@ -1562,28 +1593,54 @@ protected boolean canChildScrollDown() { if (mIsCoo) { if (mIsViewPager) { - int current = mViewPager.getCurrentItem(); - if (current < mViewPager.getChildCount()) { + if(mViewPager!=null){ + int current = mViewPager.getCurrentItem(); + if (current < mViewPager.getChildCount()) { + + PagerAdapter adapter = mViewPager.getAdapter(); - PagerAdapter adapter = mViewPager.getAdapter(); + if (adapter instanceof FragmentPagerAdapter) { - if (adapter instanceof FragmentPagerAdapter) { + FragmentPagerAdapter fragmentPagerAdapter = (FragmentPagerAdapter) adapter; - FragmentPagerAdapter fragmentPagerAdapter = (FragmentPagerAdapter) adapter; + Fragment fragment = fragmentPagerAdapter.getItem(current); - Fragment fragment = fragmentPagerAdapter.getItem(current); + if (fragment != null) { + mScrollView = fragment.getView(); + } + + } else { - if (fragment != null) { - mScrollView = fragment.getView(); + mScrollView = mViewPager.getChildAt(current); } - } else { - mScrollView = mViewPager.getChildAt(current); } + }else if(mViewPager2!=null){ + int current = mViewPager2.getCurrentItem(); + if (current < mViewPager2.getChildCount()) { + + RecyclerView.Adapter adapter = mViewPager2.getAdapter(); + + if (adapter instanceof FragmentStateAdapter) { + + FragmentStateAdapter fragmentPagerAdapter = (FragmentStateAdapter) adapter; + + Fragment fragment = fragmentPagerAdapter.createFragment(current); + + if (fragment != null) { + mScrollView = fragment.getView(); + } + + } else { + mScrollView = mViewPager2.getChildAt(current); + } + + } } + } if (mScrollView == null) { @@ -1600,18 +1657,9 @@ protected boolean canChildScrollDown() { } private boolean canScrollDown(View view) { - if (android.os.Build.VERSION.SDK_INT < 14) { - if (view instanceof AbsListView) { - final AbsListView absListView = (AbsListView) view; - return absListView.getChildCount() > 0 - && (absListView.getLastVisiblePosition() < absListView.getChildCount() - 1 - || absListView.getChildAt(absListView.getChildCount() - 1).getBottom() > absListView.getPaddingBottom()); - } else { - return ViewCompat.canScrollVertically(view, 1) || view.getScrollY() < 0; - } - } else { - return ViewCompat.canScrollVertically(view, 1); - } + + return view.canScrollVertically(1); + } /** diff --git a/canrefresh/src/main/java/com/canyinghao/canrefresh/shapeloading/ShapeLoadingRefreshView.java b/canrefresh/src/main/java/com/canyinghao/canrefresh/shapeloading/ShapeLoadingRefreshView.java index 6b04b84..38f0454 100644 --- a/canrefresh/src/main/java/com/canyinghao/canrefresh/shapeloading/ShapeLoadingRefreshView.java +++ b/canrefresh/src/main/java/com/canyinghao/canrefresh/shapeloading/ShapeLoadingRefreshView.java @@ -1,6 +1,9 @@ package com.canyinghao.canrefresh.shapeloading; +import android.animation.Animator; +import android.animation.AnimatorSet; +import android.animation.ObjectAnimator; import android.content.Context; import android.util.AttributeSet; import android.view.Gravity; @@ -14,11 +17,6 @@ import com.canyinghao.canrefresh.CanRefresh; import com.canyinghao.canrefresh.R; -import com.nineoldandroids.animation.Animator; -import com.nineoldandroids.animation.AnimatorSet; -import com.nineoldandroids.animation.ObjectAnimator; - -import androidx.core.view.ViewCompat; /** * Created by canyinghao on 16/6/29. @@ -72,9 +70,9 @@ protected void onFinishInflate() { layoutParams.gravity = Gravity.CENTER; layoutParams.height = MAX_DISTANCE * 2; - mShapeLoadingView = (ShapeLoadingView) view.findViewById(R.id.shapeLoadingView); + mShapeLoadingView = view.findViewById(R.id.shapeLoadingView); - mIndicationIm = (ImageView) view.findViewById(R.id.indication); + mIndicationIm = view.findViewById(R.id.indication); addView(view, layoutParams); @@ -277,8 +275,8 @@ public void onPositionChange(float currentPercent) { distance = MAX_DISTANCE; } - ViewCompat.setRotation(mShapeLoadingView, rotation); - ViewCompat.setTranslationY(mShapeLoadingView, distance); + mShapeLoadingView.setRotation( rotation); + mShapeLoadingView.setTranslationY(distance); } diff --git a/gradle.properties b/gradle.properties index e89c550..dbd118f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,7 +21,7 @@ PROJ_GROUP=com.canyinghao -PROJ_VERSION=5.0.0 +PROJ_VERSION=5.0.1 PROJ_NAME=canrefresh PROJ_WEBSITEURL=https://github.com/canyinghao/CanRefresh PROJ_ISSUETRACKERURL= diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 76c7bf8..2ab5902 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Mar 19 23:27:21 CST 2017 +#Mon Nov 13 11:46:56 CST 2017 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-5.6.4-all.zip From 2736098213f129d16c15e8df025e411b4f90ffac Mon Sep 17 00:00:00 2001 From: canyinghao Date: Mon, 31 May 2021 19:46:58 +0800 Subject: [PATCH 3/3] 5.0.2 --- build.gradle | 2 +- canrefresh/build.gradle | 26 ++++++++++++------------ gradle.properties | 5 ++++- gradle/wrapper/gradle-wrapper.properties | 5 +++-- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index 29771c9..d8d9ad0 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' + classpath 'com.android.tools.build:gradle:4.1.1' // classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/canrefresh/build.gradle b/canrefresh/build.gradle index ff7c2a2..5188c0b 100644 --- a/canrefresh/build.gradle +++ b/canrefresh/build.gradle @@ -6,7 +6,7 @@ android { defaultConfig { minSdkVersion 14 - targetSdkVersion 26 + targetSdkVersion 28 versionCode 1 versionName "1.0" } @@ -21,18 +21,18 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.google.android.material:material:1.1.0' - implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.appcompat:appcompat:1.2.0' } -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2' - classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1" - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' - } -} -apply from: 'bintray.gradle' +//buildscript { +// repositories { +// jcenter() +// } +// dependencies { +// classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2' +// classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1" +// classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' +// } +//} +//apply from: 'bintray.gradle' diff --git a/gradle.properties b/gradle.properties index dbd118f..a63de2b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,10 @@ # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10248m -XX:MaxPermSize=256m # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 - +android.enableD8=true +android.useAndroidX=true +android.enableJetifier=true +android.enableR8=false # 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 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2ab5902..dd16aab 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ -#Mon Nov 13 11:46:56 CST 2017 +#Mon Dec 07 11:49:41 CST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip +