├── .github
└── FUNDING.yml
├── .gitignore
├── LICENSE
├── README.md
├── README_EN.md
├── app
├── .gitignore
├── build.gradle
├── debug.keystore
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── refresh
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── ic_launcher-web.png
│ ├── java
│ │ └── com
│ │ │ └── scwang
│ │ │ └── refresh
│ │ │ └── layout
│ │ │ ├── App.java
│ │ │ ├── activity
│ │ │ ├── FragmentActivity.java
│ │ │ ├── IndexMainActivity.java
│ │ │ ├── example
│ │ │ │ ├── AssignCodeExampleActivity.java
│ │ │ │ ├── AssignDefaultExampleActivity.java
│ │ │ │ ├── AssignXmlExampleActivity.java
│ │ │ │ ├── BasicExampleActivity.java
│ │ │ │ ├── CustomExampleActivity.java
│ │ │ │ ├── I18nExampleActivity.java
│ │ │ │ ├── ListenerExampleActivity.java
│ │ │ │ ├── NestedLayoutExampleActivity.java
│ │ │ │ ├── OverScrollExampleActivity.java
│ │ │ │ └── SnapHelperExampleActivity.java
│ │ │ ├── practice
│ │ │ │ ├── BannerPracticeActivity.java
│ │ │ │ ├── FeedListPracticeActivity.java
│ │ │ │ ├── ProfilePracticeActivity.java
│ │ │ │ ├── QQBrowserPracticeActivity.java
│ │ │ │ ├── RepastPracticeActivity.java
│ │ │ │ ├── WebViewPracticeActivity.java
│ │ │ │ └── WeiboPracticeActivity.java
│ │ │ └── style
│ │ │ │ ├── BezierCircleStyleActivity.java
│ │ │ │ ├── BezierRadarStyleActivity.java
│ │ │ │ ├── ClassicsStyleActivity.java
│ │ │ │ ├── DeliveryStyleActivity.java
│ │ │ │ ├── DropBoxStyleActivity.java
│ │ │ │ ├── FlyRefreshStyleActivity.java
│ │ │ │ ├── FunGameBattleCityStyleActivity.java
│ │ │ │ ├── FunGameHitBlockStyleActivity.java
│ │ │ │ ├── MaterialStyleActivity.java
│ │ │ │ ├── PhoenixStyleActivity.java
│ │ │ │ ├── StoreHouseStyleActivity.java
│ │ │ │ ├── TaurusStyleActivity.java
│ │ │ │ ├── WaterDropStyleActivity.java
│ │ │ │ └── WaveSwipeStyleActivity.java
│ │ │ ├── adapter
│ │ │ ├── BaseRecyclerAdapter.java
│ │ │ └── SmartViewHolder.java
│ │ │ ├── fragment
│ │ │ ├── example
│ │ │ │ ├── BottomSheetExampleFragment.java
│ │ │ │ ├── DisallowInterceptExampleFragment.java
│ │ │ │ ├── EmptyLayoutExampleFragment.java
│ │ │ │ ├── EmptyLayoutExampleFragmentInner.java
│ │ │ │ ├── EmptyLayoutExampleFragmentOuter.java
│ │ │ │ ├── FlexBoxLayoutManagerFragment.java
│ │ │ │ ├── HorizontalExampleFragment.java
│ │ │ │ ├── NestedScrollExampleFragment.java
│ │ │ │ ├── NestedScrollExampleFragmentIntegral.java
│ │ │ │ ├── NestedScrollExampleFragmentViewPager.java
│ │ │ │ ├── NoMoreDataExampleFragment.java
│ │ │ │ ├── PureScrollExampleFragment.java
│ │ │ │ ├── PureScrollExampleFragmentFooter.java
│ │ │ │ ├── PureScrollExampleFragmentHeader.java
│ │ │ │ ├── SpecifyStyleExampleFragment.java
│ │ │ │ ├── StaggeredGridExampleFragment.java
│ │ │ │ └── ViewPagerExampleFragment.java
│ │ │ ├── index
│ │ │ │ ├── RefreshExampleFragment.java
│ │ │ │ ├── RefreshPracticeFragment.java
│ │ │ │ └── RefreshStylesFragment.java
│ │ │ └── practice
│ │ │ │ ├── InstantPracticeFragment.java
│ │ │ │ ├── SecondFloorPracticeFragment.java
│ │ │ │ └── TwoLevelPracticeFragment.java
│ │ │ ├── util
│ │ │ ├── DynamicTimeFormat.java
│ │ │ └── StatusBarUtil.java
│ │ │ └── widget
│ │ │ ├── RefreshContentHorizontal.java
│ │ │ ├── ScrollBoundaryHorizontal.java
│ │ │ └── SmartRefreshHorizontal.java
│ └── res
│ │ ├── drawable
│ │ ├── animation_loading_frame.xml
│ │ ├── animation_loading_rotate.xml
│ │ ├── bc_background_panel.xml
│ │ ├── button_blue.xml
│ │ ├── ic_arrow_back_dark_24dp.xml
│ │ ├── ic_arrow_back_gray_24dp.xml
│ │ ├── ic_arrow_back_white_24dp.xml
│ │ ├── ic_chevron_right.xml
│ │ ├── ic_chevron_right_gray.xml
│ │ ├── ic_empty.xml
│ │ ├── ic_error.xml
│ │ ├── ic_feed_list_favorite.xml
│ │ ├── ic_feed_list_mail.xml
│ │ ├── ic_feed_list_photo.xml
│ │ ├── ic_fly_refresh_folder.xml
│ │ ├── ic_fly_refresh_info.xml
│ │ ├── ic_fly_refresh_phone.xml
│ │ ├── ic_fly_refresh_poll.xml
│ │ ├── ic_fly_refresh_send.xml
│ │ ├── ic_index_dashboard.xml
│ │ ├── ic_index_home.xml
│ │ ├── ic_index_notifications.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_list_divider.xml
│ │ ├── ic_progress_puzzle.xml
│ │ ├── skin_instantchat_more.xml
│ │ ├── skin_messages_left_bubble.xml
│ │ └── skin_messages_right_bubble.xml
│ │ ├── layout
│ │ ├── activity_example_assign_code.xml
│ │ ├── activity_example_assign_default.xml
│ │ ├── activity_example_assign_xml.xml
│ │ ├── activity_example_basic.xml
│ │ ├── activity_example_custom.xml
│ │ ├── activity_example_i18n.xml
│ │ ├── activity_example_listener.xml
│ │ ├── activity_example_overscroll.xml
│ │ ├── activity_example_region.xml
│ │ ├── activity_example_snaphelper.xml
│ │ ├── activity_experiment.xml
│ │ ├── activity_fly_refresh.xml
│ │ ├── activity_fly_refresh_item.xml
│ │ ├── activity_index_main.xml
│ │ ├── activity_practice_banner.xml
│ │ ├── activity_practice_feedlist.xml
│ │ ├── activity_practice_profile.xml
│ │ ├── activity_practice_qqbrowser.xml
│ │ ├── activity_practice_repast.xml
│ │ ├── activity_practice_webview.xml
│ │ ├── activity_practice_weibo.xml
│ │ ├── activity_style_bezier.xml
│ │ ├── activity_style_circle.xml
│ │ ├── activity_style_classics.xml
│ │ ├── activity_style_delivery.xml
│ │ ├── activity_style_dropbox.xml
│ │ ├── activity_style_fungame_battlecity.xml
│ │ ├── activity_style_fungame_hitblock.xml
│ │ ├── activity_style_material.xml
│ │ ├── activity_style_phoenix.xml
│ │ ├── activity_style_storehouse.xml
│ │ ├── activity_style_taurus.xml
│ │ ├── activity_style_water_drop.xml
│ │ ├── activity_style_wave_swipe.xml
│ │ ├── common_independence_recycler.xml
│ │ ├── common_loading.xml
│ │ ├── fragment_example_bottom_sheet.xml
│ │ ├── fragment_example_disallow_intercept.xml
│ │ ├── fragment_example_emptylayout.xml
│ │ ├── fragment_example_emptylayout_inner.xml
│ │ ├── fragment_example_emptylayout_outer.xml
│ │ ├── fragment_example_horizontal.xml
│ │ ├── fragment_example_nestedscroll.xml
│ │ ├── fragment_example_nestedscroll_integral.xml
│ │ ├── fragment_example_nestedscroll_view_pager.xml
│ │ ├── fragment_example_purescroll.xml
│ │ ├── fragment_example_purescroll_header.xml
│ │ ├── fragment_example_staggered_grid.xml
│ │ ├── fragment_example_viewpager.xml
│ │ ├── fragment_flexbox_layout_manager.xml
│ │ ├── fragment_no_more_data_example.xml
│ │ ├── fragment_practice_instant.xml
│ │ ├── fragment_practice_second_floor.xml
│ │ ├── fragment_practice_twolevel.xml
│ │ ├── fragment_refresh_example.xml
│ │ ├── fragment_refresh_practive.xml
│ │ ├── fragment_refresh_styles.xml
│ │ ├── item_example_snap_helper.xml
│ │ ├── item_movie_banner.xml
│ │ ├── item_movie_header.xml
│ │ ├── item_movie_item.xml
│ │ ├── item_practice_instant.xml
│ │ ├── item_practice_repast.xml
│ │ └── item_style_delivery.xml
│ │ ├── menu
│ │ └── navigation.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── gif_header_repast.gif
│ │ ├── ic_item1.jpg
│ │ ├── ic_item2.jpg
│ │ ├── ic_item3.jpg
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ ├── ic_launcher_round.png
│ │ ├── image_avatar_1.jpg
│ │ ├── image_avatar_2.jpg
│ │ ├── image_avatar_3.jpg
│ │ ├── image_avatar_4.jpg
│ │ ├── image_avatar_5.jpg
│ │ ├── image_avatar_6.jpg
│ │ ├── image_movie_header_12231501221682438.jpg
│ │ ├── image_movie_header_12981501221820220.jpg
│ │ ├── image_movie_header_48621499931969370.jpg
│ │ ├── image_practice_repast_1.jpg
│ │ ├── image_practice_repast_2.jpg
│ │ ├── image_practice_repast_3.jpg
│ │ ├── image_practice_repast_4.jpg
│ │ ├── image_practice_repast_5.jpg
│ │ ├── image_practice_repast_6.jpg
│ │ ├── skin_aio_more_normal.png
│ │ ├── skin_aio_more_pressed.png
│ │ ├── skin_common_btn_blue_disabled.9.png
│ │ ├── skin_messages_left_bubble.9.png
│ │ ├── skin_messages_left_bubble_highlighted.9.png
│ │ ├── skin_messages_right_bubble.9.png
│ │ └── skin_messages_right_bubble_highlighted.9.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ ├── ic_launcher_round.png
│ │ ├── image_second_floor.jpg
│ │ ├── image_second_floor_content.jpg
│ │ ├── image_taobao.jpg
│ │ ├── image_weibo_home_1.png
│ │ └── image_weibo_home_2.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── values-v19
│ │ └── styles.xml
│ │ ├── values-v21
│ │ └── styles.xml
│ │ ├── values-zh
│ │ ├── arrays.xml
│ │ ├── strings.xml
│ │ └── strings_srl.xml
│ │ └── values
│ │ ├── arrays.xml
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ ├── strings_srl.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── refresh
│ └── ExampleUnitTest.java
├── art
├── UMLRefreshLayout.classdiagram
├── app-debug.apk
├── dex-method-counts.jar
├── gif_BattleCity.gif
├── gif_BattleCity_1.gif
├── gif_BezierCircle.gif
├── gif_BezierRadar.gif
├── gif_Classics.gif
├── gif_Delivery.gif
├── gif_Dropbox.gif
├── gif_FlyRefresh.gif
├── gif_HitBlock.gif
├── gif_HitBlock_1.gif
├── gif_Material.gif
├── gif_Phoenix.gif
├── gif_StoreHouse.gif
├── gif_Taurus.gif
├── gif_WaterDrop.gif
├── gif_WaveSwipe.gif
├── gif_demo_multitouch_1.gif
├── gif_demo_multitouch_2.gif
├── gif_practive_feedlist.gif
├── gif_practive_feedlist_1.gif
├── gif_practive_profile.gif
├── gif_practive_profile_1.gif
├── gif_practive_repast.gif
├── gif_practive_repast_1.gif
├── gif_practive_smart.gif
├── gif_practive_weibo.gif
├── gif_practive_weibo_1.gif
├── gif_preview_textheader.gif
├── jpg_preview_gifheader.jpg
├── jpg_preview_textheader.jpg
├── jpg_preview_xml_define.jpg
├── jpg_uml.jpg
├── md_custom.md
├── md_donationlist.md
├── md_faq.md
├── md_multitouch.md
├── md_property.md
├── md_smart.md
├── md_update.md
├── pay_alipay.jpg
├── pay_alipay_red_packet.png
├── pay_tencent.jpg
├── pay_wxpay.jpg
├── png_apk_rqcode.png
├── png_ptr_elema.png
├── png_ptr_meituan.png
└── png_ptr_tianmao.png
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── method-count-layout.bat
├── method-count-words.bat
├── refresh-drawable-paint
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── drawable
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── drawable
│ │ ├── PaintDrawable.java
│ │ └── ProgressDrawable.java
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── smart
│ └── drawable
│ └── ExampleUnitTest.java
├── refresh-drawable-path
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── drawable
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── drawable
│ │ ├── PathsDrawable.java
│ │ ├── path
│ │ └── PathParser.java
│ │ └── view
│ │ └── PathsView.java
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── smart
│ └── drawable
│ └── ExampleUnitTest.java
├── refresh-footer-ball
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── refresh
│ │ └── footer
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── scwang
│ │ │ └── smart
│ │ │ └── refresh
│ │ │ └── footer
│ │ │ └── BallPulseFooter.java
│ └── res
│ │ └── values
│ │ └── attrs.xml
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── smart
│ └── refresh
│ └── footer
│ └── ExampleUnitTest.java
├── refresh-footer-classics
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── refresh
│ │ └── footer
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── scwang
│ │ │ └── smart
│ │ │ └── refresh
│ │ │ ├── classics
│ │ │ ├── ArrowDrawable.java
│ │ │ └── ClassicsAbstract.java
│ │ │ └── footer
│ │ │ └── ClassicsFooter.java
│ └── res
│ │ ├── layout
│ │ └── srl_classics_footer.xml
│ │ ├── values-zh
│ │ └── strings.xml
│ │ └── values
│ │ ├── attrs.xml
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── smart
│ └── refresh
│ └── footer
│ └── ExampleUnitTest.java
├── refresh-footer
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── refresh
│ │ └── footer
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ └── res
│ │ └── values
│ │ ├── attrs.xml
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── smartrefresh
│ └── footer
│ └── ExampleUnitTest.java
├── refresh-header-classics
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── refresh
│ │ └── header
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── scwang
│ │ │ └── smart
│ │ │ └── refresh
│ │ │ └── header
│ │ │ └── ClassicsHeader.java
│ └── res
│ │ ├── layout
│ │ └── srl_classics_header.xml
│ │ ├── values-zh
│ │ └── strings.xml
│ │ └── values
│ │ ├── attrs.xml
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── smart
│ └── refresh
│ └── header
│ └── ExampleUnitTest.java
├── refresh-header-falsify
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── refresh
│ │ └── header
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── scwang
│ │ │ └── smart
│ │ │ └── refresh
│ │ │ └── header
│ │ │ ├── FalsifyFooter.java
│ │ │ ├── FalsifyHeader.java
│ │ │ └── falsify
│ │ │ └── FalsifyAbstract.java
│ └── res
│ │ ├── values-zh
│ │ └── strings.xml
│ │ └── values
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── smart
│ └── refresh
│ └── header
│ └── ExampleUnitTest.java
├── refresh-header-material
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── refresh
│ │ └── header
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── scwang
│ │ │ └── smart
│ │ │ └── refresh
│ │ │ └── header
│ │ │ ├── MaterialHeader.java
│ │ │ └── material
│ │ │ ├── CircleImageView.java
│ │ │ └── MaterialProgressDrawable.java
│ └── res
│ │ └── values
│ │ └── attrs.xml
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── smart
│ └── refresh
│ └── header
│ └── ExampleUnitTest.java
├── refresh-header-radar
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── refresh
│ │ └── header
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── scwang
│ │ │ └── smart
│ │ │ └── refresh
│ │ │ └── header
│ │ │ └── BezierRadarHeader.java
│ └── res
│ │ └── values
│ │ └── attrs.xml
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── smart
│ └── refresh
│ └── header
│ └── ExampleUnitTest.java
├── refresh-header-two-level
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── refresh
│ │ └── header
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── scwang
│ │ │ └── smart
│ │ │ └── refresh
│ │ │ └── header
│ │ │ ├── TwoLevelHeader.java
│ │ │ └── listener
│ │ │ └── OnTwoLevelListener.java
│ └── res
│ │ └── values
│ │ └── attrs.xml
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── smart
│ └── refresh
│ └── header
│ └── ExampleUnitTest.java
├── refresh-header
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smartrefresh
│ │ └── header
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── scwang
│ │ │ └── smart
│ │ │ └── refresh
│ │ │ └── header
│ │ │ ├── BezierCircleHeader.java
│ │ │ ├── DeliveryHeader.java
│ │ │ ├── DropBoxHeader.java
│ │ │ ├── FlyRefreshHeader.java
│ │ │ ├── FunGameBattleCityHeader.java
│ │ │ ├── FunGameHitBlockHeader.java
│ │ │ ├── PhoenixHeader.java
│ │ │ ├── StoreHouseHeader.java
│ │ │ ├── TaurusHeader.java
│ │ │ ├── WaterDropHeader.java
│ │ │ ├── WaveSwipeHeader.java
│ │ │ ├── flyrefresh
│ │ │ ├── FlyView.java
│ │ │ └── MountainSceneView.java
│ │ │ ├── fungame
│ │ │ ├── FunGameBase.java
│ │ │ └── FunGameView.java
│ │ │ ├── storehouse
│ │ │ ├── StoreHouseBarItem.java
│ │ │ └── StoreHousePath.java
│ │ │ ├── waterdrop
│ │ │ ├── Circle.java
│ │ │ └── WaterDropView.java
│ │ │ └── waveswipe
│ │ │ ├── DropBounceInterpolator.java
│ │ │ └── WaveView.java
│ └── res
│ │ ├── values-zh
│ │ └── strings.xml
│ │ └── values
│ │ ├── attrs.xml
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── smartrefresh
│ └── header
│ └── ExampleUnitTest.java
├── refresh-layout-kernel
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── refresh
│ │ └── layout
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── scwang
│ │ │ └── smart
│ │ │ └── refresh
│ │ │ └── layout
│ │ │ ├── SmartRefreshLayout.java
│ │ │ ├── api
│ │ │ ├── RefreshComponent.java
│ │ │ ├── RefreshContent.java
│ │ │ ├── RefreshFooter.java
│ │ │ ├── RefreshHeader.java
│ │ │ ├── RefreshKernel.java
│ │ │ └── RefreshLayout.java
│ │ │ ├── constant
│ │ │ ├── DimensionStatus.java
│ │ │ ├── RefreshState.java
│ │ │ └── SpinnerStyle.java
│ │ │ ├── listener
│ │ │ ├── CoordinatorLayoutListener.java
│ │ │ ├── DefaultRefreshFooterCreator.java
│ │ │ ├── DefaultRefreshHeaderCreator.java
│ │ │ ├── DefaultRefreshInitializer.java
│ │ │ ├── OnLoadMoreListener.java
│ │ │ ├── OnMultiListener.java
│ │ │ ├── OnRefreshListener.java
│ │ │ ├── OnRefreshLoadMoreListener.java
│ │ │ ├── OnStateChangedListener.java
│ │ │ └── ScrollBoundaryDecider.java
│ │ │ ├── simple
│ │ │ ├── SimpleBoundaryDecider.java
│ │ │ ├── SimpleComponent.java
│ │ │ └── SimpleMultiListener.java
│ │ │ ├── util
│ │ │ ├── DesignUtil.java
│ │ │ └── SmartUtil.java
│ │ │ └── wrapper
│ │ │ ├── RefreshContentWrapper.java
│ │ │ ├── RefreshFooterWrapper.java
│ │ │ └── RefreshHeaderWrapper.java
│ └── res
│ │ ├── values-zh
│ │ └── strings.xml
│ │ └── values
│ │ ├── attrs.xml
│ │ ├── ids.xml
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── smart
│ └── refresh
│ └── layout
│ └── ExampleUnitTest.java
├── refresh-layout
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── scwang
│ │ └── smart
│ │ └── refresh
│ │ └── layout
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ └── AndroidManifest.xml
│ └── test
│ └── java
│ └── com
│ └── scwang
│ └── smart
│ └── refresh
│ └── layout
│ └── ExampleUnitTest.java
├── secret-rsa.gpg
└── settings.gradle
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | custom: https://www.paypal.me/scwang90
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | *.txt
3 | .*
4 | repo
5 | release
6 | build
7 | /local.properties
8 | /bintrayUpload-key.bat
9 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/debug.keystore
--------------------------------------------------------------------------------
/app/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 E:\Android\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 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
27 | #app混淆标记
28 | -keep class com.github.mmin18.** {*;}
29 |
30 | -dontwarn android.support.v8.renderscript.*
31 | -keepclassmembers class android.support.v8.renderscript.RenderScript {
32 | native *** rsn*(...);
33 | native *** n*(...);
34 | }
35 |
36 | -keep class com.wang.avi.** { *; }
37 | -keep class com.wang.avi.indicators.** { *; }
38 |
39 | -keep class com.scwang.refresh.activity.practice.BannerPracticeActivity$Movie {*;}
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/scwang/refresh/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.refresh;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
12 |
13 | /**
14 | * Instrumentation 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 |
25 | assertEquals("com.scwang.refresh.layout", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/app/src/main/java/com/scwang/refresh/layout/activity/example/OverScrollExampleActivity.java:
--------------------------------------------------------------------------------
1 | package com.scwang.refresh.layout.activity.example;
2 |
3 | import android.os.Bundle;
4 | import android.webkit.WebView;
5 | import android.webkit.WebViewClient;
6 |
7 | import androidx.appcompat.app.AppCompatActivity;
8 | import androidx.appcompat.widget.Toolbar;
9 |
10 | import com.scwang.refresh.layout.R;
11 | import com.scwang.smart.refresh.layout.api.RefreshLayout;
12 | import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
13 |
14 | /**
15 | * 越界回弹使用演示
16 | */
17 | public class OverScrollExampleActivity extends AppCompatActivity {
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | setContentView(R.layout.activity_example_overscroll);
23 |
24 | final Toolbar toolbar = findViewById(R.id.toolbar);
25 | toolbar.setNavigationOnClickListener(v -> finish());
26 |
27 | final WebView webView = findViewById(R.id.webView);
28 | final RefreshLayout refreshLayout = findViewById(R.id.refreshLayout);
29 | refreshLayout.setOnRefreshListener((OnRefreshListener) refreshLayout1 -> webView.loadUrl("http://github.com"));
30 | refreshLayout.autoRefresh();
31 |
32 |
33 | webView.setWebViewClient(new WebViewClient(){
34 | @Override
35 | public boolean shouldOverrideUrlLoading(WebView view, String url) {
36 | view.loadUrl(url);
37 | return true;
38 | }
39 |
40 | @Override
41 | public void onPageCommitVisible(WebView view, String url) {
42 | refreshLayout.finishRefresh();
43 | }
44 | });
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/scwang/refresh/layout/activity/practice/FeedListPracticeActivity.java:
--------------------------------------------------------------------------------
1 | package com.scwang.refresh.layout.activity.practice;
2 |
3 | import android.os.Bundle;
4 |
5 | import androidx.appcompat.app.AppCompatActivity;
6 | import androidx.appcompat.widget.Toolbar;
7 |
8 | import com.scwang.refresh.layout.R;
9 | import com.scwang.smart.refresh.layout.api.RefreshLayout;
10 |
11 | /**
12 | * 微博列表
13 | */
14 | public class FeedListPracticeActivity extends AppCompatActivity {
15 |
16 | private static boolean isFirstEnter = true;
17 |
18 | @Override
19 | protected void onCreate(Bundle savedInstanceState) {
20 | super.onCreate(savedInstanceState);
21 | setContentView(R.layout.activity_practice_feedlist);
22 |
23 | final Toolbar toolbar = findViewById(R.id.toolbar);
24 | toolbar.setNavigationOnClickListener(v -> finish());
25 |
26 | final RefreshLayout refreshLayout = findViewById(R.id.refreshLayout);
27 | if (isFirstEnter) {
28 | isFirstEnter = false;
29 | refreshLayout.autoRefresh();
30 | }
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/scwang/refresh/layout/activity/practice/ProfilePracticeActivity.java:
--------------------------------------------------------------------------------
1 | package com.scwang.refresh.layout.activity.practice;
2 |
3 | import android.os.Bundle;
4 |
5 | import androidx.appcompat.app.AppCompatActivity;
6 | import androidx.appcompat.widget.Toolbar;
7 |
8 | import com.scwang.refresh.layout.R;
9 | import com.scwang.refresh.layout.util.StatusBarUtil;
10 |
11 | /**
12 | * 个人中心
13 | */
14 | public class ProfilePracticeActivity extends AppCompatActivity {
15 |
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | setContentView(R.layout.activity_practice_profile);
20 |
21 | final Toolbar toolbar = findViewById(R.id.toolbar);
22 | toolbar.setNavigationOnClickListener(v -> finish());
23 |
24 | //状态栏透明和间距处理
25 | StatusBarUtil.immersive(this);
26 | StatusBarUtil.setPaddingSmart(this, toolbar);
27 | StatusBarUtil.setPaddingSmart(this, findViewById(R.id.profile));
28 | StatusBarUtil.setPaddingSmart(this, findViewById(R.id.blurView));
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/scwang/refresh/layout/activity/practice/QQBrowserPracticeActivity.java:
--------------------------------------------------------------------------------
1 | package com.scwang.refresh.layout.activity.practice;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.os.Bundle;
5 | import android.webkit.WebView;
6 | import android.webkit.WebViewClient;
7 |
8 | import androidx.appcompat.app.AppCompatActivity;
9 | import androidx.appcompat.widget.Toolbar;
10 |
11 | import com.scwang.refresh.layout.R;
12 | import com.scwang.refresh.layout.util.StatusBarUtil;
13 |
14 | import ezy.ui.layout.LoadingLayout;
15 |
16 | /**
17 | * QQ浏览器-Github
18 | */
19 | public class QQBrowserPracticeActivity extends AppCompatActivity {
20 |
21 | @SuppressLint("SetJavaScriptEnabled")
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.activity_practice_qqbrowser);
26 |
27 | final Toolbar toolbar = findViewById(R.id.toolbar);
28 | toolbar.setNavigationOnClickListener(v -> finish());
29 |
30 | final LoadingLayout loading = findViewById(R.id.loading);
31 |
32 | final WebView webView = findViewById(R.id.webView);
33 | webView.loadUrl("https://github.com/scwang90/SmartRefreshLayout");
34 | webView.getSettings().setJavaScriptEnabled(true);
35 | webView.setWebViewClient(new WebViewClient(){
36 | @Override
37 | public boolean shouldOverrideUrlLoading(WebView view, String url) {
38 | view.loadUrl(url);
39 | return true;
40 | }
41 | @Override
42 | public void onPageFinished(WebView view, String url) {
43 | super.onPageFinished(view, url);
44 | loading.showContent();
45 | }
46 | });
47 |
48 | //状态栏透明和间距处理
49 | StatusBarUtil.immersive(this);
50 | StatusBarUtil.setPaddingSmart(this, toolbar);
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/java/com/scwang/refresh/layout/widget/RefreshContentHorizontal.java:
--------------------------------------------------------------------------------
1 | package com.scwang.refresh.layout.widget;
2 |
3 | import android.animation.ValueAnimator;
4 | import android.view.View;
5 | import android.widget.AbsListView;
6 |
7 | import androidx.annotation.NonNull;
8 |
9 | import com.scwang.smart.refresh.layout.util.SmartUtil;
10 | import com.scwang.smart.refresh.layout.wrapper.RefreshContentWrapper;
11 |
12 |
13 | public class RefreshContentHorizontal extends RefreshContentWrapper {
14 |
15 | RefreshContentHorizontal(@NonNull View view) {
16 | super(view);
17 | }
18 |
19 | @Override
20 | public ValueAnimator.AnimatorUpdateListener scrollContentWhenFinished(final int spinner) {
21 | if (mScrollableView != null && spinner != 0) {
22 | if ((spinner < 0 && mScrollableView.canScrollHorizontally(1)) || (spinner > 0 && mScrollableView.canScrollHorizontally(-1))) {
23 | mLastSpinner = spinner;
24 | return this;
25 | }
26 | }
27 | return null;
28 | }
29 |
30 | @Override
31 | public void onAnimationUpdate(@NonNull ValueAnimator animation) {
32 | int value = (int) animation.getAnimatedValue();
33 | try {
34 | if (mScrollableView instanceof AbsListView) {
35 | SmartUtil.scrollListBy((AbsListView) mScrollableView, value - mLastSpinner);
36 | } else {
37 | mScrollableView.scrollBy(value - mLastSpinner, 0);
38 | }
39 | } catch (Throwable ignored) {
40 | //根据用户反馈,此处可能会有BUG
41 | }
42 | mLastSpinner = value;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/animation_loading_frame.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/animation_loading_rotate.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bc_background_panel.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/button_blue.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 | -
11 |
12 |
13 |
14 |
15 |
16 | -
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_arrow_back_dark_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_arrow_back_gray_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_arrow_back_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_chevron_right.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_chevron_right_gray.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_empty.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_error.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_feed_list_favorite.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_feed_list_mail.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_feed_list_photo.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fly_refresh_folder.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fly_refresh_info.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fly_refresh_phone.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fly_refresh_poll.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fly_refresh_send.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_index_dashboard.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_index_home.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_index_notifications.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_list_divider.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_progress_puzzle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/skin_instantchat_more.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/skin_messages_left_bubble.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/skin_messages_right_bubble.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_example_assign_code.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
20 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_example_assign_default.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
19 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_example_custom.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
19 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_example_i18n.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
19 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_index_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
16 |
17 |
22 |
23 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_style_bezier.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
24 |
28 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_style_circle.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
24 |
27 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_style_delivery.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
17 |
18 |
27 |
30 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_style_dropbox.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
26 |
29 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_style_fungame_battlecity.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
23 |
26 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_style_fungame_hitblock.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
23 |
26 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_style_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
24 |
27 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_style_storehouse.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
24 |
30 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_style_water_drop.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
24 |
25 |
28 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_style_wave_swipe.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
24 |
27 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/common_independence_recycler.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
19 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/common_loading.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_example_bottom_sheet.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
18 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_example_disallow_intercept.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
18 |
19 |
22 |
23 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_example_emptylayout.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
18 |
23 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_example_emptylayout_inner.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
18 |
21 |
28 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_example_emptylayout_outer.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
17 |
21 |
28 |
29 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_example_horizontal.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
15 |
16 |
24 |
33 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_example_purescroll.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
20 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_example_purescroll_header.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
20 |
23 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_example_staggered_grid.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
19 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_example_viewpager.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
21 |
26 |
31 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_flexbox_layout_manager.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
19 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_practice_twolevel.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
15 |
16 |
17 |
21 |
25 |
29 |
30 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_refresh_practive.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
12 |
13 |
20 |
23 |
30 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_refresh_styles.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
12 |
13 |
22 |
25 |
32 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_example_snap_helper.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_movie_banner.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_movie_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_movie_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
20 |
25 |
31 |
36 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/navigation.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
--------------------------------------------------------------------------------
/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/gif_header_repast.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/gif_header_repast.gif
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_item1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/ic_item1.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_item2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/ic_item2.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_item3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/ic_item3.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_avatar_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_avatar_1.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_avatar_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_avatar_2.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_avatar_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_avatar_3.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_avatar_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_avatar_4.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_avatar_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_avatar_5.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_avatar_6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_avatar_6.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_movie_header_12231501221682438.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_movie_header_12231501221682438.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_movie_header_12981501221820220.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_movie_header_12981501221820220.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_movie_header_48621499931969370.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_movie_header_48621499931969370.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_practice_repast_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_practice_repast_1.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_practice_repast_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_practice_repast_2.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_practice_repast_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_practice_repast_3.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_practice_repast_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_practice_repast_4.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_practice_repast_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_practice_repast_5.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/image_practice_repast_6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/image_practice_repast_6.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/skin_aio_more_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/skin_aio_more_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/skin_aio_more_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/skin_aio_more_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/skin_common_btn_blue_disabled.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/skin_common_btn_blue_disabled.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/skin_messages_left_bubble.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/skin_messages_left_bubble.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/skin_messages_left_bubble_highlighted.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/skin_messages_left_bubble_highlighted.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/skin_messages_right_bubble.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/skin_messages_right_bubble.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/skin_messages_right_bubble_highlighted.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-hdpi/skin_messages_right_bubble_highlighted.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/image_second_floor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-mdpi/image_second_floor.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/image_second_floor_content.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-mdpi/image_second_floor_content.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/image_taobao.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-mdpi/image_taobao.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/image_weibo_home_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-mdpi/image_weibo_home_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/image_weibo_home_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-mdpi/image_weibo_home_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values-v19/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
11 |
12 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | - 22,0,0,30,
6 | - 22,0,30,0,
7 | - 30,0,52,30,
8 | - 0,30,26,30,
9 | - 60,0,60,15,
10 | - 60,15,60,30,
11 | - 60,15,85,15,
12 | - 85,15,108,0,
13 | - 85,15,108,30,
14 | - 117,0,147,0,
15 | - 147,0,177,0,
16 | - 147,0,147,32,
17 | - 198,0,176,30,
18 | - 198,0,206,0,
19 | - 206,0,228,30,
20 | - 176,30,202,30,
21 |
22 |
23 |
24 | - 0,35,12,42,
25 | - 12,42,24,35,
26 | - 24,35,12,28,
27 | - 0,35,12,28,
28 | - 0,21,12,28,
29 | - 12,28,24,21,
30 | - 24,35,24,21,
31 | - 24,21,12,14,
32 | - 0,21,12,14,
33 | - 0,21,0,7,
34 | - 12,14,0,7,
35 | - 12,14,24,7,
36 | - 24,7,12,0,
37 | - 0,7,12,0,
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh/strings_srl.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | \@下拉刷新
4 | \@正在刷新…
5 | \@正在加载…
6 | \@释放刷新
7 | \@刷新完成
8 | \@刷新失败
9 | \@上次更新 M-d HH:mm
10 | \@进入二楼
11 |
12 | \@上拉加载
13 | \@释放加载
14 | \@正在加载…
15 | \@正在刷新…
16 | \@加载完成
17 | \@加载失败
18 | \@没有更多数据了
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | - 22,0,0,30,
6 | - 22,0,30,0,
7 | - 30,0,52,30,
8 | - 0,30,26,30,
9 | - 60,0,60,15,
10 | - 60,15,60,30,
11 | - 60,15,85,15,
12 | - 85,15,108,0,
13 | - 85,15,108,30,
14 | - 117,0,147,0,
15 | - 147,0,177,0,
16 | - 147,0,147,32,
17 | - 198,0,176,30,
18 | - 198,0,206,0,
19 | - 206,0,228,30,
20 | - 176,30,202,30,
21 |
22 |
23 |
24 | - 0,35,12,42,
25 | - 12,42,24,35,
26 | - 24,35,12,28,
27 | - 0,35,12,28,
28 | - 0,21,12,28,
29 | - 12,28,24,21,
30 | - 24,35,24,21,
31 | - 24,21,12,14,
32 | - 0,21,12,14,
33 | - 0,21,0,7,
34 | - 12,14,0,7,
35 | - 12,14,24,7,
36 | - 24,7,12,0,
37 | - 0,7,12,0,
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #33aaff
4 | #2299ee
5 | #cc0094ff
6 | #FF4081
7 |
8 | #333333
9 | #444444
10 | #888888
11 |
12 | #FFFFFF
13 | #f2f2f2
14 | #33aaaaaa
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 240dp
3 | 16dp
4 | 16dp
5 |
6 | 16dp
7 | 16dp
8 |
9 |
10 | 0.5dp
11 |
12 | 2.5dp
13 | 5dp
14 | 10dp
15 | 10dp
16 | 12.5dp
17 | 15dp
18 | 20dp
19 | 25dp
20 |
21 |
22 | 12sp
23 | 14sp
24 | 16sp
25 | 17sp
26 | 19sp
27 | 20sp
28 |
29 | 10sp
30 | 12sp
31 | 14sp
32 | 16sp
33 | 17sp
34 | 19sp
35 | 20sp
36 | 14sp
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings_srl.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Pull Down To Refresh
4 | Refreshing…
5 | Wait For Loading…
6 | Release To Refresh
7 | Refresh Finished
8 | Refresh Failed
9 | \'Last Update\' M-d HH:mm
10 | Release To Second Floor
11 |
12 | Pull Up To Load More
13 | Release To Load More
14 | Loading…
15 | Wait For Refreshing…
16 | Load More Finished
17 | Load More Failed
18 | No More Data
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/test/java/com/scwang/refresh/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.refresh;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
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 | }
--------------------------------------------------------------------------------
/art/app-debug.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/app-debug.apk
--------------------------------------------------------------------------------
/art/dex-method-counts.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/dex-method-counts.jar
--------------------------------------------------------------------------------
/art/gif_BattleCity.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_BattleCity.gif
--------------------------------------------------------------------------------
/art/gif_BattleCity_1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_BattleCity_1.gif
--------------------------------------------------------------------------------
/art/gif_BezierCircle.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_BezierCircle.gif
--------------------------------------------------------------------------------
/art/gif_BezierRadar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_BezierRadar.gif
--------------------------------------------------------------------------------
/art/gif_Classics.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_Classics.gif
--------------------------------------------------------------------------------
/art/gif_Delivery.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_Delivery.gif
--------------------------------------------------------------------------------
/art/gif_Dropbox.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_Dropbox.gif
--------------------------------------------------------------------------------
/art/gif_FlyRefresh.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_FlyRefresh.gif
--------------------------------------------------------------------------------
/art/gif_HitBlock.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_HitBlock.gif
--------------------------------------------------------------------------------
/art/gif_HitBlock_1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_HitBlock_1.gif
--------------------------------------------------------------------------------
/art/gif_Material.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_Material.gif
--------------------------------------------------------------------------------
/art/gif_Phoenix.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_Phoenix.gif
--------------------------------------------------------------------------------
/art/gif_StoreHouse.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_StoreHouse.gif
--------------------------------------------------------------------------------
/art/gif_Taurus.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_Taurus.gif
--------------------------------------------------------------------------------
/art/gif_WaterDrop.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_WaterDrop.gif
--------------------------------------------------------------------------------
/art/gif_WaveSwipe.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_WaveSwipe.gif
--------------------------------------------------------------------------------
/art/gif_demo_multitouch_1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_demo_multitouch_1.gif
--------------------------------------------------------------------------------
/art/gif_demo_multitouch_2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_demo_multitouch_2.gif
--------------------------------------------------------------------------------
/art/gif_practive_feedlist.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_practive_feedlist.gif
--------------------------------------------------------------------------------
/art/gif_practive_feedlist_1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_practive_feedlist_1.gif
--------------------------------------------------------------------------------
/art/gif_practive_profile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_practive_profile.gif
--------------------------------------------------------------------------------
/art/gif_practive_profile_1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_practive_profile_1.gif
--------------------------------------------------------------------------------
/art/gif_practive_repast.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_practive_repast.gif
--------------------------------------------------------------------------------
/art/gif_practive_repast_1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_practive_repast_1.gif
--------------------------------------------------------------------------------
/art/gif_practive_smart.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_practive_smart.gif
--------------------------------------------------------------------------------
/art/gif_practive_weibo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_practive_weibo.gif
--------------------------------------------------------------------------------
/art/gif_practive_weibo_1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_practive_weibo_1.gif
--------------------------------------------------------------------------------
/art/gif_preview_textheader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/gif_preview_textheader.gif
--------------------------------------------------------------------------------
/art/jpg_preview_gifheader.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/jpg_preview_gifheader.jpg
--------------------------------------------------------------------------------
/art/jpg_preview_textheader.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/jpg_preview_textheader.jpg
--------------------------------------------------------------------------------
/art/jpg_preview_xml_define.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/jpg_preview_xml_define.jpg
--------------------------------------------------------------------------------
/art/jpg_uml.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/jpg_uml.jpg
--------------------------------------------------------------------------------
/art/md_multitouch.md:
--------------------------------------------------------------------------------
1 | # 多点触摸
2 |
3 | 多点触摸就是多个手指一起滑动,直接看效果吧~
4 |
5 |  
6 |
7 |
--------------------------------------------------------------------------------
/art/pay_alipay.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/pay_alipay.jpg
--------------------------------------------------------------------------------
/art/pay_alipay_red_packet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/pay_alipay_red_packet.png
--------------------------------------------------------------------------------
/art/pay_tencent.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/pay_tencent.jpg
--------------------------------------------------------------------------------
/art/pay_wxpay.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/pay_wxpay.jpg
--------------------------------------------------------------------------------
/art/png_apk_rqcode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/png_apk_rqcode.png
--------------------------------------------------------------------------------
/art/png_ptr_elema.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/png_ptr_elema.png
--------------------------------------------------------------------------------
/art/png_ptr_meituan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/png_ptr_meituan.png
--------------------------------------------------------------------------------
/art/png_ptr_tianmao.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/art/png_ptr_tianmao.png
--------------------------------------------------------------------------------
/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 | android.useAndroidX=true
20 | android.enableJetifier=true
21 |
22 | SMART_USER=scwang90
23 | SMART_GROUP=com.scwang.smart
24 | SMART_VERSION=3.0.0-alpha
25 |
26 | SMART_PUBLISH=false
27 | SMART_GROUP_MVN=io.github.scwang90
28 | SMART_EMAIL=scwang90@hotmail.com
29 |
30 | signing.keyId=888F6528
31 | signing.password=
32 | signing.secretKeyRingFile=../secret-rsa.gpg
33 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Jun 28 09:55:18 CST 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
7 |
--------------------------------------------------------------------------------
/method-count-layout.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/method-count-layout.bat
--------------------------------------------------------------------------------
/method-count-words.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/method-count-words.bat
--------------------------------------------------------------------------------
/refresh-drawable-paint/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/refresh-drawable-paint/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | description = 'common drawables for refresh animations'
4 |
5 | android {
6 |
7 | compileSdkVersion 34
8 |
9 | defaultConfig {
10 | minSdkVersion 21
11 | targetSdkVersion 34
12 | versionCode 1
13 | versionName SMART_VERSION
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | lintOptions {
24 | abortOnError false
25 | }
26 | }
27 |
28 | dependencies {
29 | implementation fileTree(dir: 'libs', include: ['*.jar'])
30 |
31 | compileOnly 'androidx.annotation:annotation:1.9.1'
32 |
33 | testImplementation 'junit:junit:4.13.2'
34 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
35 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
36 | }
37 |
--------------------------------------------------------------------------------
/refresh-drawable-paint/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 E:\Android\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 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/refresh-drawable-paint/src/androidTest/java/com/scwang/smart/drawable/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.drawable;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
12 |
13 | /**
14 | * Instrumentation 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 |
25 | assertEquals("com.scwang.smart.drawable.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/refresh-drawable-paint/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/refresh-drawable-paint/src/main/java/com/scwang/smart/drawable/PaintDrawable.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.drawable;
2 |
3 | import android.graphics.ColorFilter;
4 | import android.graphics.Paint;
5 | import android.graphics.PixelFormat;
6 | import android.graphics.drawable.Drawable;
7 |
8 | /**
9 | * 画笔 Drawable
10 | * Created by scwang on 2017/6/16.
11 | */
12 | public abstract class PaintDrawable extends Drawable {
13 |
14 | protected Paint mPaint = new Paint();
15 |
16 | protected PaintDrawable() {
17 | mPaint.setStyle(Paint.Style.FILL);
18 | mPaint.setAntiAlias(true);
19 | mPaint.setColor(0xffaaaaaa);
20 | }
21 |
22 | public void setColor(int color) {
23 | mPaint.setColor(color);
24 | }
25 |
26 | @Override
27 | public void setAlpha(int alpha) {
28 | mPaint.setAlpha(alpha);
29 | }
30 |
31 | @Override
32 | public void setColorFilter(ColorFilter cf) {
33 | mPaint.setColorFilter(cf);
34 | }
35 |
36 | @Override
37 | @Deprecated
38 | public int getOpacity() {
39 | return PixelFormat.TRANSLUCENT;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/refresh-drawable-paint/src/test/java/com/scwang/smart/drawable/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.drawable;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
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 | }
--------------------------------------------------------------------------------
/refresh-drawable-path/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/refresh-drawable-path/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | description = 'path drawables for refresh animations'
4 |
5 | android {
6 |
7 | compileSdkVersion 34
8 |
9 | defaultConfig {
10 | minSdkVersion 21
11 | targetSdkVersion 34
12 | versionCode 1
13 | versionName SMART_VERSION
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | lintOptions {
24 | abortOnError false
25 | }
26 | }
27 |
28 | dependencies {
29 | implementation fileTree(dir: 'libs', include: ['*.jar'])
30 |
31 | api project(':refresh-drawable-paint')
32 |
33 | compileOnly 'androidx.appcompat:appcompat:1.7.0'
34 |
35 | testImplementation 'junit:junit:4.13.2'
36 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
37 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
38 | }
39 |
--------------------------------------------------------------------------------
/refresh-drawable-path/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 E:\Android\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 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/refresh-drawable-path/src/androidTest/java/com/scwang/smart/drawable/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.drawable;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
12 |
13 | /**
14 | * Instrumentation 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 |
25 | assertEquals("com.scwang.smart.drawable.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/refresh-drawable-path/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/refresh-drawable-path/src/test/java/com/scwang/smart/drawable/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.drawable;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
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 | }
--------------------------------------------------------------------------------
/refresh-footer-ball/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/refresh-footer-ball/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | description = 'the footer BallPulseFooter of SmartRefreshLayout'
4 |
5 | android {
6 |
7 | compileSdkVersion 34
8 |
9 | defaultConfig {
10 | minSdkVersion 21
11 | targetSdkVersion 34
12 | versionCode 1
13 | versionName SMART_VERSION
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 |
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 |
25 | lintOptions {
26 | abortOnError false
27 | }
28 |
29 | }
30 |
31 | dependencies {
32 | implementation fileTree(dir: 'libs', include: ['*.jar'])
33 |
34 | compileOnly project(':refresh-layout-kernel')
35 |
36 | compileOnly 'androidx.appcompat:appcompat:1.7.0'
37 |
38 | testImplementation 'junit:junit:4.13.2'
39 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
40 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
41 | }
42 |
--------------------------------------------------------------------------------
/refresh-footer-ball/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 |
--------------------------------------------------------------------------------
/refresh-footer-ball/src/androidTest/java/com/scwang/smart/refresh/footer/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.footer;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
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 |
25 | assertEquals("com.scwang.smart.refresh.header.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/refresh-footer-ball/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/refresh-footer-ball/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/refresh-footer-ball/src/test/java/com/scwang/smart/refresh/footer/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.footer;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
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 | }
--------------------------------------------------------------------------------
/refresh-footer-classics/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/refresh-footer-classics/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | description = 'the footer ClassicsFooter of SmartRefreshLayout'
4 |
5 | android {
6 |
7 | compileSdkVersion 34
8 |
9 | defaultConfig {
10 | minSdkVersion 21
11 | targetSdkVersion 34
12 | versionCode 1
13 | versionName SMART_VERSION
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 |
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 |
25 | lintOptions {
26 | abortOnError false
27 | }
28 |
29 | }
30 |
31 | dependencies {
32 | implementation fileTree(dir: 'libs', include: ['*.jar'])
33 |
34 | api project(':refresh-drawable-paint')
35 | compileOnly project(':refresh-layout-kernel')
36 |
37 | compileOnly 'androidx.appcompat:appcompat:1.7.0'
38 |
39 | testImplementation 'junit:junit:4.13.2'
40 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
41 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
42 | }
43 |
--------------------------------------------------------------------------------
/refresh-footer-classics/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 |
--------------------------------------------------------------------------------
/refresh-footer-classics/src/androidTest/java/com/scwang/smart/refresh/footer/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.footer;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
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 |
25 | assertEquals("com.scwang.smart.refresh.footer.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/refresh-footer-classics/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/refresh-footer-classics/src/main/res/layout/srl_classics_footer.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
22 |
23 |
35 |
36 |
45 |
46 |
--------------------------------------------------------------------------------
/refresh-footer-classics/src/main/res/values-zh/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 上拉加载更多
4 | 释放立即加载
5 | 正在加载…
6 | 等待头部刷新完成…
7 | 加载完成
8 | 加载失败
9 | 没有更多数据了
10 |
11 |
12 |
--------------------------------------------------------------------------------
/refresh-footer-classics/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 |
--------------------------------------------------------------------------------
/refresh-footer-classics/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Pull Up To Load More
4 | Release To Load More
5 | Loading…
6 | Wait For Refreshing…
7 | Load Success
8 | Load Failed
9 | No More Data
10 |
11 |
12 |
--------------------------------------------------------------------------------
/refresh-footer-classics/src/test/java/com/scwang/smart/refresh/footer/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.footer;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
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 | }
--------------------------------------------------------------------------------
/refresh-footer/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/refresh-footer/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 |
5 | compileSdkVersion 34
6 |
7 | defaultConfig {
8 |
9 | minSdkVersion 21
10 | targetSdkVersion 34
11 | versionCode 1
12 | versionName SMART_VERSION
13 |
14 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
15 | }
16 | buildTypes {
17 | release {
18 | minifyEnabled false
19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20 | }
21 | }
22 | lintOptions {
23 | abortOnError false
24 | }
25 | }
26 |
27 | dependencies {
28 | implementation fileTree(include: ['*.jar'], dir: 'libs')
29 |
30 | compileOnly project(':refresh-layout')
31 | compileOnly project(':refresh-footer-ball')
32 | compileOnly project(':refresh-footer-classics')
33 |
34 | // compileOnly 'io.github.scwang90:refresh-footer-ball:3.0.0-alpha' //球脉冲加载
35 | // compileOnly 'io.github.scwang90:refresh-footer-classics:3.0.0-alpha' //经典加载
36 |
37 | compileOnly 'androidx.appcompat:appcompat:1.7.0'
38 |
39 | testImplementation 'junit:junit:4.13.2'
40 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
41 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
42 | }
43 |
--------------------------------------------------------------------------------
/refresh-footer/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 E:\Android\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 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/refresh-footer/src/androidTest/java/com/scwang/smart/refresh/footer/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.footer;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
12 |
13 | /**
14 | * Instrumentation 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 |
25 | assertEquals("com.scwang.smart.refresh.footer.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/refresh-footer/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/refresh-footer/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/refresh-footer/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | SmartRefreshFooter
3 |
4 |
--------------------------------------------------------------------------------
/refresh-footer/src/test/java/com/scwang/smartrefresh/footer/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.footer;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
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 | }
--------------------------------------------------------------------------------
/refresh-header-classics/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/refresh-header-classics/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | description = 'the header ClassicsHeader of SmartRefreshLayout'
4 |
5 | android {
6 |
7 | compileSdkVersion 34
8 |
9 | defaultConfig {
10 | minSdkVersion 21
11 | targetSdkVersion 34
12 | versionCode 1
13 | versionName SMART_VERSION
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 |
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 |
25 | lintOptions {
26 | abortOnError false
27 | }
28 |
29 | }
30 |
31 | dependencies {
32 | implementation fileTree(dir: 'libs', include: ['*.jar'])
33 |
34 | api project(':refresh-footer-classics')
35 | compileOnly project(':refresh-layout-kernel')
36 |
37 | compileOnly 'androidx.appcompat:appcompat:1.7.0'
38 |
39 | testImplementation 'junit:junit:4.13.2'
40 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
41 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/refresh-header-classics/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 |
--------------------------------------------------------------------------------
/refresh-header-classics/src/androidTest/java/com/scwang/smart/refresh/header/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
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 |
25 | assertEquals("com.scwang.smart.refresh.header.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/refresh-header-classics/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/refresh-header-classics/src/main/res/values-zh/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 下拉可以刷新
4 | 正在刷新…
5 | 等待底部加载完成…
6 | 释放立即刷新
7 | 刷新完成
8 | 刷新失败
9 | 上次更新 M-d HH:mm
10 | 释放进入二楼
11 |
12 |
13 |
--------------------------------------------------------------------------------
/refresh-header-classics/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 |
--------------------------------------------------------------------------------
/refresh-header-classics/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Pull Down To Refresh
4 | Release To Refresh
5 | Refreshing…
6 | Wait For Loading…
7 | Refresh Success
8 | Refresh Failed
9 | \'Last Update\' M-d HH:mm
10 | Release To Second Floor
11 |
12 |
13 |
--------------------------------------------------------------------------------
/refresh-header-classics/src/test/java/com/scwang/smart/refresh/header/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
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 | }
--------------------------------------------------------------------------------
/refresh-header-falsify/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/refresh-header-falsify/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | description = 'the header FalsifyHeader of SmartRefreshLayout'
4 |
5 | android {
6 |
7 | compileSdkVersion 34
8 |
9 | defaultConfig {
10 | minSdkVersion 21
11 | targetSdkVersion 34
12 | versionCode 1
13 | versionName SMART_VERSION
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 |
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 |
25 | lintOptions {
26 | abortOnError false
27 | }
28 | }
29 |
30 | dependencies {
31 | implementation fileTree(dir: 'libs', include: ['*.jar'])
32 |
33 | compileOnly project(':refresh-layout-kernel')
34 |
35 | compileOnly 'androidx.appcompat:appcompat:1.7.0'
36 |
37 | testImplementation 'junit:junit:4.13.2'
38 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
39 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
40 | }
41 |
--------------------------------------------------------------------------------
/refresh-header-falsify/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 |
--------------------------------------------------------------------------------
/refresh-header-falsify/src/androidTest/java/com/scwang/smart/refresh/header/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
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 |
25 | assertEquals("com.scwang.smart.refresh.header.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/refresh-header-falsify/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/refresh-header-falsify/src/main/java/com/scwang/smart/refresh/header/FalsifyHeader.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | import androidx.annotation.NonNull;
7 |
8 | import com.scwang.smart.refresh.header.falsify.FalsifyAbstract;
9 | import com.scwang.smart.refresh.layout.api.RefreshHeader;
10 | import com.scwang.smart.refresh.layout.api.RefreshLayout;
11 |
12 | /**
13 | * 虚假的 Header
14 | * 用于 正真的 Header 在 RefreshLayout 外部时,
15 | * 使用本虚假的 FalsifyHeader 填充在 RefreshLayout 内部
16 | * 具体使用方法 参考 纸飞机(FlyRefreshHeader)
17 | * Created by scwang on 2017/6/14.
18 | */
19 | public class FalsifyHeader extends FalsifyAbstract implements RefreshHeader {
20 |
21 | //
22 | public FalsifyHeader(Context context) {
23 | this(context, null);
24 | }
25 |
26 | public FalsifyHeader(Context context, AttributeSet attrs) {
27 | super(context, attrs, 0);
28 | }
29 | //
30 |
31 | //
32 | @Override
33 | public void onReleased(@NonNull RefreshLayout layout, int height, int maxDragHeight) {
34 | if (mRefreshKernel != null) {
35 | /*
36 | * 2020-3-15 BUG修复
37 | * https://github.com/scwang90/SmartRefreshLayout/issues/1018
38 | * 强化了 closeHeaderOrFooter 的关闭逻辑,帮助 Header 取消刷新
39 | * FalsifyHeader 是不能触发刷新的
40 | */
41 | layout.closeHeaderOrFooter();
42 | // mRefreshKernel.setState(RefreshState.None);
43 | // //onReleased 的时候 调用 setState(RefreshState.None); 并不会立刻改变成 None
44 | // //而是先执行一个回弹动画,RefreshFinish 是介于 Refreshing 和 None 之间的状态
45 | // //RefreshFinish 用于在回弹动画结束时候能顺利改变为 None
46 | // mRefreshKernel.setState(RefreshState.RefreshFinish);
47 | }
48 | }
49 | //
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/refresh-header-falsify/src/main/res/values-zh/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | %s 虚假区域\n代表运行时拖动的高度【%.1fdp】 \n而不会显示任何东西
3 |
4 |
--------------------------------------------------------------------------------
/refresh-header-falsify/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | %s falsify area,\n Represents the height[%.1fdp] of drag at run time,\n It does not show anything.
3 |
4 |
--------------------------------------------------------------------------------
/refresh-header-falsify/src/test/java/com/scwang/smart/refresh/header/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
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 | }
--------------------------------------------------------------------------------
/refresh-header-material/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | description = 'the header MaterialHeader of SmartRefreshLayout'
4 |
5 | android {
6 |
7 | compileSdkVersion 34
8 |
9 | defaultConfig {
10 | minSdkVersion 21
11 | targetSdkVersion 34
12 | versionCode 1
13 | versionName SMART_VERSION
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 |
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 |
25 | lintOptions {
26 | abortOnError false
27 | }
28 |
29 | }
30 |
31 | dependencies {
32 | implementation fileTree(dir: 'libs', include: ['*.jar'])
33 |
34 | compileOnly project(':refresh-layout-kernel')
35 |
36 | compileOnly 'androidx.appcompat:appcompat:1.7.0'
37 |
38 | testImplementation 'junit:junit:4.13.2'
39 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
40 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
41 | }
42 |
--------------------------------------------------------------------------------
/refresh-header-material/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 |
--------------------------------------------------------------------------------
/refresh-header-material/src/androidTest/java/com/scwang/smart/refresh/header/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
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 |
25 | assertEquals("com.scwang.smart.refresh.header.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/refresh-header-material/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/refresh-header-material/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/refresh-header-material/src/test/java/com/scwang/smart/refresh/header/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
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 | }
--------------------------------------------------------------------------------
/refresh-header-radar/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/refresh-header-radar/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | description = 'the header BezierRadarHeader of SmartRefreshLayout'
4 |
5 | android {
6 |
7 | compileSdkVersion 34
8 |
9 | defaultConfig {
10 | minSdkVersion 21
11 | targetSdkVersion 34
12 | versionCode 1
13 | versionName SMART_VERSION
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 |
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 |
25 | lintOptions {
26 | abortOnError false
27 | }
28 |
29 | }
30 |
31 | dependencies {
32 | implementation fileTree(dir: 'libs', include: ['*.jar'])
33 |
34 | compileOnly project(':refresh-layout-kernel')
35 |
36 | compileOnly 'androidx.appcompat:appcompat:1.7.0'
37 |
38 | testImplementation 'junit:junit:4.13.2'
39 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
40 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
41 | }
42 |
--------------------------------------------------------------------------------
/refresh-header-radar/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 |
--------------------------------------------------------------------------------
/refresh-header-radar/src/androidTest/java/com/scwang/smart/refresh/header/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
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 |
25 | assertEquals("com.scwang.smart.refresh.header.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/refresh-header-radar/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/refresh-header-radar/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/refresh-header-radar/src/test/java/com/scwang/smart/refresh/header/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
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 | }
--------------------------------------------------------------------------------
/refresh-header-two-level/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/refresh-header-two-level/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | description = 'the header TwoLevelHeader of SmartRefreshLayout'
4 |
5 | android {
6 |
7 | compileSdkVersion 34
8 |
9 | defaultConfig {
10 | minSdkVersion 21
11 | targetSdkVersion 34
12 | versionCode 1
13 | versionName SMART_VERSION
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 |
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 |
25 | lintOptions {
26 | abortOnError false
27 | }
28 | }
29 |
30 | dependencies {
31 | implementation fileTree(dir: 'libs', include: ['*.jar'])
32 |
33 | api project(':refresh-header-classics')
34 | compileOnly project(':refresh-layout-kernel')
35 |
36 | compileOnly 'androidx.appcompat:appcompat:1.7.0'
37 |
38 | testImplementation 'junit:junit:4.13.2'
39 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
40 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
41 | }
42 |
--------------------------------------------------------------------------------
/refresh-header-two-level/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 |
--------------------------------------------------------------------------------
/refresh-header-two-level/src/androidTest/java/com/scwang/smart/refresh/header/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
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 |
25 | assertEquals("com.scwang.smart.refresh.header.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/refresh-header-two-level/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/refresh-header-two-level/src/main/java/com/scwang/smart/refresh/header/listener/OnTwoLevelListener.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header.listener;
2 |
3 | import androidx.annotation.NonNull;
4 |
5 | import com.scwang.smart.refresh.layout.api.RefreshLayout;
6 |
7 | /**
8 | * 二级刷新监听器
9 | */
10 | public interface OnTwoLevelListener {
11 | /**
12 | * 二级刷新触发
13 | * @param refreshLayout 刷新布局
14 | * @return true 将会展开二楼状态 false 关闭刷新
15 | */
16 | boolean onTwoLevel(@NonNull RefreshLayout refreshLayout);
17 | }
--------------------------------------------------------------------------------
/refresh-header-two-level/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/refresh-header-two-level/src/test/java/com/scwang/smart/refresh/header/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
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 | }
--------------------------------------------------------------------------------
/refresh-header/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/refresh-header/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 |
5 | compileSdkVersion 34
6 |
7 | defaultConfig {
8 | minSdkVersion 21
9 | targetSdkVersion 34
10 | versionCode 1
11 | versionName SMART_VERSION
12 |
13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 | lintOptions {
22 | abortOnError false
23 | }
24 | }
25 |
26 | dependencies {
27 | implementation fileTree(dir: 'libs', include: ['*.jar'])
28 |
29 | compileOnly project(':refresh-layout')
30 | compileOnly project(':refresh-drawable-path')
31 | compileOnly project(':refresh-header-material')
32 | compileOnly project(':refresh-layout-kernel')
33 | compileOnly project(':refresh-header-falsify')
34 |
35 | // compileOnly 'io.github.scwang90:refresh-drawable-path:3.0.0-alpha' //矢量路径
36 | // compileOnly 'io.github.scwang90:refresh-layout-kernel:3.0.0-alpha' //核心必须依赖
37 | // compileOnly 'io.github.scwang90:refresh-header-falsify:3.0.0-alpha' //虚拟刷新头
38 | // compileOnly 'io.github.scwang90:refresh-header-material:3.0.0-alpha' //谷歌刷新头
39 |
40 | compileOnly 'androidx.appcompat:appcompat:1.7.0'
41 |
42 | testImplementation 'junit:junit:4.13.2'
43 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
44 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
45 | }
46 |
--------------------------------------------------------------------------------
/refresh-header/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 E:\Android\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 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/refresh-header/src/androidTest/java/com/scwang/smartrefresh/header/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
12 |
13 | /**
14 | * Instrumentation 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 |
25 | assertEquals("com.scwang.smart.refresh.header.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/refresh-header/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/refresh-header/src/main/java/com/scwang/smart/refresh/header/flyrefresh/FlyView.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header.flyrefresh;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | import com.scwang.smart.drawable.view.PathsView;
7 | import com.scwang.smart.refresh.layout.util.SmartUtil;
8 |
9 | /**
10 | * 纸飞机视图
11 | * Created by scwang on 2017/6/6.
12 | */
13 | public class FlyView extends PathsView {
14 |
15 | public FlyView(Context context) {
16 | this(context, null);
17 | }
18 |
19 | public FlyView(Context context, AttributeSet attrs) {
20 | super(context, attrs);
21 | super.parserColors(0xffffffff);
22 | if (!mPathsDrawable.parserPaths("M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z")) {
23 | mPathsDrawable.declareOriginal(2, 3, 20, 18);
24 | }
25 | int side = SmartUtil.dp2px(25);
26 | mPathsDrawable.setBounds(0, 0, side, side);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/refresh-header/src/main/java/com/scwang/smart/refresh/header/waterdrop/Circle.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header.waterdrop;
2 |
3 | /**
4 | * Created by scwang on 2018/6/25.
5 | * 实心圆
6 | */
7 | public class Circle {
8 | public float x;//圆x坐标
9 | public float y;//圆y坐标
10 | public float radius;//圆半径
11 | public int color;//圆的颜色
12 | }
--------------------------------------------------------------------------------
/refresh-header/src/main/java/com/scwang/smart/refresh/header/waveswipe/DropBounceInterpolator.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header.waveswipe;
2 | /*
3 | * Copyright (C) 2015 RECRUIT LIFESTYLE CO., LTD.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | import android.view.animation.Interpolator;
18 |
19 | /**
20 | * @author amyu
21 | *
22 | * {@link WaveView#mDropBounceHorizontalAnimator} と {@link WaveView#mDropVertexAnimator} にセットするInterpolator
23 | * WavePullToRefresh/DropBounceInterpolator.gcxにグラフの詳細
24 | */
25 | public class DropBounceInterpolator implements Interpolator {
26 |
27 | /**
28 | * {@inheritDoc}
29 | * @param v 动画帧
30 | * @return 加速值
31 | */
32 | @Override
33 | public float getInterpolation(float v) {
34 | //y = -19 * (x - 0.125)^2 + 1.3 (0 <= x < 0.25)
35 | //y = -6.5 * (x - 0.625)^2 + 1.1 (0.5 <= x < 0.75)
36 | //y = 0 (0.25 <= x < 0.5 && 0.75 <= x <=1)
37 |
38 | if (v < 0.25f) {
39 | return -38.4f * (float) Math.pow(v - 0.125, 2) + 0.6f;
40 | } else if (v >= 0.5 && v < 0.75) {
41 | return -19.2f * (float) Math.pow(v - 0.625, 2) + 0.3f;
42 | } else {
43 | return 0;
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/refresh-header/src/main/res/values-zh/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 下拉开始游戏!
3 | 释放立刻开始!
4 | 上下滑动控制游戏
5 |
6 | 游戏结束
7 | 玩个游戏解解闷
8 | 刷新完成
9 | 刷新失败
10 |
11 |
12 |
--------------------------------------------------------------------------------
/refresh-header/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Pull To Break Out!
3 | Release To Break Out!
4 | Scroll to move handle
5 |
6 | Game Over
7 | Refreshing…
8 | Refreshing Finished
9 | Refreshing Failed
10 |
11 |
12 |
--------------------------------------------------------------------------------
/refresh-header/src/test/java/com/scwang/smartrefresh/header/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.header;
2 |
3 | import org.junit.Test;
4 |
5 | import java.text.SimpleDateFormat;
6 | import java.util.Date;
7 | import java.util.Locale;
8 |
9 | import static org.junit.Assert.assertEquals;
10 |
11 | /**
12 | * Example local unit test, which will execute on the development machine (host).
13 | *
14 | * @see Testing documentation
15 | */
16 | public class ExampleUnitTest {
17 | @Test
18 | public void addition_isCorrect() {
19 | System.out.println(new SimpleDateFormat("'Last update' M-d HH:mm", Locale.CHINA).format(new Date()));
20 | assertEquals(4, 2 + 2);
21 | }
22 | }
--------------------------------------------------------------------------------
/refresh-layout-kernel/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | description = 'the kernel of SmartRefreshLayout'
4 |
5 | android {
6 |
7 | compileSdkVersion 34
8 |
9 | defaultConfig {
10 | minSdkVersion 21
11 | targetSdkVersion 34
12 | versionCode 1
13 | versionName SMART_VERSION
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | lintOptions {
24 | abortOnError false
25 | }
26 | }
27 |
28 | dependencies {
29 | implementation fileTree(dir: 'libs', include: ['*.jar'])
30 |
31 | compileOnly 'com.google.android.material:material:1.12.0'
32 |
33 | testImplementation 'junit:junit:4.13.2'
34 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
35 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
36 | }
37 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/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 E:\Android\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 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/androidTest/java/com/scwang/smart/refresh/layout/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
12 |
13 | /**
14 | * Instrumentation 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 |
25 | assertEquals("com.scwang.smart.refresh.layout.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/api/RefreshContent.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.api;
2 |
3 | import android.animation.ValueAnimator.AnimatorUpdateListener;
4 | import android.view.MotionEvent;
5 | import android.view.View;
6 |
7 | import androidx.annotation.NonNull;
8 |
9 | import com.scwang.smart.refresh.layout.listener.ScrollBoundaryDecider;
10 |
11 | /**
12 | * 刷新内容组件
13 | * Created by scwang on 2017/5/26.
14 | */
15 | public interface RefreshContent {
16 |
17 | @NonNull
18 | View getView();
19 | @NonNull
20 | View getScrollableView();
21 |
22 | void onActionDown(MotionEvent e);
23 |
24 | void setUpComponent(RefreshKernel kernel, View fixedHeader, View fixedFooter);
25 | void setScrollBoundaryDecider(ScrollBoundaryDecider boundary);
26 |
27 | void setEnableLoadMoreWhenContentNotFull(boolean enable);
28 |
29 | void moveSpinner(int spinner, int headerTranslationViewId, int footerTranslationViewId);
30 |
31 | boolean canRefresh();
32 | boolean canLoadMore();
33 |
34 | AnimatorUpdateListener scrollContentWhenFinished(int spinner);
35 | }
36 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/api/RefreshFooter.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.api;
2 |
3 |
4 | import androidx.annotation.RestrictTo;
5 |
6 | import static androidx.annotation.RestrictTo.Scope.LIBRARY;
7 | import static androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP;
8 | import static androidx.annotation.RestrictTo.Scope.SUBCLASSES;
9 |
10 | /**
11 | * 刷新底部
12 | * Created by scwang on 2017/5/26.
13 | */
14 | public interface RefreshFooter extends RefreshComponent {
15 |
16 | /**
17 | * 【仅限框架内调用】设置数据全部加载完成,将不能再次触发加载功能
18 | * @param noMoreData 是否有更多数据
19 | * @return true 支持全部加载完成的状态显示 false 不支持
20 | */
21 | // @RestrictTo({LIBRARY,LIBRARY_GROUP,SUBCLASSES})
22 | boolean setNoMoreData(boolean noMoreData);
23 | }
24 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/api/RefreshHeader.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.api;
2 |
3 | /**
4 | * 刷新头部
5 | * Created by scwang on 2017/5/26.
6 | */
7 | public interface RefreshHeader extends RefreshComponent {
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/constant/SpinnerStyle.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.constant;
2 |
3 | /**
4 | * 顶部和底部的组件在拖动时候的变换方式
5 | * Created by scwang on 2017/5/26.
6 | */
7 | @SuppressWarnings("DeprecatedIsStillUsed")
8 | public class SpinnerStyle {
9 |
10 | public static final SpinnerStyle Translate = new SpinnerStyle(0, true, false);
11 | /**
12 | * Scale 下拉过程中会动态 【测量】(header)和 【布局】(layout)降低app 性能,
13 | * 官方自带的 Header 都已经从【Scale】转向【FixedBehind】来提高性能
14 | * 自定义可以参考官方的 【飞机】【贝塞尔】【快递】等 Header
15 | * @deprecated use {@link SpinnerStyle#FixedBehind}
16 | */
17 | @Deprecated
18 | public static final SpinnerStyle Scale = new SpinnerStyle(1, true, true);
19 | public static final SpinnerStyle FixedBehind = new SpinnerStyle(2, false, false);
20 | public static final SpinnerStyle FixedFront = new SpinnerStyle(3, true, false);
21 | public static final SpinnerStyle MatchLayout = new SpinnerStyle(4, true, false);
22 |
23 | public static final SpinnerStyle[] values = new SpinnerStyle[] {
24 | Translate, //平行移动 特点: HeaderView高度不会改变,
25 | Scale, //拉伸形变 特点:在下拉和上弹(HeaderView高度改变)时候,会自动触发OnDraw事件
26 | FixedBehind, //固定在背后 特点:HeaderView高度不会改变,
27 | FixedFront, //固定在前面 特点:HeaderView高度不会改变,
28 | MatchLayout//填满布局 特点:HeaderView高度不会改变,尺寸充满 RefreshLayout
29 | };
30 |
31 | public final int ordinal;
32 | public final boolean front;
33 | public final boolean scale;
34 |
35 | protected SpinnerStyle(int ordinal, boolean front, boolean scale) {
36 | this.ordinal = ordinal;
37 | this.front = front;
38 | this.scale = scale;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/listener/CoordinatorLayoutListener.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.listener;
2 |
3 | public interface CoordinatorLayoutListener {
4 | void onCoordinatorUpdate(boolean enableRefresh, boolean enableLoadMore);
5 | }
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/listener/DefaultRefreshFooterCreator.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.listener;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.annotation.NonNull;
6 |
7 | import com.scwang.smart.refresh.layout.api.RefreshFooter;
8 | import com.scwang.smart.refresh.layout.api.RefreshLayout;
9 |
10 | /**
11 | * 默认Footer创建器
12 | * Created by scwang on 2018/1/26.
13 | */
14 | public interface DefaultRefreshFooterCreator {
15 | @NonNull
16 | RefreshFooter createRefreshFooter(@NonNull Context context, @NonNull RefreshLayout layout);
17 | }
18 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/listener/DefaultRefreshHeaderCreator.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.listener;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.annotation.NonNull;
6 |
7 | import com.scwang.smart.refresh.layout.api.RefreshHeader;
8 | import com.scwang.smart.refresh.layout.api.RefreshLayout;
9 |
10 | /**
11 | * 默认Header创建器
12 | * Created by scwang on 2018/1/26.
13 | */
14 | public interface DefaultRefreshHeaderCreator {
15 | @NonNull
16 | RefreshHeader createRefreshHeader(@NonNull Context context, @NonNull RefreshLayout layout);
17 | }
18 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/listener/DefaultRefreshInitializer.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.listener;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.annotation.NonNull;
6 |
7 | import com.scwang.smart.refresh.layout.api.RefreshLayout;
8 |
9 | /**
10 | * 默认全局初始化器
11 | * Created by scwang on 2018/5/29 0029.
12 | */
13 | public interface DefaultRefreshInitializer {
14 | void initialize(@NonNull Context context, @NonNull RefreshLayout layout);
15 | }
16 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/listener/OnLoadMoreListener.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.listener;
2 |
3 | import androidx.annotation.NonNull;
4 |
5 | import com.scwang.smart.refresh.layout.api.RefreshLayout;
6 |
7 | /**
8 | * 加载更多监听器
9 | * Created by scwang on 2017/5/26.
10 | */
11 | public interface OnLoadMoreListener {
12 | void onLoadMore(@NonNull RefreshLayout refreshLayout);
13 | }
14 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/listener/OnRefreshListener.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.listener;
2 |
3 | import androidx.annotation.NonNull;
4 |
5 | import com.scwang.smart.refresh.layout.api.RefreshLayout;
6 |
7 | /**
8 | * 刷新监听器
9 | * Created by scwang on 2017/5/26.
10 | */
11 | public interface OnRefreshListener {
12 | void onRefresh(@NonNull RefreshLayout refreshLayout);
13 | }
14 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/listener/OnRefreshLoadMoreListener.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.listener;
2 |
3 | /**
4 | * 刷新加载组合监听器
5 | * Created by scwang on 2017/5/26.
6 | */
7 | public interface OnRefreshLoadMoreListener extends OnRefreshListener, OnLoadMoreListener {
8 | }
9 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/listener/OnStateChangedListener.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.listener;
2 |
3 |
4 | import androidx.annotation.NonNull;
5 | import androidx.annotation.RestrictTo;
6 |
7 | import com.scwang.smart.refresh.layout.api.RefreshLayout;
8 | import com.scwang.smart.refresh.layout.constant.RefreshState;
9 |
10 | import static androidx.annotation.RestrictTo.Scope.LIBRARY;
11 | import static androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP;
12 | import static androidx.annotation.RestrictTo.Scope.SUBCLASSES;
13 |
14 |
15 | /**
16 | * 刷新状态改变监听器
17 | * Created by scwang on 2017/5/26.
18 | */
19 | public interface OnStateChangedListener {
20 | /**
21 | * 【仅限框架内调用】状态改变事件 {@link RefreshState}
22 | * @param refreshLayout RefreshLayout
23 | * @param oldState 改变之前的状态
24 | * @param newState 改变之后的状态
25 | */
26 | // @RestrictTo({LIBRARY,LIBRARY_GROUP,SUBCLASSES})
27 | void onStateChanged(@NonNull RefreshLayout refreshLayout, @NonNull RefreshState oldState, @NonNull RefreshState newState);
28 | }
29 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/listener/ScrollBoundaryDecider.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.listener;
2 |
3 | import android.view.View;
4 |
5 | /**
6 | * 滚动边界
7 | * Created by scwang on 2017/7/8.
8 | */
9 | public interface ScrollBoundaryDecider {
10 | /**
11 | * 根据内容视图状态判断是否可以开始下拉刷新
12 | * @param content 内容视图
13 | * @return true 将会触发下拉刷新
14 | */
15 | boolean canRefresh(View content);
16 | /**
17 | * 根据内容视图状态判断是否可以开始上拉加载
18 | * @param content 内容视图
19 | * @return true 将会触发加载更多
20 | */
21 | boolean canLoadMore(View content);
22 | }
23 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/simple/SimpleBoundaryDecider.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.simple;
2 |
3 | import android.graphics.PointF;
4 | import android.view.View;
5 |
6 | import com.scwang.smart.refresh.layout.listener.ScrollBoundaryDecider;
7 | import com.scwang.smart.refresh.layout.util.SmartUtil;
8 |
9 | /**
10 | * 滚动边界
11 | * Created by scwang on 2017/7/8.
12 | */
13 | public class SimpleBoundaryDecider implements ScrollBoundaryDecider {
14 |
15 | //
16 | public PointF mActionEvent;
17 | public ScrollBoundaryDecider boundary;
18 | public boolean mEnableLoadMoreWhenContentNotFull = true;
19 | //
20 |
21 | //
22 | @Override
23 | public boolean canRefresh(View content) {
24 | if (boundary != null) {
25 | return boundary.canRefresh(content);
26 | }
27 | //mActionEvent == null 时 canRefresh 不会动态递归搜索
28 | return SmartUtil.canRefresh(content, mActionEvent);
29 | }
30 |
31 | @Override
32 | public boolean canLoadMore(View content) {
33 | if (boundary != null) {
34 | return boundary.canLoadMore(content);
35 | }
36 | //mActionEvent == null 时 canLoadMore 不会动态递归搜索
37 | return SmartUtil.canLoadMore(content, mActionEvent, mEnableLoadMoreWhenContentNotFull);
38 | }
39 | //
40 | }
41 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/util/DesignUtil.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.util;
2 |
3 | import android.view.View;
4 | import android.view.ViewGroup;
5 |
6 | import androidx.coordinatorlayout.widget.CoordinatorLayout;
7 |
8 | import com.google.android.material.appbar.AppBarLayout;
9 | import com.scwang.smart.refresh.layout.api.RefreshKernel;
10 | import com.scwang.smart.refresh.layout.listener.CoordinatorLayoutListener;
11 |
12 | /**
13 | * Design 兼容包缺省尝试
14 | * Created by scwang on 2018/1/29.
15 | */
16 | public class DesignUtil {
17 |
18 | public static void checkCoordinatorLayout(View content, RefreshKernel kernel, final CoordinatorLayoutListener listener) {
19 | try {//try 不能删除,不然会出现兼容性问题
20 | if (content instanceof CoordinatorLayout) {
21 | kernel.getRefreshLayout().setEnableNestedScroll(false);
22 | ViewGroup layout = (ViewGroup) content;
23 | for (int i = layout.getChildCount() - 1; i >= 0; i--) {
24 | View view = layout.getChildAt(i);
25 | if (view instanceof AppBarLayout) {
26 | ((AppBarLayout) view).addOnOffsetChangedListener((appBarLayout, verticalOffset) -> listener.onCoordinatorUpdate(
27 | verticalOffset >= 0,
28 | (appBarLayout.getTotalScrollRange() + verticalOffset) <= 0));
29 | }
30 | }
31 | }
32 | } catch (Throwable e) {
33 | e.printStackTrace();
34 | }
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/wrapper/RefreshFooterWrapper.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.wrapper;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.view.View;
5 |
6 | import com.scwang.smart.refresh.layout.api.RefreshFooter;
7 | import com.scwang.smart.refresh.layout.simple.SimpleComponent;
8 |
9 | /**
10 | * 刷新底部包装
11 | * Created by scwang on 2017/5/26.
12 | */
13 | @SuppressLint("ViewConstructor")
14 | public class RefreshFooterWrapper extends SimpleComponent implements RefreshFooter {
15 |
16 | public RefreshFooterWrapper(View wrapper) {
17 | super(wrapper);
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/wrapper/RefreshHeaderWrapper.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout.wrapper;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.view.View;
5 |
6 | import com.scwang.smart.refresh.layout.api.RefreshHeader;
7 | import com.scwang.smart.refresh.layout.simple.SimpleComponent;
8 |
9 | /**
10 | * 刷新头部包装
11 | * Created by scwang on 2017/5/26.
12 | */
13 | @SuppressLint("ViewConstructor")
14 | public class RefreshHeaderWrapper extends SimpleComponent implements RefreshHeader {
15 |
16 | public RefreshHeaderWrapper(View wrapper) {
17 | super(wrapper);
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/res/values-zh/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | SmartRefreshLayout中没有找到内容视图。您是否忘记在xml布局文件中添加?
3 | %s 虚假区域\n代表运行时拖动的高度【%.1fdp】 \n而不会显示任何东西
4 |
5 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | The content view in SmartRefreshLayout is empty. Do you forget to add it in xml layout file?
3 | %s falsify area,\n Represents the height[%.1fdp] of drag at run time,\n It does not show anything.
4 |
5 |
--------------------------------------------------------------------------------
/refresh-layout-kernel/src/test/java/com/scwang/smart/refresh/layout/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
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 | }
--------------------------------------------------------------------------------
/refresh-layout/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/refresh-layout/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 |
5 | compileSdkVersion 34
6 |
7 | defaultConfig {
8 | minSdkVersion 21
9 | targetSdkVersion 34
10 | versionCode 1
11 | versionName SMART_VERSION
12 |
13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 | lintOptions {
22 | abortOnError false
23 | }
24 | }
25 |
26 | dependencies {
27 | implementation fileTree(dir: 'libs', include: ['*.jar'])
28 |
29 | compileOnly project(':refresh-layout-kernel')
30 | compileOnly project(':refresh-footer-ball')
31 | compileOnly project(':refresh-header-falsify')
32 | compileOnly project(':refresh-header-radar')
33 | compileOnly project(':refresh-header-two-level')
34 |
35 | // compileOnly 'io.github.scwang90:refresh-layout-kernel:3.0.0-alpha' //核心必须依赖
36 | // compileOnly 'io.github.scwang90:refresh-header-radar:3.0.0-alpha' //雷达刷新头
37 | // compileOnly 'io.github.scwang90:refresh-header-falsify:3.0.0-alpha' //虚拟刷新头
38 | // compileOnly 'io.github.scwang90:refresh-header-two-level:3.0.0-alpha' //二级刷新头
39 | // compileOnly 'io.github.scwang90:refresh-footer-ball:3.0.0-alpha' //球脉冲加载
40 |
41 | compileOnly 'com.google.android.material:material:1.12.0'
42 |
43 | testImplementation 'junit:junit:4.13.2'
44 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
45 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
46 | }
47 |
--------------------------------------------------------------------------------
/refresh-layout/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 E:\Android\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 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/refresh-layout/src/androidTest/java/com/scwang/smart/refresh/layout/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.ext.junit.runners.AndroidJUnit4;
6 | import androidx.test.platform.app.InstrumentationRegistry;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.assertEquals;
12 |
13 | /**
14 | * Instrumentation 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 |
25 | assertEquals("com.scwang.smart.refresh.layout.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/refresh-layout/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/refresh-layout/src/test/java/com/scwang/smart/refresh/layout/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.scwang.smart.refresh.layout;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
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 | }
--------------------------------------------------------------------------------
/secret-rsa.gpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scwang90/SmartRefreshLayout/224db48f8af897a930b810a6b6fc55af8cef0d57/secret-rsa.gpg
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'//, ':app-design'
2 | include ':refresh-layout', ':refresh-header', ':refresh-footer'
3 |
4 | include ':refresh-drawable-paint'
5 | include ':refresh-drawable-path'
6 | include ':refresh-layout-kernel'
7 | include ':refresh-footer-ball'
8 | include ':refresh-footer-classics'
9 | include ':refresh-header-classics'
10 | include ':refresh-header-falsify'
11 | include ':refresh-header-radar'
12 | include ':refresh-header-material'
13 | include ':refresh-header-two-level'
14 |
--------------------------------------------------------------------------------