├── .gitignore ├── .idea ├── caches │ └── build_file_checksums.ser ├── compiler.xml ├── dictionaries │ └── yc.xml ├── encodings.xml ├── gradle.xml ├── inspectionProfiles │ └── Project_Default.xml ├── jarRepositories.xml ├── markdown-navigator.xml ├── markdown-navigator │ └── profiles_settings.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── AppGradle └── app.gradle ├── EastAdapterLib ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── yc │ │ └── eastadapterlib │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── com │ │ └── yc │ │ └── eastadapterlib │ │ ├── BaseRecycleAdapter.java │ │ ├── BaseViewHolder.java │ │ ├── MultiTypeSupport.java │ │ ├── OnItemClickListener.java │ │ └── OnItemLongClickListener.java │ └── test │ └── java │ └── com │ └── yc │ └── eastadapterlib │ └── ExampleUnitTest.java ├── LICENSE ├── PhotoCoverLib ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── yc │ │ └── cover │ │ ├── CoverLayoutManger.java │ │ └── CoverRecyclerView.java │ └── res │ └── values │ └── strings.xml ├── README.md ├── ReadMeWiki ├── 01.RecyclerView.md ├── 02.Adapter.md ├── 03.ViewHolder.md ├── 04.LayoutManager.md ├── 05.SnapHelper.md ├── 06.ItemTouchHelper.md ├── 07.SpanSizeLookup.md ├── 08.ItemDecoration.md ├── 09.RecycledViewPool.md ├── 10.ItemAnimator.md ├── 11.RecyclerView上拉加载.md ├── 12.RecyclerView缓存原理.md ├── 13.SnapHelper源码分析.md ├── 14.RecyclerView吸顶.md ├── 15.自定义SpanSizeLookup.md ├── 16.自定义SnapHelper.md ├── 17.自定义LayoutManager.md ├── 18.ItemTouchHelper 实现交互动画.md ├── 19.自定义ItemDecoration分割线.md ├── 20.RecyclerView实现多type页面.md ├── 21.RecyclerView优化处理.md ├── 22.RecyclerView问题汇总.md ├── 23.RecyclerView滑动冲突.md ├── 24.ScrollView嵌套RecyclerView问题.md ├── 25.RecyclerView问题汇总.md ├── 26.RecyclerView标签.md ├── 27. RecyclerView瀑布流优化.md ├── 28.Adapter分组封装.md ├── 29.DiffUtil优化.md ├── 30.RecyclerView快速索引.md ├── 31.RecyclerView崩溃.md ├── 32.自定义画廊控件.md ├── 33.平滑滚动位置.md └── 35.RecyclerView封装库和综合案例【包含25篇博客】.md ├── RefreshViewLib ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── org │ │ └── yczbj │ │ └── ycrefreshviewlib │ │ ├── adapter │ │ ├── DefaultEventDelegate.java │ │ └── RecyclerArrayAdapter.java │ │ ├── holder │ │ └── BaseViewHolder.java │ │ ├── inter │ │ ├── InterEventDelegate.java │ │ ├── InterItemView.java │ │ ├── OnErrorListener.java │ │ ├── OnItemChildClickListener.java │ │ ├── OnItemClickListener.java │ │ ├── OnItemLongClickListener.java │ │ ├── OnLoadMoreListener.java │ │ ├── OnMoreListener.java │ │ └── OnNoMoreListener.java │ │ ├── item │ │ ├── DividerViewItemLine.java │ │ ├── RecycleViewItemLine.java │ │ ├── SpaceViewItemLine.java │ │ └── StickyHeaderItemLine.java │ │ ├── observer │ │ ├── FixDataObserver.java │ │ └── ViewDataObserver.java │ │ ├── refresh │ │ └── RefreshLayout.java │ │ ├── span │ │ └── GridSpanSizeLookup.java │ │ ├── swipe │ │ ├── OnSwipeMenuListener.java │ │ └── YCSwipeMenu.java │ │ ├── touch │ │ └── ItemTouchHelpCallback.java │ │ ├── utils │ │ ├── RecyclerUtils.java │ │ └── RefreshLogUtils.java │ │ └── view │ │ ├── DiffCallBack.java │ │ ├── DiffItemCallBack.java │ │ ├── InnerRecycledViewPool.java │ │ └── YCRefreshView.java │ └── res │ ├── layout │ └── refresh_recyclerview.xml │ └── values │ ├── attrs.xml │ └── strings.xml ├── SelectViewLib ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── yc │ │ └── selectviewlib │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── yc │ │ │ └── selectviewlib │ │ │ ├── FingerListener.java │ │ │ ├── SelectRecyclerView.java │ │ │ ├── SelectRecyclerViewAdapter.java │ │ │ └── SelectionListener.java │ └── res │ │ └── values │ │ ├── attrs.xml │ │ └── dimens.xml │ └── test │ └── java │ └── com │ └── yc │ └── selectviewlib │ └── ExampleUnitTest.java ├── ShopCatLib ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── ycbjie │ │ └── ycshopcatlib │ │ ├── VerticalListView.java │ │ └── VerticalRecyclerView.java │ └── res │ └── values │ └── strings.xml ├── SlideViewLib ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── yc │ │ └── slideview │ │ ├── Slide.java │ │ ├── SlideAnimationHelper.java │ │ ├── SlideHelper.java │ │ └── SlideViewHolder.java │ └── res │ └── values │ └── strings.xml ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── org │ │ └── yczbj │ │ └── ycrefreshview │ │ ├── MainActivity.java │ │ ├── app │ │ ├── BaseApp.java │ │ ├── Constant.java │ │ └── SysUtils.java │ │ ├── collapsing │ │ └── EightCollapsingActivity.java │ │ ├── cover │ │ ├── ChildEntity.java │ │ ├── CoverActivity.java │ │ ├── CoverFirstActivity.java │ │ ├── CoverSecondActivity.java │ │ ├── GroupEntity.java │ │ ├── GroupedAdapter.java │ │ └── cover │ │ │ ├── CoverAdapter.java │ │ │ ├── CoverImageAdapter.java │ │ │ ├── GalleryImageView.java │ │ │ └── GalleryViewPager.java │ │ ├── data │ │ ├── AdData.java │ │ ├── AppUtils.java │ │ ├── DataProvider.java │ │ ├── PersonData.java │ │ └── PictureData.java │ │ ├── delete │ │ ├── DeleteAdapter.java │ │ └── DeleteAndTopActivity.java │ │ ├── header │ │ ├── BannerAdapter.java │ │ ├── HeaderFooterActivity.java │ │ └── NarrowImageAdapter.java │ │ ├── horizontal │ │ ├── FourHorizontalActivity.java │ │ └── NarrowImageAdapter.java │ │ ├── insert │ │ └── ThirdInsertActivity.java │ │ ├── load │ │ ├── LoadMoreActivity.java │ │ ├── LoadMoreActivity2.java │ │ ├── LoadMoreAdapter.java │ │ └── LoadMoreAdapter2.java │ │ ├── multistyle │ │ ├── FiveMultiStyleActivity.java │ │ └── PersonWithAdAdapter.java │ │ ├── normal │ │ ├── NormalRecyclerViewActivity.java │ │ ├── SpanModel.java │ │ ├── SpanRecyclerViewActivity.java │ │ └── SpanTypeAdapter.java │ │ ├── refresh │ │ ├── PersonAdapter.java │ │ ├── PersonViewHolder.java │ │ ├── RefreshAndMoreActivity1.java │ │ ├── RefreshAndMoreActivity2.java │ │ └── RefreshAndMoreActivity3.java │ │ ├── scroll │ │ ├── ScrollActivity.java │ │ ├── ScrollAdapter.java │ │ ├── ScrollPagerActivity.java │ │ ├── inter │ │ │ └── OnPagerListener.java │ │ ├── pager │ │ │ ├── AbsPagerAdapter.java │ │ │ ├── BaseTransformer.java │ │ │ ├── DefaultTransformer.java │ │ │ └── LayoutViewPager.java │ │ └── recycler │ │ │ ├── PagerLayoutManager.java │ │ │ └── ScrollPageHelper.java │ │ ├── select │ │ ├── SelectFollowActivity.java │ │ ├── SelectFollowAdapter.java │ │ └── SelectPoint.java │ │ ├── slide │ │ ├── HhItemClickListener.java │ │ ├── ItemSlideAdapter.java │ │ ├── OnDeleteClickListener.java │ │ ├── SlideViewActivity.java │ │ └── YCBean.java │ │ ├── staggered │ │ ├── AdViewHolder.java │ │ ├── ImageAdapter.java │ │ ├── ImageStageredAdapter.java │ │ ├── ImageViewHolder.java │ │ ├── SevenStaggeredActivity.java │ │ ├── SevenStaggeredGridActivity.java │ │ ├── StageredLoadMoreActivity.java │ │ └── StageredLoadMoreAdapter.java │ │ ├── sticky │ │ ├── AppBarLayoutBehavior.java │ │ ├── SixStickyHeaderActivity.java │ │ ├── SixStickyNormalActivity.java │ │ ├── SixStickyViewActivity.java │ │ ├── StickyHeaderAdapter.java │ │ ├── StickyNormalAdapter.java │ │ └── StickyNormalItemLine.java │ │ ├── tag │ │ └── TagRecyclerViewActivity.java │ │ ├── touchmove │ │ ├── NightTouchMoveActivity.java │ │ └── NightTouchMoveActivity2.java │ │ └── type │ │ ├── TypeActivity.java │ │ └── TypeAdapter.java │ └── res │ ├── drawable-v24 │ └── ic_launcher_foreground.xml │ ├── drawable-xxhdpi │ ├── bg_autumn_tree_min.jpg │ ├── bg_kites_min.png │ ├── bg_lake_min.jpg │ ├── bg_leaves_min.jpg │ ├── bg_magnolia_trees_min.jpg │ ├── bg_small_autumn_tree_min.jpg │ ├── bg_small_kites_min.png │ ├── bg_small_lake_min.jpg │ ├── bg_small_leaves_min.jpg │ ├── bg_small_magnolia_trees_min.jpg │ ├── bg_small_solda_min.jpg │ ├── bg_small_tree_min.jpg │ ├── bg_small_tulip_min.jpg │ ├── bg_solda_min.jpg │ ├── default_image.png │ ├── girl10.jpg │ ├── girl11.jpg │ ├── girl12.jpg │ ├── girl13.jpg │ ├── girl14.jpg │ ├── girl2.jpg │ ├── girl3.jpg │ ├── girl4.jpg │ ├── girl5.jpg │ ├── girl6.jpg │ ├── girl7.jpg │ ├── girl9.jpg │ ├── header.jpg │ ├── ic_add.png │ ├── ic_back.png │ ├── ic_refresh.png │ ├── ic_remove.png │ ├── ic_top.png │ ├── star.png │ ├── view_icon_data_emtry.png │ ├── view_icon_data_error.png │ ├── view_icon_network_error.png │ ├── yy01.jpg │ ├── yy02.jpg │ ├── yy03.jpg │ ├── yy04.jpg │ ├── yy05.jpg │ ├── yy06.jpg │ ├── yy07.jpg │ ├── yy08.jpg │ └── yy09.jpg │ ├── drawable │ ├── ic_launcher_background.xml │ ├── shape_btn_color_bg.xml │ ├── shape_btn_color_bg_press.xml │ └── shape_btn_search_gray.xml │ ├── layout │ ├── activity_collapsing.xml │ ├── activity_cover.xml │ ├── activity_cover_first.xml │ ├── activity_horizontal.xml │ ├── activity_main.xml │ ├── activity_recyclerview.xml │ ├── activity_refresh_view.xml │ ├── activity_select_follow.xml │ ├── activity_slide_view.xml │ ├── activity_sticky_header.xml │ ├── activity_view_pager.xml │ ├── base_recycler_view.xml │ ├── base_recyclerview.xml │ ├── base_tool_bar.xml │ ├── footer_view.xml │ ├── header_item.xml │ ├── header_view.xml │ ├── include_header.xml │ ├── include_scroll_bottom.xml │ ├── include_sticky_header.xml │ ├── item_car_picture_footer.xml │ ├── item_car_picture_header.xml │ ├── item_car_picture_view.xml │ ├── item_gallery_image_view.xml │ ├── item_image.xml │ ├── item_image_pager.xml │ ├── item_news.xml │ ├── item_news_content.xml │ ├── item_news_del.xml │ ├── item_news_second.xml │ ├── item_slide_view.xml │ ├── item_tag.xml │ ├── tag_select_follow.xml │ ├── view_custom_data_error.xml │ ├── view_custom_empty_data.xml │ ├── view_custom_loading_data.xml │ ├── view_custom_network_error.xml │ ├── view_empty.xml │ ├── view_error.xml │ ├── view_more.xml │ ├── view_more2.xml │ ├── view_more_horizontal.xml │ ├── view_nomore.xml │ ├── view_progress.xml │ ├── view_progress_loading.xml │ └── view_scroll_gallery.xml │ ├── menu │ ├── menu_insert.xml │ └── menu_main.xml │ ├── mipmap-anydpi-v26 │ ├── ic_launcher.xml │ └── ic_launcher_round.xml │ ├── mipmap-hdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-mdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ └── values │ ├── array.xml │ ├── colors.xml │ ├── glide_tag.xml │ ├── strings.xml │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── image ├── 1.jpg ├── 10.jpg ├── 11.jpg ├── 12.jpg ├── 2.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── 6.jpg ├── 7.jpg ├── 8.jpg ├── 9.jpg ├── gif1.gif ├── gif2.gif ├── gif3.gif └── gif4.gif ├── read ├── Slide_README.md ├── wiki1.md ├── wiki2.md ├── wiki3.md ├── wiki4.md └── wiki5.md └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/dictionaries/yc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 25 | 26 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 36 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | 34 | 35 | 39 | 40 | 44 | 45 | 49 | 50 | 54 | 55 | -------------------------------------------------------------------------------- /.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 37 | 38 | 39 | 40 | 41 | 42 | 44 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AppGradle/app.gradle: -------------------------------------------------------------------------------- 1 | ext { 2 | 3 | androidBuildToolsVersion = "29.0.0" 4 | androidMinSdkVersion = 17 5 | androidTargetSdkVersion = 29 6 | androidCompileSdkVersion = 29 7 | 8 | 9 | constraintLayoutVersion = '1.1.3' 10 | appcompatVersion = '1.2.0' 11 | annotationVersion = '1.1.0' 12 | cardviewVersion = '1.0.0' 13 | mediaVersion = '1.0.1' 14 | recyclerviewVersion = '1.1.0' 15 | swiperefreshlayoutVersion = '1.0.0' 16 | 17 | /**主app-start*/ 18 | AppDependencies = [ 19 | constraintLayout : "androidx.constraintlayout:constraintlayout:${constraintLayoutVersion}", 20 | appcompat : "androidx.appcompat:appcompat:${appcompatVersion}", 21 | annotation : "androidx.annotation:annotation:${annotationVersion}", 22 | cardview : "androidx.cardview:cardview:${cardviewVersion}", 23 | media : "androidx.media:media:${mediaVersion}", 24 | recyclerview : "androidx.recyclerview:recyclerview:${recyclerviewVersion}", 25 | swiperefreshlayout : "androidx.swiperefreshlayout:swiperefreshlayout:${swiperefreshlayoutVersion}", 26 | 27 | ] 28 | 29 | } -------------------------------------------------------------------------------- /EastAdapterLib/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /EastAdapterLib/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.library' 3 | } 4 | apply from: rootProject.projectDir.absolutePath + "/AppGradle/app.gradle" 5 | apply plugin: 'com.github.dcendents.android-maven' 6 | 7 | android { 8 | compileSdkVersion project.ext.androidCompileSdkVersion 9 | //buildToolsVersion project.ext.androidBuildToolsVersion 10 | 11 | defaultConfig { 12 | minSdkVersion project.ext.androidMinSdkVersion 13 | targetSdkVersion project.ext.androidTargetSdkVersion 14 | versionCode 32 15 | versionName "3.0.2" 16 | 17 | testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' 18 | 19 | } 20 | buildTypes { 21 | release { 22 | minifyEnabled false 23 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 24 | } 25 | } 26 | } 27 | 28 | dependencies { 29 | implementation fileTree(dir: 'libs', include: ['*.jar']) 30 | implementation project.ext.AppDependencies['appcompat'] 31 | implementation project.ext.AppDependencies['annotation'] 32 | implementation project.ext.AppDependencies['recyclerview'] 33 | } 34 | 35 | -------------------------------------------------------------------------------- /EastAdapterLib/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/EastAdapterLib/consumer-rules.pro -------------------------------------------------------------------------------- /EastAdapterLib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /EastAdapterLib/src/androidTest/java/com/yc/eastadapterlib/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.yc.eastadapterlib; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | assertEquals("com.yc.eastadapterlib.test", appContext.getPackageName()); 25 | } 26 | } -------------------------------------------------------------------------------- /EastAdapterLib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /EastAdapterLib/src/main/java/com/yc/eastadapterlib/MultiTypeSupport.java: -------------------------------------------------------------------------------- 1 | package com.yc.eastadapterlib; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | *
 7 |  *     @author  yangchong
 8 |  *     email  : yangchong211@163.com
 9 |  *     time   : 2017/07/15
10 |  *     desc   : 接口
11 |  *     revise:
12 |  * 
13 | */ 14 | public interface MultiTypeSupport { 15 | 16 | int getLayoutId(List data, int position); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /EastAdapterLib/src/main/java/com/yc/eastadapterlib/OnItemClickListener.java: -------------------------------------------------------------------------------- 1 | package com.yc.eastadapterlib; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | *
 7 |  *     @author yangchong
 8 |  *     email  : yangchong211@163.com
 9 |  *     time  : 2017/07/15
10 |  *     desc  : 点击事件
11 |  *     revise:
12 |  * 
13 | */ 14 | public interface OnItemClickListener { 15 | 16 | void onItemClick(View view, int position); 17 | } 18 | -------------------------------------------------------------------------------- /EastAdapterLib/src/main/java/com/yc/eastadapterlib/OnItemLongClickListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package com.yc.eastadapterlib; 18 | 19 | import android.view.View; 20 | 21 | /** 22 | *
23 |  *     @author 杨充
24 |  *     blog  : https://github.com/yangchong211
25 |  *     time  : 2016/4/28
26 |  *     desc  : item中长按点击监听接口
27 |  *     revise:
28 |  * 
29 | */ 30 | public interface OnItemLongClickListener { 31 | /** 32 | * item中长按点击监听接口 33 | * @param position 索引 34 | * @return 35 | */ 36 | boolean onItemLongClick(View view, int position); 37 | } 38 | -------------------------------------------------------------------------------- /EastAdapterLib/src/test/java/com/yc/eastadapterlib/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.yc.eastadapterlib; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /PhotoCoverLib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /PhotoCoverLib/README.md: -------------------------------------------------------------------------------- 1 | # YCPhotoCover 仿懂车帝,汽车之家自定义画廊浏览相册下 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /PhotoCoverLib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply from: rootProject.projectDir.absolutePath + "/AppGradle/app.gradle" 3 | apply plugin: 'com.github.dcendents.android-maven' 4 | 5 | 6 | android { 7 | compileSdkVersion project.ext.androidCompileSdkVersion 8 | //buildToolsVersion project.ext.androidBuildToolsVersion 9 | 10 | defaultConfig { 11 | minSdkVersion project.ext.androidMinSdkVersion 12 | targetSdkVersion project.ext.androidTargetSdkVersion 13 | versionCode 32 14 | versionName "3.0.2" 15 | } 16 | 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | 24 | } 25 | 26 | dependencies { 27 | implementation fileTree(dir: 'libs', include: ['*.jar']) 28 | implementation project.ext.AppDependencies['appcompat'] 29 | implementation project.ext.AppDependencies['recyclerview'] 30 | } 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /PhotoCoverLib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /PhotoCoverLib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /PhotoCoverLib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | PhotoCoverLib 3 | 4 | -------------------------------------------------------------------------------- /ReadMeWiki/14.RecyclerView吸顶.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ReadMeWiki/15.自定义SpanSizeLookup.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ReadMeWiki/17.自定义LayoutManager.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ReadMeWiki/26.RecyclerView标签.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/ReadMeWiki/26.RecyclerView标签.md -------------------------------------------------------------------------------- /ReadMeWiki/29.DiffUtil优化.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | - https://mp.weixin.qq.com/s?__biz=MzAxMTI4MTkwNQ==&mid=2650822469&idx=1&sn=ac05e250bf8f9f0837658d4ac394c1cc&chksm=80b783dbb7c00acdf074f4657d09669cced595cddbd7121ed7670055cb683149853f7f6076a9&scene=38#wechat_redirect 20 | 21 | 22 | 23 | - https://mp.weixin.qq.com/s?__biz=MzAxMTI4MTkwNQ==&mid=2650821170&idx=1&sn=500ba9c6f208a11d129a21d1594363c4&chksm=80b786acb7c00fba95e4fc2bc687d649d50a9bca8d819e74e3bfdfd2dbc0d6abc832825b193d&scene=21#wechat_redirect 24 | 25 | 26 | 27 | 28 | - https://mp.weixin.qq.com/s?__biz=MzIxNjc0ODExMA==&mid=2247484612&idx=1&sn=5ab55bbee2d9bb15078f67b0205e1729&chksm=97851de5a0f294f3aa6ab9f0d05081ea7759685648636a0546dbea97058b59d917410b93d21b&scene=38#wechat_redirect 29 | 30 | 31 | 32 | - https://blog.csdn.net/zxt0601/article/details/52562770 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ReadMeWiki/30.RecyclerView快速索引.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | - https://mp.weixin.qq.com/s?__biz=MzA5MzI3NjE2MA==&mid=2650237585&idx=1&sn=1c4731105bd5f31ec3eec25f3194559d&chksm=88639bfebf1412e8e43107fe6892debbb9c04c73a2cf018f377ac37b71c36f61899b72188fac&scene=38#wechat_redirect 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ReadMeWiki/33.平滑滚动位置.md: -------------------------------------------------------------------------------- 1 | #### 目录介绍 2 | - 01.业务需求 3 | - 02.遇到的问题 4 | - 03.平滑滚动 5 | - 04.代码案例 6 | 7 | 8 | 9 | 10 | 11 | ### 04.代码案例 12 | - 代码如下所示: 13 | ``` 14 | public class CenterLayoutManager extends LinearLayoutManager { 15 | 16 | public CenterLayoutManager(Context context) { 17 | super(context); 18 | } 19 | 20 | public CenterLayoutManager(Context context, int orientation, boolean reverseLayout) { 21 | super(context, orientation, reverseLayout); 22 | } 23 | 24 | public CenterLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { 25 | super(context, attrs, defStyleAttr, defStyleRes); 26 | } 27 | 28 | @Override 29 | public void smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int position) { 30 | RecyclerView.SmoothScroller smoothScroller = new CenterSmoothScroller(recyclerView.getContext()); 31 | smoothScroller.setTargetPosition(position); 32 | startSmoothScroll(smoothScroller); 33 | } 34 | 35 | private class CenterSmoothScroller extends LinearSmoothScroller { 36 | 37 | CenterSmoothScroller(Context context) { 38 | super(context); 39 | } 40 | 41 | @Override 42 | public int calculateDtToFit(int viewStart, int viewEnd, int boxStart, int boxEnd, int snapPreference) { 43 | return (boxStart + (boxEnd - boxStart) / 2) - (viewStart + (viewEnd - viewStart) / 2); 44 | } 45 | 46 | /** 47 | * 返回滑动一个pixel需要多少毫秒,可以修改100f这个值来改变滑动速度 48 | * @param displayMetrics displayMetrics 49 | * @return 50 | */ 51 | @Override 52 | protected float calculateSpeedPerPixel(DisplayMetrics displayMetrics) { 53 | return 100f / displayMetrics.densityDpi; 54 | } 55 | } 56 | } 57 | ``` 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /RefreshViewLib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /RefreshViewLib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply from: rootProject.projectDir.absolutePath + "/AppGradle/app.gradle" 3 | apply plugin: 'com.github.dcendents.android-maven' 4 | 5 | android { 6 | compileSdkVersion project.ext.androidCompileSdkVersion 7 | //buildToolsVersion project.ext.androidBuildToolsVersion 8 | 9 | defaultConfig { 10 | minSdkVersion project.ext.androidMinSdkVersion 11 | targetSdkVersion project.ext.androidTargetSdkVersion 12 | versionCode 32 13 | versionName "3.0.2" 14 | } 15 | 16 | buildTypes { 17 | release { 18 | minifyEnabled false 19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 20 | } 21 | } 22 | 23 | } 24 | 25 | dependencies { 26 | implementation fileTree(dir: 'libs', include: ['*.jar']) 27 | implementation project.ext.AppDependencies['recyclerview'] 28 | implementation project.ext.AppDependencies['swiperefreshlayout'] 29 | } 30 | 31 | -------------------------------------------------------------------------------- /RefreshViewLib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/inter/InterEventDelegate.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package org.yczbj.ycrefreshviewlib.inter; 18 | 19 | import android.view.View; 20 | 21 | import org.yczbj.ycrefreshviewlib.adapter.RecyclerArrayAdapter; 22 | 23 | 24 | /** 25 | *
 26 |  *     @author 杨充
 27 |  *     blog  : https://github.com/yangchong211
 28 |  *     time  : 2016/4/28
 29 |  *     desc  : 数据处理和加载监听接口
 30 |  *     revise:
 31 |  * 
32 | */ 33 | public interface InterEventDelegate { 34 | 35 | /** 36 | * 添加数据 37 | * @param length 长度 38 | */ 39 | void addData(int length); 40 | 41 | /** 42 | * 清除数据 43 | */ 44 | void clear(); 45 | 46 | /** 47 | * 停止加载更多 48 | */ 49 | void stopLoadMore(); 50 | 51 | /** 52 | * 暂停加载更多 53 | */ 54 | void pauseLoadMore(); 55 | 56 | /** 57 | * 恢复加载更多 58 | */ 59 | void resumeLoadMore(); 60 | 61 | /** 62 | * 设置加载更多监听 63 | * @param view view 64 | * @param listener listener 65 | */ 66 | void setMore(View view, OnMoreListener listener); 67 | 68 | /** 69 | * 设置没有更多监听 70 | * @param view view 71 | * @param listener listener 72 | */ 73 | void setNoMore(View view, OnNoMoreListener listener); 74 | 75 | /** 76 | * 设置加载更多错误监听 77 | * @param view view 78 | * @param listener listener 79 | */ 80 | void setErrorMore(View view, OnErrorListener listener); 81 | 82 | /** 83 | * 设置加载更多监听 84 | * @param res res 85 | * @param listener listener 86 | */ 87 | void setMore(int res, OnMoreListener listener); 88 | 89 | /** 90 | * 设置没有更多监听 91 | * @param res res 92 | * @param listener listener 93 | */ 94 | void setNoMore(int res, OnNoMoreListener listener); 95 | 96 | /** 97 | * 设置加载更多错误监听 98 | * @param res res 99 | * @param listener listener 100 | */ 101 | void setErrorMore(int res, OnErrorListener listener); 102 | 103 | } 104 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/inter/InterItemView.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package org.yczbj.ycrefreshviewlib.inter; 18 | 19 | import android.view.View; 20 | import android.view.ViewGroup; 21 | /** 22 | *
23 |  *     @author yangchong
24 |  *     blog  : https://blog.csdn.net/m0_37700275/article/details/80863685
25 |  *     time  : 2017/4/22
26 |  *     desc  :
27 |  *     revise: 支持多种状态切换;支持上拉加载更多,下拉刷新;支持添加头部或底部view
28 |  * 
29 | */ 30 | public interface InterItemView { 31 | 32 | /** 33 | * 创建view 34 | * @param parent parent 35 | * @return view 36 | */ 37 | View onCreateView(ViewGroup parent); 38 | 39 | /** 40 | * 绑定view 41 | * @param headerView headerView 42 | */ 43 | void onBindView(View headerView); 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/inter/OnErrorListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package org.yczbj.ycrefreshviewlib.inter; 18 | 19 | /** 20 | *
21 |  *     @author yangchong
22 |  *     blog  : https://github.com/yangchong211
23 |  *     time  : 2017/3/13
24 |  *     desc  : 上拉加载更多异常监听
25 |  *     revise:
26 |  * 
27 | */ 28 | public interface OnErrorListener { 29 | 30 | /** 31 | * 上拉加载,加载更多数据异常展示,这个方法可以暂停或者停止加载数据 32 | */ 33 | void onErrorShow(); 34 | /** 35 | * 这个方法是点击加载更多数据异常展示布局的操作,比如恢复加载更多等等 36 | */ 37 | void onErrorClick(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/inter/OnItemChildClickListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package org.yczbj.ycrefreshviewlib.inter; 18 | 19 | import android.view.View; 20 | 21 | 22 | /** 23 | *
24 |  *     @author 杨充
25 |  *     blog  : https://github.com/yangchong211
26 |  *     time  : 2016/4/28
27 |  *     desc  : item中孩子点击监听接口
28 |  *     revise:
29 |  * 
30 | */ 31 | public interface OnItemChildClickListener { 32 | 33 | /** 34 | * item中孩子点击监听接口 35 | * @param view view 36 | * @param position position索引 37 | */ 38 | void onItemChildClick(View view, int position); 39 | } 40 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/inter/OnItemClickListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package org.yczbj.ycrefreshviewlib.inter; 18 | 19 | 20 | /** 21 | *
22 |  *     @author 杨充
23 |  *     blog  : https://github.com/yangchong211
24 |  *     time  : 2016/4/28
25 |  *     desc  : item中点击监听接口
26 |  *     revise:
27 |  * 
28 | */ 29 | public interface OnItemClickListener { 30 | /** 31 | * item中点击监听接口 32 | * @param position 索引 33 | */ 34 | void onItemClick(int position); 35 | } 36 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/inter/OnItemLongClickListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package org.yczbj.ycrefreshviewlib.inter; 18 | 19 | /** 20 | *
21 |  *     @author 杨充
22 |  *     blog  : https://github.com/yangchong211
23 |  *     time  : 2016/4/28
24 |  *     desc  : item中长按点击监听接口
25 |  *     revise:
26 |  * 
27 | */ 28 | public interface OnItemLongClickListener { 29 | /** 30 | * item中长按点击监听接口 31 | * @param position 索引 32 | * @return 33 | */ 34 | boolean onItemLongClick(int position); 35 | } 36 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/inter/OnLoadMoreListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package org.yczbj.ycrefreshviewlib.inter; 18 | 19 | /** 20 | *
21 |  *     @author yangchong
22 |  *     blog  : https://github.com/yangchong211
23 |  *     time  : 2017/3/13
24 |  *     desc  : 上拉加载更多监听
25 |  *     revise:
26 |  * 
27 | */ 28 | public interface OnLoadMoreListener { 29 | /** 30 | * 上拉加载更多操作 31 | */ 32 | void onLoadMore(); 33 | } 34 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/inter/OnMoreListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package org.yczbj.ycrefreshviewlib.inter; 18 | 19 | /** 20 | *
21 |  *     @author yangchong
22 |  *     blog  : https://github.com/yangchong211
23 |  *     time  : 2017/3/13
24 |  *     desc  : 上拉加载更多监听
25 |  *     revise:
26 |  * 
27 | */ 28 | public interface OnMoreListener { 29 | 30 | /** 31 | * 上拉加载更多操作 32 | */ 33 | void onMoreShow(); 34 | /** 35 | * 上拉加载更多操作,手动触发 36 | */ 37 | void onMoreClick(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/inter/OnNoMoreListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package org.yczbj.ycrefreshviewlib.inter; 18 | 19 | 20 | /** 21 | *
22 |  *     @author yangchong
23 |  *     blog  : https://github.com/yangchong211
24 |  *     time  : 2017/3/13
25 |  *     desc  : 上拉加载没有更多数据监听
26 |  *     revise:
27 |  * 
28 | */ 29 | public interface OnNoMoreListener { 30 | 31 | /** 32 | * 上拉加载,没有更多数据展示,这个方法可以暂停或者停止加载数据 33 | */ 34 | void onNoMoreShow(); 35 | 36 | /** 37 | * 这个方法是点击没有更多数据展示布局的操作,比如可以做吐司等等 38 | */ 39 | void onNoMoreClick(); 40 | 41 | } 42 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/observer/FixDataObserver.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package org.yczbj.ycrefreshviewlib.observer; 18 | 19 | import androidx.recyclerview.widget.RecyclerView; 20 | 21 | import org.yczbj.ycrefreshviewlib.adapter.RecyclerArrayAdapter; 22 | 23 | /** 24 | *
25 |  *     @author 杨充
26 |  *     blog  : https://github.com/yangchong211
27 |  *     time  : 2017/4/28
28 |  *     desc  : 自定义FixDataObserver
29 |  *     revise: 当插入数据的时候,需要
30 |  * 
31 | */ 32 | public class FixDataObserver extends RecyclerView.AdapterDataObserver { 33 | 34 | private RecyclerView recyclerView; 35 | public FixDataObserver(RecyclerView recyclerView) { 36 | this.recyclerView = recyclerView; 37 | } 38 | 39 | @Override 40 | public void onItemRangeInserted(int positionStart, int itemCount) { 41 | if (recyclerView.getAdapter() instanceof RecyclerArrayAdapter) { 42 | RecyclerArrayAdapter adapter = (RecyclerArrayAdapter) recyclerView.getAdapter(); 43 | //获取footer的数量 44 | int footerCount = adapter.getFooterCount(); 45 | //获取所有item的数量,包含header和footer 46 | int count = adapter.getCount(); 47 | //如果footer大于0,并且 48 | if (footerCount > 0 && count == itemCount) { 49 | recyclerView.scrollToPosition(0); 50 | } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/refresh/RefreshLayout.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package org.yczbj.ycrefreshviewlib.refresh; 18 | 19 | import android.content.Context; 20 | import android.util.AttributeSet; 21 | import android.view.ViewGroup; 22 | 23 | public class RefreshLayout extends ViewGroup { 24 | 25 | public RefreshLayout(Context context) { 26 | super(context); 27 | } 28 | 29 | public RefreshLayout(Context context, AttributeSet attrs) { 30 | super(context, attrs); 31 | } 32 | 33 | public RefreshLayout(Context context, AttributeSet attrs, int defStyleAttr) { 34 | super(context, attrs, defStyleAttr); 35 | } 36 | 37 | @Override 38 | protected void onLayout(boolean changed, int l, int t, int r, int b) { 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/span/GridSpanSizeLookup.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package org.yczbj.ycrefreshviewlib.span; 18 | 19 | import androidx.recyclerview.widget.GridLayoutManager; 20 | 21 | import org.yczbj.ycrefreshviewlib.inter.InterItemView; 22 | 23 | import java.util.ArrayList; 24 | import java.util.List; 25 | 26 | /** 27 | *
28 |  *     @author 杨充
29 |  *     blog  : https://github.com/yangchong211
30 |  *     time  : 2017/5/2
31 |  *     desc  : 自定义SpanSizeLookup
32 |  *     revise:
33 |  * 
34 | */ 35 | public class GridSpanSizeLookup extends GridLayoutManager.SpanSizeLookup{ 36 | 37 | private int mMaxCount; 38 | private ArrayList headers; 39 | private ArrayList footers; 40 | private List mObjects; 41 | 42 | 43 | public GridSpanSizeLookup(int maxCount, ArrayList headers, 44 | ArrayList footers, List objects){ 45 | this.mMaxCount = maxCount; 46 | this.headers = headers; 47 | this.footers = footers; 48 | this.mObjects = objects; 49 | } 50 | 51 | /** 52 | * 该方法的返回值就是指定position所占的列数 53 | * @param position 指定索引 54 | * @return 列数 55 | */ 56 | @Override 57 | public int getSpanSize(int position) { 58 | //如果有headerView,则 59 | if (headers.size()!=0){ 60 | if (position= 0) { 68 | return mMaxCount; 69 | } 70 | } 71 | return 1; 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/swipe/OnSwipeMenuListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package org.yczbj.ycrefreshviewlib.swipe; 18 | 19 | /** 20 | *
21 |  *     @author yangchong
22 |  *     blog  : https://github.com/yangchong211
23 |  *     time  : 2017/9/21
24 |  *     desc  : 侧滑删除和置顶监听事件
25 |  *     revise:
26 |  * 
27 | */ 28 | public interface OnSwipeMenuListener { 29 | 30 | /** 31 | * 点击侧滑删除 32 | * @param position 索引位置 33 | */ 34 | void toDelete(int position); 35 | 36 | /** 37 | * 点击置顶 38 | * @param position 索引位置 39 | */ 40 | void toTop(int position); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/utils/RecyclerUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package org.yczbj.ycrefreshviewlib.utils; 17 | 18 | 19 | import android.app.Application; 20 | import android.content.Context; 21 | 22 | /** 23 | *
24 |  *     @author yangchong
25 |  *     blog  : https://github.com/yangchong211
26 |  *     time  : 2017/4/22
27 |  *     desc  : 工具类
28 |  *     revise:
29 |  * 
30 | */ 31 | public final class RecyclerUtils { 32 | 33 | public static void checkContent(Context context){ 34 | if (context==null){ 35 | throw new NullPointerException("context is not null"); 36 | } 37 | if (context instanceof Application){ 38 | throw new UnsupportedOperationException("context is not application"); 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/utils/RefreshLogUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 yangchong211(github.com/yangchong211) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package org.yczbj.ycrefreshviewlib.utils; 17 | 18 | import android.util.Log; 19 | 20 | /** 21 | *
22 |  *     @author yangchong
23 |  *     blog  : https://blog.csdn.net/m0_37700275/article/details/80863685
24 |  *     time  : 2017/4/22
25 |  *     desc  : 日志工具类
26 |  *     revise: 支持多种状态切换;支持上拉加载更多,下拉刷新;支持添加头部或底部view
27 |  * 
28 | */ 29 | public final class RefreshLogUtils { 30 | 31 | private static final String TAG = "RefreshLogUtils"; 32 | private static boolean mIsLog = true; 33 | 34 | public static void setLog(boolean isLog){ 35 | mIsLog = isLog; 36 | } 37 | 38 | public static void d(String message) { 39 | if(mIsLog){ 40 | Log.d(TAG, message); 41 | } 42 | } 43 | 44 | public static void i(String message) { 45 | if(mIsLog){ 46 | Log.i(TAG, message); 47 | } 48 | 49 | } 50 | 51 | public static void e(String message) { 52 | if(mIsLog){ 53 | Log.e(TAG, message); 54 | } 55 | } 56 | 57 | public static void e(String message, Throwable throwable) { 58 | if(mIsLog){ 59 | Log.e(TAG, message, throwable); 60 | } 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/view/DiffCallBack.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshviewlib.view; 2 | 3 | import androidx.recyclerview.widget.DiffUtil; 4 | 5 | import java.util.List; 6 | 7 | public class DiffCallBack extends DiffUtil.Callback { 8 | 9 | /** 10 | * 分别是旧数据和新数据集合,这里使用泛型 11 | */ 12 | private List oldList , newList; 13 | 14 | public DiffCallBack(List oldList , List newList){ 15 | this.oldList = oldList; 16 | this.newList = newList; 17 | } 18 | 19 | /** 20 | * 获取旧数据的长度 21 | * @return 长度 22 | */ 23 | @Override 24 | public int getOldListSize() { 25 | return oldList!=null ? oldList.size() : 0; 26 | } 27 | 28 | /** 29 | * 获取新数据的长度 30 | * @return 长度 31 | */ 32 | @Override 33 | public int getNewListSize() { 34 | return newList!=null ? newList.size() : 0; 35 | } 36 | 37 | /** 38 | * 39 | * @param i i 40 | * @param i1 i 41 | * @return 42 | */ 43 | @Override 44 | public boolean areItemsTheSame(int i, int i1) { 45 | return false; 46 | } 47 | 48 | /** 49 | * 50 | * @param i 51 | * @param i1 52 | * @return 53 | */ 54 | @Override 55 | public boolean areContentsTheSame(int i, int i1) { 56 | return false; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/java/org/yczbj/ycrefreshviewlib/view/DiffItemCallBack.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshviewlib.view; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.recyclerview.widget.DiffUtil; 5 | 6 | public class DiffItemCallBack extends DiffUtil.ItemCallback { 7 | 8 | @Override 9 | public boolean areItemsTheSame(@NonNull T t, @NonNull T t1) { 10 | return false; 11 | } 12 | 13 | @Override 14 | public boolean areContentsTheSame(@NonNull T t, @NonNull T t1) { 15 | return false; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/res/layout/refresh_recyclerview.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | 13 | 20 | 21 | 22 | 28 | 29 | 30 | 36 | 37 | 38 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /RefreshViewLib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | YCRefreshViewLib 3 | 4 | -------------------------------------------------------------------------------- /SelectViewLib/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /SelectViewLib/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.library' 3 | } 4 | apply from: rootProject.projectDir.absolutePath + "/AppGradle/app.gradle" 5 | apply plugin: 'com.github.dcendents.android-maven' 6 | 7 | android { 8 | compileSdkVersion project.ext.androidCompileSdkVersion 9 | //buildToolsVersion project.ext.androidBuildToolsVersion 10 | 11 | defaultConfig { 12 | minSdkVersion project.ext.androidMinSdkVersion 13 | targetSdkVersion project.ext.androidTargetSdkVersion 14 | versionCode 32 15 | versionName "3.0.2" 16 | 17 | testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' 18 | 19 | } 20 | buildTypes { 21 | release { 22 | minifyEnabled false 23 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 24 | } 25 | } 26 | } 27 | 28 | dependencies { 29 | implementation fileTree(dir: 'libs', include: ['*.jar']) 30 | implementation project.ext.AppDependencies['appcompat'] 31 | implementation project.ext.AppDependencies['annotation'] 32 | implementation project.ext.AppDependencies['recyclerview'] 33 | } 34 | 35 | -------------------------------------------------------------------------------- /SelectViewLib/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/SelectViewLib/consumer-rules.pro -------------------------------------------------------------------------------- /SelectViewLib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /SelectViewLib/src/androidTest/java/com/yc/selectviewlib/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.yc.selectviewlib; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | assertEquals("com.yc.selectviewlib.test", appContext.getPackageName()); 25 | } 26 | } -------------------------------------------------------------------------------- /SelectViewLib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /SelectViewLib/src/main/java/com/yc/selectviewlib/FingerListener.java: -------------------------------------------------------------------------------- 1 | package com.yc.selectviewlib; 2 | 3 | public interface FingerListener { 4 | void onDragSelectFingerAction(boolean var1); 5 | } 6 | -------------------------------------------------------------------------------- /SelectViewLib/src/main/java/com/yc/selectviewlib/SelectionListener.java: -------------------------------------------------------------------------------- 1 | package com.yc.selectviewlib; 2 | 3 | public interface SelectionListener { 4 | void onDragSelectionChanged(int var1); 5 | } 6 | -------------------------------------------------------------------------------- /SelectViewLib/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SelectViewLib/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 56dp 4 | -------------------------------------------------------------------------------- /SelectViewLib/src/test/java/com/yc/selectviewlib/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.yc.selectviewlib; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /ShopCatLib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /ShopCatLib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 29 5 | buildToolsVersion "29.0.0" 6 | 7 | defaultConfig { 8 | minSdkVersion 17 9 | targetSdkVersion 29 10 | versionCode 1 11 | versionName "1.0" 12 | 13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 14 | 15 | } 16 | 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | 24 | } 25 | 26 | dependencies { 27 | implementation fileTree(dir: 'libs', include: ['*.jar']) 28 | implementation 'androidx.appcompat:appcompat:1.2.0' 29 | implementation 'androidx.recyclerview:recyclerview:1.1.0' 30 | } 31 | -------------------------------------------------------------------------------- /ShopCatLib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /ShopCatLib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /ShopCatLib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | YCShopCatLib 3 | 4 | -------------------------------------------------------------------------------- /SlideViewLib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /SlideViewLib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply from: rootProject.projectDir.absolutePath + "/AppGradle/app.gradle" 3 | apply plugin: 'com.github.dcendents.android-maven' 4 | 5 | android { 6 | compileSdkVersion project.ext.androidCompileSdkVersion 7 | //buildToolsVersion project.ext.androidBuildToolsVersion 8 | 9 | defaultConfig { 10 | minSdkVersion project.ext.androidMinSdkVersion 11 | targetSdkVersion project.ext.androidTargetSdkVersion 12 | versionCode 32 13 | versionName "3.0.2" 14 | testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' 15 | } 16 | buildTypes { 17 | release { 18 | minifyEnabled false 19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 20 | } 21 | } 22 | } 23 | 24 | dependencies { 25 | implementation fileTree(dir: 'libs', include: ['*.jar']) 26 | implementation project.ext.AppDependencies['appcompat'] 27 | implementation project.ext.AppDependencies['annotation'] 28 | implementation project.ext.AppDependencies['recyclerview'] 29 | } 30 | -------------------------------------------------------------------------------- /SlideViewLib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\PC\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /SlideViewLib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /SlideViewLib/src/main/java/com/yc/slideview/Slide.java: -------------------------------------------------------------------------------- 1 | package com.yc.slideview; 2 | 3 | /** 4 | * ================================================ 5 | * 作 者:杨充 6 | * 版 本:1.0 7 | * 创建日期:2017/7/3 8 | * 描 述:item侧滑 接口 9 | * 修订历史: 10 | * 项目地址:https://github.com/yangchong211/YCSlideView 11 | * ================================================ 12 | */ 13 | public interface Slide { 14 | 15 | void slideOpen(); 16 | void slideClose(); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /SlideViewLib/src/main/java/com/yc/slideview/SlideHelper.java: -------------------------------------------------------------------------------- 1 | package com.yc.slideview; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | /** 7 | * ================================================ 8 | * 作 者:杨充 9 | * 版 本:1.0 10 | * 创建日期:2017/7/3 11 | * 描 述:帮助类 12 | * 修订历史: 13 | * 项目地址:https://github.com/yangchong211/YCSlideView 14 | * ================================================ 15 | */ 16 | public class SlideHelper { 17 | 18 | private List mISlides = new ArrayList<>(); 19 | 20 | public void add(Slide iSlide) { 21 | mISlides.add(iSlide); 22 | } 23 | 24 | public void remove(Slide iSlide) { 25 | mISlides.remove(iSlide); 26 | } 27 | 28 | public void clear() { 29 | mISlides.clear(); 30 | } 31 | 32 | public List getISlideList() { 33 | return mISlides; 34 | } 35 | 36 | public void slideOpen() { 37 | for (Slide slide : mISlides) { 38 | slide.slideOpen(); 39 | } 40 | } 41 | 42 | public void slideClose() { 43 | for (Slide slide : mISlides) { 44 | slide.slideClose(); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /SlideViewLib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | YCSlideViewLib 3 | 4 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 29 5 | buildToolsVersion "29.0.0" 6 | defaultConfig { 7 | applicationId "org.yczbj.ycrefreshview" 8 | minSdkVersion 17 9 | targetSdkVersion 29 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | implementation fileTree(include: ['*.jar'], dir: 'libs') 24 | implementation 'com.google.android.material:material:1.0.0' 25 | implementation 'androidx.appcompat:appcompat:1.2.0' 26 | implementation 'androidx.annotation:annotation:1.1.0' 27 | implementation 'androidx.recyclerview:recyclerview:1.1.0' 28 | implementation 'jp.wasabeef:glide-transformations:1.3.1' 29 | implementation 'cn.yc:YCBannerLib:1.4.0' 30 | 31 | //recyclerView封装库 32 | implementation 'com.github.yangchong211.YCRefreshView:RefreshViewLib:3.0.2' 33 | //整体item侧滑库 34 | implementation 'com.github.yangchong211.YCRefreshView:SlideViewLib:3.0.2' 35 | //仿汽车之家画廊库 36 | implementation 'com.github.yangchong211.YCRefreshView:PhotoCoverLib:3.0.2' 37 | //标签多选单选库 38 | implementation 'com.github.yangchong211.YCRefreshView:SelectViewLib:3.0.2' 39 | //之前简单型adapter 40 | implementation 'com.github.yangchong211.YCRefreshView:EastAdapterLib:3.0.2' 41 | // implementation project(path: ':RefreshViewLib') 42 | // implementation project(path: ':SlideViewLib') 43 | // implementation project(path: ':PhotoCoverLib') 44 | // implementation project(path: ':SelectViewLib') 45 | implementation 'com.github.yangchong211:YCGroupAdapter:1.0.6' 46 | //glide 47 | implementation 'cn.yc:zoomImageLib:1.0.1' 48 | implementation 'com.github.bumptech.glide:glide:4.9.0' 49 | annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' 50 | } 51 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/app/BaseApp.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.app; 2 | 3 | import android.app.Application; 4 | 5 | import com.bumptech.glide.request.target.ViewTarget; 6 | 7 | import org.yczbj.ycrefreshview.R; 8 | 9 | public class BaseApp extends Application { 10 | 11 | private static Application application; 12 | 13 | public static Application getApp(){ 14 | if (application==null){ 15 | synchronized(BaseApp.class){ 16 | if (application==null){ 17 | application = new Application(); 18 | } 19 | } 20 | } 21 | return application; 22 | } 23 | 24 | @Override 25 | public void onCreate() { 26 | super.onCreate(); 27 | application = this; 28 | ViewTarget.setTagId(R.id.glide_tag); 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/app/Constant.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.app; 2 | 3 | 4 | import org.yczbj.ycrefreshview.R; 5 | 6 | /** 7 | * Description: 8 | * Update: 9 | * CreatedTime:2018/01/03 10 | * Author:yc 11 | */ 12 | 13 | public class Constant { 14 | 15 | 16 | public interface viewType{ 17 | int typeView = 0; //自定义 18 | int typeBanner = 1; //轮播图 19 | int typeGv = 2; //九宫格 20 | int typeTitle = 3; //标题 21 | int typeMore = 4; //更多 22 | int typeAd = 5; //广告 23 | int typeList2 = 6; //list2 24 | int typeAd2 = 7 ; //广告2 25 | int typeGv3 = 8; //list3 26 | int typeList4 = 9; //list4 27 | int typeGvBottom = 10; //九宫格 28 | int typeList5 = 11; //list4 29 | int typeRecycler = 12; //list4 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/app/SysUtils.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.app; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.content.res.AssetManager; 6 | import android.graphics.Color; 7 | import android.os.Build; 8 | import android.view.Display; 9 | import android.view.View; 10 | import android.view.Window; 11 | import android.view.WindowManager; 12 | 13 | import java.io.IOException; 14 | import java.lang.reflect.Field; 15 | 16 | public class SysUtils { 17 | 18 | public static int Dp2Px(Context context, float dp) { 19 | if (context==null){ 20 | //避免空指针异常 21 | context = BaseApp.getApp(); 22 | } 23 | final float scale = context.getResources().getDisplayMetrics().density; 24 | return (int) (dp * scale + 0.5f); 25 | } 26 | 27 | public static int getScreenWidth(Activity activity){ 28 | int width = 0; 29 | WindowManager windowManager = activity.getWindowManager(); 30 | Display display = windowManager.getDefaultDisplay(); 31 | width=display.getWidth(); 32 | return width; 33 | } 34 | 35 | 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/cover/ChildEntity.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.cover; 2 | 3 | /** 4 | * 子项数据的实体类 5 | */ 6 | public class ChildEntity { 7 | 8 | private String child; 9 | 10 | public ChildEntity(String child) { 11 | this.child = child; 12 | } 13 | 14 | public String getChild() { 15 | return child; 16 | } 17 | 18 | public void setChild(String child) { 19 | this.child = child; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/cover/CoverActivity.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.cover; 2 | 3 | import android.content.Intent; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import android.os.Bundle; 6 | import android.view.View; 7 | 8 | import org.yczbj.ycrefreshview.R; 9 | 10 | public class CoverActivity extends AppCompatActivity { 11 | 12 | @Override 13 | protected void onCreate(Bundle savedInstanceState) { 14 | super.onCreate(savedInstanceState); 15 | setContentView(R.layout.activity_cover); 16 | 17 | findViewById(R.id.tv_1).setOnClickListener(new View.OnClickListener() { 18 | @Override 19 | public void onClick(View v) { 20 | startActivity(new Intent(CoverActivity.this, CoverFirstActivity.class)); 21 | } 22 | }); 23 | findViewById(R.id.tv_2).setOnClickListener(new View.OnClickListener() { 24 | @Override 25 | public void onClick(View v) { 26 | startActivity(new Intent(CoverActivity.this, CoverSecondActivity.class)); 27 | } 28 | }); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/cover/GroupEntity.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.cover; 2 | 3 | import java.util.ArrayList; 4 | 5 | /** 6 | * 组数据的实体类 7 | */ 8 | public class GroupEntity { 9 | 10 | private String header; 11 | private String footer; 12 | private ArrayList children; 13 | private boolean isExpand; 14 | 15 | public GroupEntity(String header, String footer, ArrayList children) { 16 | this.header = header; 17 | this.footer = footer; 18 | this.children = children; 19 | } 20 | 21 | public GroupEntity(String header, String footer, ArrayList children, boolean isExpand) { 22 | this.header = header; 23 | this.footer = footer; 24 | this.children = children; 25 | this.isExpand = isExpand; 26 | } 27 | 28 | public String getHeader() { 29 | return header; 30 | } 31 | 32 | public void setHeader(String header) { 33 | this.header = header; 34 | } 35 | 36 | public String getFooter() { 37 | return footer; 38 | } 39 | 40 | public void setFooter(String footer) { 41 | this.footer = footer; 42 | } 43 | 44 | public ArrayList getChildren() { 45 | return children; 46 | } 47 | 48 | public void setChildren(ArrayList children) { 49 | this.children = children; 50 | } 51 | 52 | 53 | public boolean isExpand() { 54 | return isExpand; 55 | } 56 | 57 | public void setExpand(boolean expand) { 58 | isExpand = expand; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/cover/cover/CoverAdapter.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.cover.cover; 2 | 3 | import android.content.Context; 4 | import androidx.annotation.NonNull; 5 | import androidx.recyclerview.widget.RecyclerView; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.ImageView; 10 | 11 | import com.bumptech.glide.Glide; 12 | import com.bumptech.glide.load.engine.DiskCacheStrategy; 13 | 14 | import org.yczbj.ycrefreshview.R; 15 | 16 | import java.util.List; 17 | 18 | 19 | public class CoverAdapter extends RecyclerView.Adapter { 20 | 21 | private Context mContext; 22 | private List mPictureList; 23 | 24 | private onItemClick clickCb; 25 | 26 | public CoverAdapter(Context c) { 27 | mContext = c; 28 | } 29 | 30 | public CoverAdapter(Context c, onItemClick cb, List mPictureListt) { 31 | this.mPictureList = mPictureListt; 32 | mContext = c; 33 | clickCb = cb; 34 | } 35 | 36 | @Override 37 | public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 38 | View v = LayoutInflater.from(mContext).inflate(R.layout.item_gallery_image_view, parent, false); 39 | return new ViewHolder(v); 40 | } 41 | 42 | @Override 43 | public void onBindViewHolder(@NonNull ViewHolder holder, final int position) { 44 | if (position >= mPictureList.size()) { 45 | return; 46 | } 47 | Object item = mPictureList.get(position); 48 | if (item instanceof Integer || item instanceof String){ 49 | Glide.with(holder.img.getContext()) 50 | .asDrawable() 51 | //注意,这里拉取原始图片 52 | .diskCacheStrategy(DiskCacheStrategy.DATA) 53 | .load(item) 54 | .into(holder.img); 55 | } 56 | holder.img.setOnClickListener(new View.OnClickListener() { 57 | @Override 58 | public void onClick(View v) { 59 | if (clickCb != null) { 60 | clickCb.clickItem(position); 61 | } 62 | } 63 | }); 64 | } 65 | 66 | @Override 67 | public int getItemCount() { 68 | return mPictureList==null ? 0 : mPictureList.size(); 69 | } 70 | 71 | class ViewHolder extends RecyclerView.ViewHolder { 72 | ImageView img; 73 | ViewHolder(View itemView) { 74 | super(itemView); 75 | img = itemView.findViewById(R.id.iv_image); 76 | } 77 | } 78 | 79 | public interface onItemClick { 80 | void clickItem(int pos); 81 | } 82 | 83 | public void setOnClickLstn(onItemClick cb) { 84 | this.clickCb = cb; 85 | } 86 | 87 | 88 | } 89 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/cover/cover/CoverImageAdapter.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.cover.cover; 2 | 3 | import android.content.Context; 4 | import android.graphics.drawable.Drawable; 5 | import androidx.annotation.NonNull; 6 | import androidx.annotation.Nullable; 7 | import androidx.viewpager.widget.PagerAdapter; 8 | import android.view.View; 9 | import android.view.ViewGroup; 10 | 11 | import com.bumptech.glide.Glide; 12 | import com.bumptech.glide.load.engine.DiskCacheStrategy; 13 | import com.bumptech.glide.request.target.SimpleTarget; 14 | import com.bumptech.glide.request.transition.Transition; 15 | import com.ycbjie.zoomimagelib.view.ZoomImageView; 16 | import java.util.List; 17 | 18 | 19 | public class CoverImageAdapter extends PagerAdapter { 20 | 21 | private List imageUrls; 22 | private Context mContext; 23 | 24 | public CoverImageAdapter(List imageUrls, Context mContext) { 25 | this.imageUrls = imageUrls; 26 | this.mContext = mContext; 27 | } 28 | 29 | @NonNull 30 | @Override 31 | public Object instantiateItem(@NonNull ViewGroup container, int position) { 32 | Object image = imageUrls.get(position); 33 | final ZoomImageView photoView = new ZoomImageView(mContext); 34 | if (image instanceof Integer || image instanceof String){ 35 | Glide.with(photoView.getContext()) 36 | .asDrawable() 37 | //注意,这里拉取原始图片 38 | .diskCacheStrategy(DiskCacheStrategy.DATA) 39 | .load(image) 40 | .into(new SimpleTarget() { 41 | @Override 42 | public void onResourceReady(Drawable resource, @Nullable Transition transition) { 43 | if (resource!=null){ 44 | photoView.setImageDrawable(resource); 45 | } 46 | } 47 | 48 | @Override 49 | public void onLoadFailed(@Nullable Drawable errorDrawable) { 50 | super.onLoadFailed(errorDrawable); 51 | } 52 | }); 53 | } 54 | container.addView(photoView); 55 | return photoView; 56 | } 57 | 58 | @Override 59 | public int getCount() { 60 | return imageUrls != null ? imageUrls.size() : 0; 61 | } 62 | 63 | @Override 64 | public boolean isViewFromObject(@NonNull View view, @NonNull Object object) { 65 | return view == object; 66 | } 67 | 68 | @Override 69 | public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) { 70 | container.removeView((View) object); 71 | } 72 | 73 | @Override 74 | public int getItemPosition(@NonNull Object object) { 75 | return POSITION_NONE; 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/cover/cover/GalleryViewPager.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.cover.cover; 2 | 3 | import android.content.Context; 4 | import androidx.viewpager.widget.ViewPager; 5 | import android.util.AttributeSet; 6 | import android.view.MotionEvent; 7 | 8 | /** 9 | *
10 |  *     @author yangchong
11 |  *     blog  : https://github.com/yangchong211
12 |  *     time  : 2017/05/30
13 |  *     desc  : 自定义ViewPager
14 |  *     revise:
15 |  * 
16 | */ 17 | public class GalleryViewPager extends ViewPager { 18 | 19 | private boolean isLocked; 20 | public GalleryViewPager(Context context) { 21 | super(context); 22 | isLocked = false; 23 | } 24 | 25 | public GalleryViewPager(Context context, AttributeSet attrs) { 26 | super(context, attrs); 27 | isLocked = false; 28 | } 29 | 30 | @Override 31 | public boolean onInterceptTouchEvent(MotionEvent ev) { 32 | if(!isLocked) { 33 | try { 34 | return super.onInterceptTouchEvent(ev); 35 | } catch (IllegalArgumentException e) { 36 | e.printStackTrace(); 37 | return false; 38 | } 39 | } 40 | return false; 41 | } 42 | 43 | @Override 44 | public boolean onTouchEvent(MotionEvent ev) { 45 | return !isLocked && super.onTouchEvent(ev); 46 | } 47 | 48 | public void setLocked(boolean isLocked) { 49 | this.isLocked = isLocked; 50 | } 51 | 52 | public boolean isLocked() { 53 | return isLocked; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/data/AdData.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.data; 2 | 3 | 4 | public class AdData { 5 | 6 | private String image; 7 | private int drawable; 8 | 9 | public AdData(){} 10 | 11 | public String getImage() { 12 | return image; 13 | } 14 | 15 | public void setImage(String image) { 16 | this.image = image; 17 | } 18 | 19 | 20 | public int getDrawable() { 21 | return drawable; 22 | } 23 | 24 | public void setDrawable(int drawable) { 25 | this.drawable = drawable; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/data/AppUtils.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.data; 2 | 3 | import android.content.Context; 4 | import android.content.res.Resources; 5 | import android.util.DisplayMetrics; 6 | 7 | 8 | public class AppUtils { 9 | 10 | public static float convertDpToPixel(float dp, Context context){ 11 | Resources resources = context.getResources(); 12 | DisplayMetrics metrics = resources.getDisplayMetrics(); 13 | float px = dp * (metrics.densityDpi / 160f); 14 | return px; 15 | } 16 | 17 | public static float convertPixelsToDp(float px, Context context){ 18 | Resources resources = context.getResources(); 19 | DisplayMetrics metrics = resources.getDisplayMetrics(); 20 | float dp = px / (metrics.densityDpi / 160f); 21 | return dp; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/data/PersonData.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.data; 2 | 3 | 4 | public class PersonData { 5 | 6 | private String name; 7 | private int image; 8 | private String sign; 9 | 10 | public PersonData(){ 11 | 12 | } 13 | 14 | public String getName() { 15 | return name; 16 | } 17 | 18 | public void setName(String name) { 19 | this.name = name; 20 | } 21 | 22 | public String getSign() { 23 | return sign; 24 | } 25 | 26 | public void setSign(String sign) { 27 | this.sign = sign; 28 | } 29 | 30 | public int getImage() { 31 | return image; 32 | } 33 | 34 | public void setImage(int image) { 35 | this.image = image; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/data/PictureData.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.data; 2 | 3 | 4 | public class PictureData { 5 | 6 | private int width; 7 | private int height; 8 | private int image; 9 | 10 | 11 | public PictureData(int width, int height, int image) { 12 | this.width = width; 13 | this.height = height; 14 | this.image = image; 15 | } 16 | 17 | public int getWidth() { 18 | return width; 19 | } 20 | 21 | public void setWidth(int width) { 22 | this.width = width; 23 | } 24 | 25 | public int getHeight() { 26 | return height; 27 | } 28 | 29 | public void setHeight(int height) { 30 | this.height = height; 31 | } 32 | 33 | 34 | public int getImage() { 35 | return image; 36 | } 37 | 38 | public void setImage(int image) { 39 | this.image = image; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/header/BannerAdapter.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.header; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | import android.widget.ImageView; 7 | 8 | import com.bumptech.glide.Glide; 9 | import com.yc.cn.ycbannerlib.banner.adapter.AbsStaticPagerAdapter; 10 | 11 | 12 | import org.yczbj.ycrefreshview.data.DataProvider; 13 | import org.yczbj.ycrefreshview.R; 14 | import org.yczbj.ycrefreshview.data.AdData; 15 | 16 | import java.util.List; 17 | 18 | public class BannerAdapter extends AbsStaticPagerAdapter { 19 | 20 | private Context ctx; 21 | private List list; 22 | public BannerAdapter(Context ctx){ 23 | this.ctx = ctx; 24 | list = DataProvider.getAdList(); 25 | } 26 | 27 | @Override 28 | public View getView(ViewGroup container, final int position) { 29 | ImageView imageView = new ImageView(ctx); 30 | imageView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); 31 | imageView.setScaleType(ImageView.ScaleType.CENTER_CROP); 32 | //加载图片 33 | Glide.with(ctx) 34 | .load(list.get(position).getImage()) 35 | .placeholder(R.drawable.default_image) 36 | .into(imageView); 37 | //点击事件 38 | imageView.setOnClickListener(new View.OnClickListener() { 39 | @Override 40 | public void onClick(View v) { 41 | } 42 | }); 43 | return imageView; 44 | } 45 | 46 | @Override 47 | public int getCount() { 48 | return list.size(); 49 | } 50 | } -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/header/NarrowImageAdapter.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.header; 2 | 3 | import android.content.Context; 4 | import android.view.ViewGroup; 5 | import android.widget.ImageView; 6 | 7 | import org.yczbj.ycrefreshview.data.AppUtils; 8 | import org.yczbj.ycrefreshviewlib.adapter.RecyclerArrayAdapter; 9 | import org.yczbj.ycrefreshviewlib.holder.BaseViewHolder; 10 | 11 | 12 | public class NarrowImageAdapter extends RecyclerArrayAdapter { 13 | 14 | 15 | public NarrowImageAdapter(Context context) { 16 | super(context); 17 | } 18 | 19 | @Override 20 | public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { 21 | return new NarrowImageViewHolder(parent); 22 | } 23 | 24 | private static class NarrowImageViewHolder extends BaseViewHolder{ 25 | ImageView imgPicture; 26 | 27 | NarrowImageViewHolder(ViewGroup parent) { 28 | super(new ImageView(parent.getContext())); 29 | imgPicture = (ImageView) itemView; 30 | imgPicture.setLayoutParams(new ViewGroup.LayoutParams((int) 31 | AppUtils.convertDpToPixel(80.0f,getContext()), 32 | ViewGroup.LayoutParams.MATCH_PARENT)); 33 | imgPicture.setScaleType(ImageView.ScaleType.CENTER_CROP); 34 | } 35 | 36 | @Override 37 | public void setData(Integer data) { 38 | imgPicture.setImageResource(data); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/horizontal/FourHorizontalActivity.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.horizontal; 2 | 3 | import android.os.Bundle; 4 | import android.os.Handler; 5 | import androidx.annotation.Nullable; 6 | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; 7 | import androidx.appcompat.app.AppCompatActivity; 8 | import androidx.recyclerview.widget.LinearLayoutManager; 9 | 10 | import org.yczbj.ycrefreshview.data.DataProvider; 11 | import org.yczbj.ycrefreshview.R; 12 | import org.yczbj.ycrefreshview.data.AppUtils; 13 | import org.yczbj.ycrefreshviewlib.view.YCRefreshView; 14 | import org.yczbj.ycrefreshviewlib.inter.OnLoadMoreListener; 15 | import org.yczbj.ycrefreshviewlib.item.SpaceViewItemLine; 16 | 17 | 18 | public class FourHorizontalActivity extends AppCompatActivity { 19 | 20 | 21 | private YCRefreshView recyclerView; 22 | private NarrowImageAdapter adapter; 23 | private Handler handler = new Handler(); 24 | 25 | 26 | @Override 27 | protected void onDestroy() { 28 | super.onDestroy(); 29 | if (handler!=null){ 30 | handler.removeCallbacksAndMessages(null); 31 | handler = null; 32 | } 33 | } 34 | 35 | @Override 36 | protected void onCreate(@Nullable Bundle savedInstanceState) { 37 | super.onCreate(savedInstanceState); 38 | setContentView(R.layout.activity_horizontal); 39 | recyclerView = findViewById(R.id.recyclerView); 40 | recyclerView.setAdapter(adapter = new NarrowImageAdapter(this)); 41 | recyclerView.setLayoutManager(new LinearLayoutManager(this, 42 | LinearLayoutManager.HORIZONTAL,false)); 43 | recyclerView.addItemDecoration(new SpaceViewItemLine((int) 44 | AppUtils.convertDpToPixel(8,this))); 45 | adapter.setMore(R.layout.view_more_horizontal, new OnLoadMoreListener() { 46 | @Override 47 | public void onLoadMore() { 48 | handler.postDelayed(new Runnable() { 49 | @Override 50 | public void run() { 51 | adapter.addAll(DataProvider.getNarrowImage(0)); 52 | } 53 | },1000); 54 | } 55 | }); 56 | recyclerView.setRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { 57 | @Override 58 | public void onRefresh() { 59 | adapter.clear(); 60 | adapter.addAll(DataProvider.getNarrowImage(0)); 61 | } 62 | }); 63 | adapter.addAll(DataProvider.getNarrowImage(0)); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/horizontal/NarrowImageAdapter.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.horizontal; 2 | 3 | import android.content.Context; 4 | import android.view.ViewGroup; 5 | import android.widget.ImageView; 6 | 7 | import org.yczbj.ycrefreshview.data.AppUtils; 8 | import org.yczbj.ycrefreshviewlib.adapter.RecyclerArrayAdapter; 9 | import org.yczbj.ycrefreshviewlib.holder.BaseViewHolder; 10 | 11 | 12 | public class NarrowImageAdapter extends RecyclerArrayAdapter { 13 | public NarrowImageAdapter(Context context) { 14 | super(context); 15 | } 16 | 17 | @Override 18 | public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { 19 | return new NarrowImageViewHolder(parent); 20 | } 21 | 22 | private static class NarrowImageViewHolder extends BaseViewHolder{ 23 | ImageView imgPicture; 24 | 25 | public NarrowImageViewHolder(ViewGroup parent) { 26 | super(new ImageView(parent.getContext())); 27 | imgPicture = (ImageView) itemView; 28 | imgPicture.setLayoutParams(new ViewGroup.LayoutParams((int) AppUtils.convertDpToPixel(72f,getContext()), ViewGroup.LayoutParams.MATCH_PARENT)); 29 | imgPicture.setScaleType(ImageView.ScaleType.CENTER_CROP); 30 | } 31 | 32 | @Override 33 | public void setData(Integer data) { 34 | imgPicture.setImageResource(data); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/multistyle/FiveMultiStyleActivity.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.multistyle; 2 | 3 | import android.os.Bundle; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import androidx.recyclerview.widget.LinearLayoutManager; 6 | 7 | 8 | import com.yc.cn.ycbannerlib.LibUtils; 9 | 10 | import org.yczbj.ycrefreshview.data.DataProvider; 11 | import org.yczbj.ycrefreshview.R; 12 | import org.yczbj.ycrefreshviewlib.view.YCRefreshView; 13 | import org.yczbj.ycrefreshviewlib.item.DividerViewItemLine; 14 | 15 | 16 | public class FiveMultiStyleActivity extends AppCompatActivity { 17 | 18 | private YCRefreshView recyclerView; 19 | private PersonWithAdAdapter adapter; 20 | 21 | @Override 22 | protected void onCreate(Bundle savedInstanceState) { 23 | super.onCreate(savedInstanceState); 24 | setContentView(R.layout.activity_refresh_view); 25 | recyclerView = findViewById(R.id.recyclerView); 26 | recyclerView.setLayoutManager(new LinearLayoutManager(this)); 27 | recyclerView.setProgressView(R.layout.view_progress); 28 | DividerViewItemLine itemDecoration = new DividerViewItemLine( 29 | this.getResources().getColor(R.color.color_f9f9f9) 30 | , LibUtils.dip2px(this,0.5f), 31 | LibUtils.dip2px(this,72),0); 32 | recyclerView.addItemDecoration(itemDecoration); 33 | adapter = new PersonWithAdAdapter(this); 34 | adapter.addAll(DataProvider.getPersonWithAds(0)); 35 | recyclerView.setAdapterWithProgress(adapter); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/multistyle/PersonWithAdAdapter.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.multistyle; 2 | 3 | import android.content.Context; 4 | import android.view.ViewGroup; 5 | 6 | 7 | import org.yczbj.ycrefreshview.data.AdData; 8 | import org.yczbj.ycrefreshview.data.PersonData; 9 | import org.yczbj.ycrefreshview.refresh.PersonViewHolder; 10 | import org.yczbj.ycrefreshview.staggered.AdViewHolder; 11 | import org.yczbj.ycrefreshview.staggered.ImageViewHolder; 12 | import org.yczbj.ycrefreshviewlib.adapter.RecyclerArrayAdapter; 13 | import org.yczbj.ycrefreshviewlib.holder.BaseViewHolder; 14 | 15 | import java.security.InvalidParameterException; 16 | 17 | 18 | public class PersonWithAdAdapter extends RecyclerArrayAdapter { 19 | 20 | public static final int TYPE_INVALID = 0; 21 | public static final int TYPE_AD = 1; 22 | public static final int TYPE_PERSON = 2; 23 | public PersonWithAdAdapter(Context context) { 24 | super(context); 25 | } 26 | 27 | @Override 28 | public int getViewType(int position) { 29 | if(getItem(position) instanceof AdData){ 30 | return TYPE_AD; 31 | }else if (getItem(position) instanceof PersonData){ 32 | return TYPE_PERSON; 33 | } 34 | return TYPE_INVALID; 35 | } 36 | 37 | @Override 38 | public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { 39 | switch (viewType){ 40 | case TYPE_PERSON: 41 | return new PersonViewHolder(parent); 42 | case TYPE_AD: 43 | return new AdViewHolder(parent); 44 | case TYPE_INVALID: 45 | return new ImageViewHolder(parent); 46 | default: 47 | throw new InvalidParameterException(); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/normal/SpanModel.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.normal; 2 | 3 | public class SpanModel { 4 | 5 | private String name; 6 | private int type; 7 | 8 | public String getName() { 9 | return name; 10 | } 11 | 12 | public void setName(String name) { 13 | this.name = name; 14 | } 15 | 16 | public int getType() { 17 | return type; 18 | } 19 | 20 | public void setType(int type) { 21 | this.type = type; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/refresh/PersonAdapter.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.refresh; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.content.Context; 5 | import android.util.Log; 6 | import android.view.ViewGroup; 7 | import android.widget.ImageView; 8 | import android.widget.TextView; 9 | 10 | import com.bumptech.glide.Glide; 11 | 12 | import org.yczbj.ycrefreshview.R; 13 | import org.yczbj.ycrefreshview.data.PersonData; 14 | import org.yczbj.ycrefreshviewlib.holder.BaseViewHolder; 15 | import org.yczbj.ycrefreshviewlib.adapter.RecyclerArrayAdapter; 16 | 17 | 18 | public class PersonAdapter extends RecyclerArrayAdapter { 19 | 20 | private PersonViewHolder viewHolder; 21 | 22 | public PersonAdapter(Context context) { 23 | super(context); 24 | } 25 | 26 | @Override 27 | public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { 28 | viewHolder = new PersonViewHolder(parent); 29 | return viewHolder; 30 | } 31 | 32 | public PersonViewHolder getViewHolder() { 33 | return viewHolder; 34 | } 35 | 36 | public class PersonViewHolder extends BaseViewHolder { 37 | 38 | private TextView tv_title; 39 | private ImageView iv_news_image; 40 | private TextView tv_content; 41 | 42 | 43 | PersonViewHolder(ViewGroup parent) { 44 | super(parent, R.layout.item_news); 45 | iv_news_image = getView(R.id.iv_news_image); 46 | tv_title = getView(R.id.tv_title); 47 | tv_content = getView(R.id.tv_content); 48 | 49 | addOnClickListener(R.id.iv_news_image); 50 | addOnClickListener(R.id.tv_title); 51 | } 52 | 53 | @SuppressLint("SetTextI18n") 54 | @Override 55 | public void setData(final PersonData person){ 56 | Log.i("ViewHolder","position"+getDataPosition()); 57 | if (person.getName()==null || person.getName().length()==0){ 58 | tv_content.setText("小杨逗比"+getDataPosition()); 59 | }else { 60 | tv_title.setText(person.getName()); 61 | } 62 | if (person.getSign()==null || person.getSign().length()==0){ 63 | tv_content.setText("这个是内容"+getDataPosition()); 64 | }else { 65 | tv_content.setText(person.getSign()); 66 | } 67 | 68 | 69 | Glide.with(getContext()) 70 | .load(person.getImage()) 71 | .error(R.drawable.bg_small_tree_min) 72 | .placeholder(R.drawable.bg_small_tree_min) 73 | .into(iv_news_image); 74 | 75 | } 76 | } 77 | 78 | 79 | } 80 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/refresh/PersonViewHolder.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.refresh; 2 | 3 | import android.util.Log; 4 | import android.view.ViewGroup; 5 | import android.widget.Button; 6 | import android.widget.ImageView; 7 | import android.widget.TextView; 8 | 9 | import com.bumptech.glide.Glide; 10 | 11 | 12 | import org.yczbj.ycrefreshview.R; 13 | import org.yczbj.ycrefreshview.data.PersonData; 14 | import org.yczbj.ycrefreshviewlib.holder.BaseViewHolder; 15 | 16 | 17 | public class PersonViewHolder extends BaseViewHolder { 18 | 19 | private TextView tv_title; 20 | private ImageView iv_news_image; 21 | private TextView tv_content; 22 | private Button btn_del; 23 | private Button btn_top; 24 | 25 | 26 | public PersonViewHolder(ViewGroup parent) { 27 | super(parent, R.layout.item_news); 28 | iv_news_image = getView(R.id.iv_news_image); 29 | tv_title = getView(R.id.tv_title); 30 | tv_content = getView(R.id.tv_content); 31 | btn_del = getView(R.id.btn_del); 32 | btn_top = getView(R.id.btn_top); 33 | } 34 | 35 | @Override 36 | public void setData(final PersonData person){ 37 | Log.i("ViewHolder","position"+getDataPosition()); 38 | tv_title.setText(person.getName()); 39 | tv_content.setText(person.getSign()); 40 | Glide.with(getContext()) 41 | .load(person.getImage()) 42 | .error(R.drawable.bg_small_tree_min) 43 | .into(iv_news_image); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/scroll/ScrollActivity.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.scroll; 2 | 3 | import android.os.Bundle; 4 | import androidx.annotation.Nullable; 5 | import androidx.appcompat.app.AppCompatActivity; 6 | import androidx.recyclerview.widget.OrientationHelper; 7 | import androidx.recyclerview.widget.RecyclerView; 8 | 9 | import org.yczbj.ycrefreshview.R; 10 | import org.yczbj.ycrefreshview.data.DataProvider; 11 | import org.yczbj.ycrefreshview.scroll.inter.OnPagerListener; 12 | import org.yczbj.ycrefreshview.scroll.recycler.PagerLayoutManager; 13 | import org.yczbj.ycrefreshviewlib.utils.RefreshLogUtils; 14 | 15 | public class ScrollActivity extends AppCompatActivity { 16 | 17 | private RecyclerView recyclerView; 18 | 19 | @Override 20 | protected void onCreate(@Nullable Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | setContentView(R.layout.activity_recyclerview); 23 | recyclerView = findViewById(R.id.recyclerView); 24 | initRecyclerView(); 25 | } 26 | 27 | private void initRecyclerView() { 28 | PagerLayoutManager viewPagerLayoutManager = new PagerLayoutManager( 29 | this, OrientationHelper.VERTICAL); 30 | ScrollAdapter adapter = new ScrollAdapter(this); 31 | recyclerView.setAdapter(adapter); 32 | recyclerView.setLayoutManager(viewPagerLayoutManager); 33 | viewPagerLayoutManager.setOnViewPagerListener(new OnPagerListener() { 34 | @Override 35 | public void onInitComplete() { 36 | System.out.println("OnPagerListener---onInitComplete--"+"初始化完成"); 37 | RefreshLogUtils.d("OnPagerListener---onInitComplete--"+"初始化完成"); 38 | } 39 | 40 | @Override 41 | public void onPageRelease(boolean isNext, int position) { 42 | System.out.println("OnPagerListener---onPageRelease--"+position+"-----"+isNext); 43 | RefreshLogUtils.d("OnPagerListener---onPageRelease--"+position+"-----"+isNext); 44 | } 45 | 46 | @Override 47 | public void onPageSelected(int position, boolean isBottom) { 48 | System.out.println("OnPagerListener---onPageSelected--"+position+"-----"+isBottom); 49 | RefreshLogUtils.d("OnPagerListener---onPageSelected--"+position+"-----"+isBottom); 50 | } 51 | }); 52 | adapter.setData(DataProvider.getList(30)); 53 | } 54 | 55 | 56 | 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/scroll/ScrollAdapter.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.scroll; 2 | 3 | 4 | import android.content.Context; 5 | import androidx.annotation.NonNull; 6 | import androidx.recyclerview.widget.RecyclerView; 7 | 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | import android.widget.ImageView; 12 | 13 | import org.yczbj.ycrefreshview.R; 14 | import org.yczbj.ycrefreshview.data.PersonData; 15 | import org.yczbj.ycrefreshviewlib.inter.OnItemClickListener; 16 | 17 | import java.util.ArrayList; 18 | import java.util.List; 19 | 20 | 21 | public class ScrollAdapter extends RecyclerView.Adapter { 22 | 23 | 24 | private Context mContext; 25 | private OnItemClickListener listener; 26 | 27 | public ScrollAdapter(Context context) { 28 | this.mContext = context; 29 | } 30 | 31 | private List data = new ArrayList<>(); 32 | 33 | public void setData(List data) { 34 | this.data = data; 35 | notifyDataSetChanged(); 36 | } 37 | 38 | public List getData() { 39 | return data; 40 | } 41 | 42 | public void setOnClickListener(OnItemClickListener listener) { 43 | this.listener = listener; 44 | } 45 | 46 | @NonNull 47 | @Override 48 | public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 49 | View view = LayoutInflater.from(mContext).inflate(R.layout.item_image_pager, parent, false); 50 | return new MyViewHolder(view); 51 | } 52 | 53 | @Override 54 | public void onBindViewHolder(@NonNull MyViewHolder holder, int position) { 55 | holder.imageView.setBackgroundResource(data.get(position).getImage()); 56 | } 57 | 58 | 59 | class MyViewHolder extends RecyclerView.ViewHolder { 60 | 61 | ImageView imageView; 62 | 63 | MyViewHolder(final View itemView) { 64 | super(itemView); 65 | imageView = itemView.findViewById(R.id.iv_image); 66 | } 67 | 68 | } 69 | 70 | @Override 71 | public int getItemCount() { 72 | return data == null ? 0 : data.size(); 73 | } 74 | 75 | 76 | } 77 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/scroll/ScrollPagerActivity.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.scroll; 2 | 3 | import android.os.Bundle; 4 | import androidx.annotation.Nullable; 5 | import androidx.appcompat.app.AppCompatActivity; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.ImageView; 10 | 11 | import org.yczbj.ycrefreshview.R; 12 | import org.yczbj.ycrefreshview.data.DataProvider; 13 | import org.yczbj.ycrefreshview.data.PersonData; 14 | import org.yczbj.ycrefreshview.scroll.pager.LayoutViewPager; 15 | import org.yczbj.ycrefreshview.scroll.pager.AbsPagerAdapter; 16 | import org.yczbj.ycrefreshview.scroll.inter.OnPagerListener; 17 | 18 | import java.util.List; 19 | 20 | public class ScrollPagerActivity extends AppCompatActivity { 21 | 22 | private LayoutViewPager vp; 23 | 24 | @Override 25 | protected void onCreate(@Nullable Bundle savedInstanceState) { 26 | super.onCreate(savedInstanceState); 27 | setContentView(R.layout.activity_view_pager); 28 | vp = findViewById(R.id.vp); 29 | initViewPager(); 30 | } 31 | 32 | private void initViewPager() { 33 | List list = DataProvider.getList(30); 34 | vp.setOffscreenPageLimit(1); 35 | vp.setCurrentItem(0); 36 | BannerPagerAdapter adapter = new BannerPagerAdapter(list); 37 | vp.setAdapter(adapter); 38 | vp.setAnimationDuration(1000); 39 | vp.setOnViewPagerListener(new OnPagerListener() { 40 | @Override 41 | public void onInitComplete() { 42 | 43 | } 44 | 45 | @Override 46 | public void onPageRelease(boolean isNext, int position) { 47 | 48 | } 49 | 50 | @Override 51 | public void onPageSelected(int position, boolean isBottom) { 52 | 53 | } 54 | }); 55 | } 56 | 57 | class BannerPagerAdapter extends AbsPagerAdapter { 58 | 59 | private List data; 60 | 61 | public BannerPagerAdapter(List dataList) { 62 | super(dataList); 63 | this.data = dataList; 64 | } 65 | 66 | 67 | @Override 68 | public View getView(ViewGroup container, int position) { 69 | View view = LayoutInflater.from(container.getContext()).inflate( 70 | R.layout.item_image_pager, container, false); 71 | ImageView imageView = view.findViewById(R.id.iv_image); 72 | imageView.setImageResource(data.get(position).getImage()); 73 | return view; 74 | } 75 | 76 | @Override 77 | public int getCount() { 78 | return data.size(); 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/scroll/inter/OnPagerListener.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.scroll.inter; 2 | 3 | /** 4 | *
 5 |  *     @author yangchong
 6 |  *     blog  : https://github.com/yangchong211
 7 |  *     time  : 2019/7/23
 8 |  *     desc  : 自定义LinearLayoutManager
 9 |  *     revise:
10 |  * 
11 | */ 12 | public interface OnPagerListener { 13 | 14 | /** 15 | * 初始化完成 16 | */ 17 | void onInitComplete(); 18 | 19 | /** 20 | * 释放的监听 21 | * @param isNext 是否下一个,true表示下一个,false表示上一个 22 | * @param position 索引 23 | */ 24 | void onPageRelease(boolean isNext,int position); 25 | 26 | /*** 27 | * 选中的监听以及判断是否滑动到底部 28 | * @param position 索引 29 | * @param isBottom 是否到了底部 30 | */ 31 | void onPageSelected(int position , boolean isBottom); 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/scroll/pager/AbsPagerAdapter.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.scroll.pager; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.viewpager.widget.PagerAdapter; 5 | import android.util.SparseArray; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | 9 | import java.util.List; 10 | 11 | 12 | /** 13 | *
14 |  *     @author yangchong
15 |  *     blog  : https://github.com/yangchong211
16 |  *     time  : 2019/7/20
17 |  *     desc  : 动态管理的Adapter。
18 |  *             每次都会创建新view,销毁旧View。节省内存消耗性能
19 |  *     revise: 比如使用场景是启动引导页
20 |  * 
21 | */ 22 | public abstract class AbsPagerAdapter extends PagerAdapter { 23 | 24 | private List mDataList; 25 | private SparseArray mViewSparseArray; 26 | 27 | public AbsPagerAdapter(List dataList) { 28 | mDataList = dataList; 29 | mViewSparseArray = new SparseArray<>(dataList.size()); 30 | } 31 | 32 | @Override 33 | public int getCount() { 34 | if (mDataList == null) { 35 | return 0; 36 | } 37 | return mDataList.size(); 38 | } 39 | 40 | @Override 41 | public boolean isViewFromObject(@NonNull View view, @NonNull Object object) { 42 | return view == object; 43 | } 44 | 45 | @NonNull 46 | @Override 47 | public Object instantiateItem(@NonNull ViewGroup container, int position) { 48 | View view = mViewSparseArray.get(position); 49 | if (view == null) { 50 | view = getView(container,position); 51 | mViewSparseArray.put(position, view); 52 | } 53 | container.addView(view); 54 | return view; 55 | } 56 | 57 | @Override 58 | public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) { 59 | container.removeView(mViewSparseArray.get(position)); 60 | } 61 | 62 | /** 63 | * 子类重写的方法 64 | * @param container container 65 | * @param position 索引 66 | * @return 返回view 67 | */ 68 | public abstract View getView(ViewGroup container, int position); 69 | 70 | 71 | } 72 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/scroll/pager/BaseTransformer.java: -------------------------------------------------------------------------------- 1 | 2 | package org.yczbj.ycrefreshview.scroll.pager; 3 | 4 | import androidx.annotation.NonNull; 5 | import androidx.viewpager.widget.ViewPager.PageTransformer; 6 | import android.view.View; 7 | 8 | 9 | /** 10 | *
11 |  *     @author 杨充
12 |  *     blog  : https://github.com/yangchong211
13 |  *     time  : 2019/6/20
14 |  *     desc  : BaseTransformer
15 |  *     revise:
16 |  * 
17 | */ 18 | public abstract class BaseTransformer implements PageTransformer { 19 | 20 | 21 | /** 22 | * 子类实现 23 | * @param page view 24 | * @param position 索引 25 | */ 26 | protected abstract void onTransform(View page, float position); 27 | 28 | 29 | @Override 30 | public void transformPage(@NonNull View page, float position) { 31 | onPreTransform(page, position); 32 | onTransform(page, position); 33 | } 34 | 35 | protected boolean hideOffscreenPages() { 36 | return true; 37 | } 38 | 39 | 40 | protected boolean isPagingEnabled() { 41 | return false; 42 | } 43 | 44 | 45 | protected void onPreTransform(View page, float position) { 46 | final float width = page.getWidth(); 47 | 48 | page.setRotationX(0); 49 | page.setRotationY(0); 50 | page.setRotation(0); 51 | page.setScaleX(1); 52 | page.setScaleY(1); 53 | page.setPivotX(0); 54 | page.setPivotY(0); 55 | page.setTranslationY(0); 56 | page.setTranslationX(isPagingEnabled() ? 0f : -width * position); 57 | 58 | if (hideOffscreenPages()) { 59 | page.setAlpha(position <= -1f || position >= 1f ? 0f : 1f); 60 | } else { 61 | page.setAlpha(1f); 62 | } 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/scroll/pager/DefaultTransformer.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | package org.yczbj.ycrefreshview.scroll.pager; 4 | 5 | import android.view.View; 6 | 7 | public class DefaultTransformer extends BaseTransformer { 8 | 9 | /** 10 | * 参照:https://github.com/ToxicBakery/ViewPagerTransforms 11 | */ 12 | 13 | 14 | @Override 15 | protected void onTransform(View view, float position) { 16 | 17 | } 18 | 19 | @Override 20 | public boolean isPagingEnabled() { 21 | return true; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/select/SelectPoint.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.select; 2 | 3 | 4 | public class SelectPoint { 5 | 6 | private int id; 7 | private String name; 8 | private int index; 9 | private String logo; 10 | 11 | public int getId() { 12 | return id; 13 | } 14 | 15 | public void setId(int id) { 16 | this.id = id; 17 | } 18 | 19 | public String getName() { 20 | return name; 21 | } 22 | 23 | public void setName(String name) { 24 | this.name = name; 25 | } 26 | 27 | public int getIndex() { 28 | return index; 29 | } 30 | 31 | public void setIndex(int index) { 32 | this.index = index; 33 | } 34 | 35 | public String getLogo() { 36 | return logo; 37 | } 38 | 39 | public void setLogo(String logo) { 40 | this.logo = logo; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/slide/HhItemClickListener.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.slide; 2 | 3 | import android.view.View; 4 | 5 | 6 | public interface HhItemClickListener { 7 | void onItemClick(View view, int position); 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/slide/OnDeleteClickListener.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.slide; 2 | 3 | import android.view.View; 4 | import android.widget.TextView; 5 | 6 | /** 7 | * ================================================ 8 | * 作 者:杨充 9 | * 版 本:1.0 10 | * 创建日期:2017/7/3 11 | * 描 述:item侧滑后,点击删除接口 12 | * 修订历史: 13 | * ================================================ 14 | */ 15 | public interface OnDeleteClickListener { 16 | void onEditDeleteClick(View view, TextView textView, int position); 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/slide/YCBean.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.slide; 2 | 3 | /** 4 | * Created by PC on 2017/12/14. 5 | * 作者:PC 6 | */ 7 | 8 | public class YCBean { 9 | 10 | 11 | private String oid; 12 | private int id; 13 | private String status; 14 | private String logo; 15 | private String name; 16 | private String round; 17 | private String amt; 18 | private String currency; 19 | private String fname; 20 | 21 | public YCBean(String oid, int id, String status, String logo, String name, String round, String amt, String currency, String fname) { 22 | this.oid = oid; 23 | this.id = id; 24 | this.status = status; 25 | this.logo = logo; 26 | this.name = name; 27 | this.round = round; 28 | this.amt = amt; 29 | this.currency = currency; 30 | this.fname = fname; 31 | } 32 | 33 | public String getOid() { 34 | return oid; 35 | } 36 | 37 | public void setOid(String oid) { 38 | this.oid = oid; 39 | } 40 | 41 | public int getId() { 42 | return id; 43 | } 44 | 45 | public void setId(int id) { 46 | this.id = id; 47 | } 48 | 49 | public String getStatus() { 50 | return status; 51 | } 52 | 53 | public void setStatus(String status) { 54 | this.status = status; 55 | } 56 | 57 | public String getLogo() { 58 | return logo; 59 | } 60 | 61 | public void setLogo(String logo) { 62 | this.logo = logo; 63 | } 64 | 65 | public String getName() { 66 | return name; 67 | } 68 | 69 | public void setName(String name) { 70 | this.name = name; 71 | } 72 | 73 | public String getRound() { 74 | return round; 75 | } 76 | 77 | public void setRound(String round) { 78 | this.round = round; 79 | } 80 | 81 | public String getAmt() { 82 | return amt; 83 | } 84 | 85 | public void setAmt(String amt) { 86 | this.amt = amt; 87 | } 88 | 89 | public String getCurrency() { 90 | return currency; 91 | } 92 | 93 | public void setCurrency(String currency) { 94 | this.currency = currency; 95 | } 96 | 97 | public String getFname() { 98 | return fname; 99 | } 100 | 101 | public void setFname(String fname) { 102 | this.fname = fname; 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/staggered/AdViewHolder.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.staggered; 2 | 3 | import androidx.recyclerview.widget.RecyclerView; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | import android.widget.ImageView; 7 | 8 | import com.bumptech.glide.Glide; 9 | 10 | import org.yczbj.ycrefreshview.R; 11 | import org.yczbj.ycrefreshview.data.AppUtils; 12 | import org.yczbj.ycrefreshview.data.AdData; 13 | import org.yczbj.ycrefreshviewlib.holder.BaseViewHolder; 14 | 15 | 16 | public class AdViewHolder extends BaseViewHolder { 17 | public AdViewHolder(ViewGroup parent) { 18 | super(new ImageView(parent.getContext())); 19 | ImageView imageView = (ImageView) itemView; 20 | imageView.setLayoutParams(new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, (int) AppUtils.convertDpToPixel(156,getContext()))); 21 | imageView.setScaleType(ImageView.ScaleType.CENTER_CROP); 22 | } 23 | 24 | @Override 25 | public void setData(final AdData data) { 26 | ImageView imageView = (ImageView) itemView; 27 | Glide.with(getContext()) 28 | .load(data.getImage()) 29 | .placeholder(R.drawable.default_image) 30 | .into(imageView); 31 | imageView.setOnClickListener(new View.OnClickListener() { 32 | @Override 33 | public void onClick(View v) { 34 | } 35 | }); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/staggered/ImageAdapter.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.staggered; 2 | 3 | import android.content.Context; 4 | import android.view.ViewGroup; 5 | 6 | import org.yczbj.ycrefreshview.data.PictureData; 7 | import org.yczbj.ycrefreshviewlib.adapter.RecyclerArrayAdapter; 8 | import org.yczbj.ycrefreshviewlib.holder.BaseViewHolder; 9 | 10 | 11 | public class ImageAdapter extends RecyclerArrayAdapter { 12 | public ImageAdapter(Context context) { 13 | super(context); 14 | } 15 | 16 | @Override 17 | public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { 18 | return new ImageViewHolder(parent); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/staggered/ImageStageredAdapter.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.staggered; 2 | 3 | import android.content.Context; 4 | import android.view.ViewGroup; 5 | import android.widget.ImageView; 6 | 7 | import com.bumptech.glide.Glide; 8 | 9 | import org.yczbj.ycrefreshview.R; 10 | import org.yczbj.ycrefreshview.data.PictureData; 11 | import org.yczbj.ycrefreshviewlib.adapter.RecyclerArrayAdapter; 12 | import org.yczbj.ycrefreshviewlib.holder.BaseViewHolder; 13 | 14 | 15 | public class ImageStageredAdapter extends RecyclerArrayAdapter { 16 | public ImageStageredAdapter(Context context) { 17 | super(context); 18 | } 19 | 20 | @Override 21 | public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { 22 | return new ImageViewHolder(parent); 23 | } 24 | 25 | 26 | 27 | public class ImageViewHolder extends BaseViewHolder { 28 | ImageView imgPicture; 29 | 30 | public ImageViewHolder(ViewGroup parent) { 31 | super(new ImageView(parent.getContext())); 32 | imgPicture = (ImageView) itemView; 33 | imgPicture.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 34 | ViewGroup.LayoutParams.WRAP_CONTENT)); 35 | imgPicture.setScaleType(ImageView.ScaleType.CENTER_CROP); 36 | } 37 | 38 | @Override 39 | public void setData(PictureData data) { 40 | ViewGroup.LayoutParams params = imgPicture.getLayoutParams(); 41 | int setHeight = getAdapterPosition()%5; 42 | //计算View的高度 43 | int height = 300; 44 | switch (setHeight){ 45 | case 0: 46 | height = 500; 47 | break; 48 | case 1: 49 | height = 750; 50 | break; 51 | case 2: 52 | height = 880; 53 | break; 54 | case 3: 55 | height = 360; 56 | break; 57 | case 4: 58 | height = 660; 59 | break; 60 | default: 61 | break; 62 | } 63 | params.height = height; 64 | imgPicture.setLayoutParams(params); 65 | Glide.with(getContext()) 66 | .load(data.getImage()) 67 | .placeholder(R.drawable.bg_small_tree_min) 68 | .into(imgPicture); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/staggered/ImageViewHolder.java: -------------------------------------------------------------------------------- 1 | package org.yczbj.ycrefreshview.staggered; 2 | 3 | import android.view.ViewGroup; 4 | import android.widget.ImageView; 5 | 6 | import com.bumptech.glide.Glide; 7 | 8 | import org.yczbj.ycrefreshview.R; 9 | import org.yczbj.ycrefreshview.data.PictureData; 10 | import org.yczbj.ycrefreshviewlib.holder.BaseViewHolder; 11 | 12 | 13 | public class ImageViewHolder extends BaseViewHolder { 14 | ImageView imgPicture; 15 | 16 | public ImageViewHolder(ViewGroup parent) { 17 | super(new ImageView(parent.getContext())); 18 | imgPicture = (ImageView) itemView; 19 | imgPicture.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 20 | ViewGroup.LayoutParams.WRAP_CONTENT)); 21 | imgPicture.setScaleType(ImageView.ScaleType.CENTER_CROP); 22 | } 23 | 24 | @Override 25 | public void setData(PictureData data) { 26 | ViewGroup.LayoutParams params = imgPicture.getLayoutParams(); 27 | //计算View的高度 28 | int height = 300; 29 | params.height = height; 30 | imgPicture.setLayoutParams(params); 31 | imgPicture.setImageResource(data.getImage()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/sticky/StickyHeaderAdapter.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | package org.yczbj.ycrefreshview.sticky; 4 | 5 | import android.content.Context; 6 | import androidx.recyclerview.widget.RecyclerView; 7 | import android.util.Log; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | import android.widget.TextView; 12 | 13 | import org.yczbj.ycrefreshview.R; 14 | import org.yczbj.ycrefreshviewlib.item.StickyHeaderItemLine; 15 | 16 | 17 | /** 18 | * @author yc 19 | */ 20 | public class StickyHeaderAdapter implements 21 | StickyHeaderItemLine.IStickyHeaderAdapter { 22 | 23 | private LayoutInflater mInflater; 24 | 25 | public StickyHeaderAdapter(Context context) { 26 | mInflater = LayoutInflater.from(context); 27 | } 28 | 29 | @Override 30 | public long getHeaderId(int position) { 31 | Log.d("getHeaderId---",position+""); 32 | return position / 3; 33 | } 34 | 35 | @Override 36 | public HeaderHolder onCreateHeaderViewHolder(ViewGroup parent) { 37 | final View view = mInflater.inflate(R.layout.header_item, parent, false); 38 | return new HeaderHolder(view); 39 | } 40 | 41 | @Override 42 | public void onBindHeaderViewHolder(HeaderHolder viewholder, int position) { 43 | viewholder.header.setText("第"+getHeaderId(position)+"组"); 44 | Log.d("getHeaderId---","第"+getHeaderId(position)+"组"); 45 | } 46 | 47 | class HeaderHolder extends RecyclerView.ViewHolder { 48 | TextView header; 49 | HeaderHolder(View itemView) { 50 | super(itemView); 51 | header = (TextView) itemView; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/org/yczbj/ycrefreshview/sticky/StickyNormalAdapter.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | package org.yczbj.ycrefreshview.sticky; 4 | 5 | import android.content.Context; 6 | import androidx.recyclerview.widget.RecyclerView; 7 | import android.util.Log; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | import android.widget.TextView; 12 | 13 | import org.yczbj.ycrefreshview.R; 14 | 15 | 16 | /** 17 | * @author yc 18 | */ 19 | public class StickyNormalAdapter implements 20 | StickyNormalItemLine.IStickyHeaderAdapter { 21 | 22 | private LayoutInflater mInflater; 23 | 24 | public StickyNormalAdapter(Context context) { 25 | mInflater = LayoutInflater.from(context); 26 | } 27 | 28 | @Override 29 | public long getHeaderId(int position) { 30 | Log.d("getHeaderId---",position+""); 31 | return position / 3; 32 | } 33 | 34 | @Override 35 | public HeaderHolder onCreateHeaderViewHolder(ViewGroup parent) { 36 | final View view = mInflater.inflate(R.layout.header_item, parent, false); 37 | return new HeaderHolder(view); 38 | } 39 | 40 | @Override 41 | public void onBindHeaderViewHolder(HeaderHolder viewholder, int position) { 42 | viewholder.header.setText("第"+getHeaderId(position)+"组"); 43 | Log.d("getHeaderId---","第"+getHeaderId(position)+"组"); 44 | } 45 | 46 | 47 | class HeaderHolder extends RecyclerView.ViewHolder { 48 | TextView header; 49 | HeaderHolder(View itemView) { 50 | super(itemView); 51 | header = (TextView) itemView; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_autumn_tree_min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_autumn_tree_min.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_kites_min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_kites_min.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_lake_min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_lake_min.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_leaves_min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_leaves_min.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_magnolia_trees_min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_magnolia_trees_min.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_small_autumn_tree_min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_small_autumn_tree_min.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_small_kites_min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_small_kites_min.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_small_lake_min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_small_lake_min.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_small_leaves_min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_small_leaves_min.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_small_magnolia_trees_min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_small_magnolia_trees_min.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_small_solda_min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_small_solda_min.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_small_tree_min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_small_tree_min.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_small_tulip_min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_small_tulip_min.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_solda_min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/bg_solda_min.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/default_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/default_image.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/girl10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/girl10.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/girl11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/girl11.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/girl12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/girl12.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/girl13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/girl13.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/girl14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/girl14.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/girl2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/girl2.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/girl3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/girl3.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/girl4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/girl4.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/girl5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/girl5.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/girl6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/girl6.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/girl7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/girl7.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/girl9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/girl9.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/header.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/ic_add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/ic_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/ic_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/ic_remove.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/ic_top.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/star.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/view_icon_data_emtry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/view_icon_data_emtry.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/view_icon_data_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/view_icon_data_error.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/view_icon_network_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/view_icon_network_error.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/yy01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/yy01.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/yy02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/yy02.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/yy03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/yy03.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/yy04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/yy04.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/yy05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/yy05.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/yy06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/yy06.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/yy07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/yy07.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/yy08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/yy08.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/yy09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/drawable-xxhdpi/yy09.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_btn_color_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_btn_color_bg_press.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_btn_search_gray.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_collapsing.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 24 | 25 | 26 | 33 | 34 | 40 | 41 | 42 | 43 | 49 | 58 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_cover.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 19 | 20 | 21 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_cover_first.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_horizontal.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_recyclerview.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_refresh_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_select_follow.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 19 | 20 | 26 | 38 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_slide_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_sticky_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_view_pager.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/base_recycler_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/base_recyclerview.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 18 | 19 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/footer_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/header_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/header_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/include_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 15 | 16 | 23 | 24 | 31 | 32 | 40 | 41 | 51 | 61 | 62 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /app/src/main/res/layout/include_scroll_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/include_sticky_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_car_picture_footer.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_car_picture_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_car_picture_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_gallery_image_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_image_pager.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_news.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 17 | 18 | 26 | 27 | 37 | 47 | 48 | 58 | 59 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_news_content.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 19 | 20 | 31 | 41 | 42 | 52 | 53 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_news_second.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 25 | 26 | 36 | 46 | 47 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_tag.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/tag_select_follow.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_custom_data_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 22 | 23 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_custom_empty_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 21 | 22 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_custom_loading_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_custom_network_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 21 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_empty.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_more.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_more2.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_more_horizontal.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_nomore.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_progress_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_scroll_gallery.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_insert.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 11 | 17 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #f9f9f9 7 | #ff666666 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/glide_tag.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | YCRefreshView 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 13 | 19 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | jcenter() 8 | maven { 9 | url 'https://maven.google.com/' 10 | name 'Google' 11 | } 12 | maven { url 'https://jitpack.io' } 13 | } 14 | dependencies { 15 | classpath 'com.android.tools.build:gradle:3.2.1' 16 | //jitpack 17 | classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' 18 | } 19 | } 20 | 21 | allprojects { 22 | repositories { 23 | google() 24 | jcenter() 25 | maven { 26 | url 'https://maven.google.com/' 27 | name 'Google' 28 | } 29 | maven { url 'https://jitpack.io' } 30 | } 31 | } 32 | 33 | task clean(type: Delete) { 34 | delete rootProject.buildDir 35 | } 36 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | 19 | # 表示启用 20 | android.useAndroidX=true 21 | # 表示将依赖包迁移到androidx 。 22 | # 如果取值为false,表示不迁移依赖包到androidx,但在使用依赖包中的内容时可能会出现问题,如果项目中没有使用任何三方依赖,可以设置为false。 23 | androidxandroid.enableJetifier=true 24 | android.enableJetifier=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /image/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/1.jpg -------------------------------------------------------------------------------- /image/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/10.jpg -------------------------------------------------------------------------------- /image/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/11.jpg -------------------------------------------------------------------------------- /image/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/12.jpg -------------------------------------------------------------------------------- /image/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/2.jpg -------------------------------------------------------------------------------- /image/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/3.jpg -------------------------------------------------------------------------------- /image/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/4.jpg -------------------------------------------------------------------------------- /image/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/5.jpg -------------------------------------------------------------------------------- /image/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/6.jpg -------------------------------------------------------------------------------- /image/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/7.jpg -------------------------------------------------------------------------------- /image/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/8.jpg -------------------------------------------------------------------------------- /image/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/9.jpg -------------------------------------------------------------------------------- /image/gif1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/gif1.gif -------------------------------------------------------------------------------- /image/gif2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/gif2.gif -------------------------------------------------------------------------------- /image/gif3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/gif3.gif -------------------------------------------------------------------------------- /image/gif4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangchong211/YCRefreshView/f604d11d19ab1c242707c37f4f71ff65d0581544/image/gif4.gif -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':RefreshViewLib' 2 | include ':SlideViewLib' 3 | include ':PhotoCoverLib' 4 | include ':ShopCatLib' 5 | include ':SelectViewLib' 6 | include ':EastAdapterLib' 7 | --------------------------------------------------------------------------------