├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_header.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_left_logo.png │ │ │ │ ├── ic_action_good.png │ │ │ │ ├── ic_drag_handle.png │ │ │ │ ├── ic_right_logo.png │ │ │ │ ├── iconfont_downgrey.png │ │ │ │ └── ic_action_favorite.png │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable │ │ │ │ ├── meituan_iten_header_item_bg.xml │ │ │ │ ├── shape_super_side_bar_bg.xml │ │ │ │ └── xml_oval_half_transparent_bg.xml │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── styles.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── arrays.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── layout │ │ │ │ ├── activity_ad_header_layout.xml │ │ │ │ ├── activity_drag_layout.xml │ │ │ │ ├── activity_layoutmanager_layout.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_swipemenu_layout.xml │ │ │ │ ├── view_header_layout.xml │ │ │ │ ├── activity_item_click_layout.xml │ │ │ │ ├── activity_multi_item_layout.xml │ │ │ │ ├── activity_refresh_load_layout.xml │ │ │ │ ├── view_recycle_empty_view.xml │ │ │ │ ├── view_footer_layout.xml │ │ │ │ ├── adapter_meituan_header_layout.xml │ │ │ │ ├── view_meituan_header_layout.xml │ │ │ │ ├── adapter_swipemenu_layout.xml │ │ │ │ ├── adapter_swipemenu1_layout.xml │ │ │ │ ├── adapter_animation_layout.xml │ │ │ │ ├── adapter_multi_item3_layout.xml │ │ │ │ ├── adapter_header_footer_layout.xml │ │ │ │ ├── activity_animation_layout.xml │ │ │ │ ├── item_swipe_menu1.xml │ │ │ │ ├── adapter_wechat_layout.xml │ │ │ │ ├── item_swipe_menu.xml │ │ │ │ ├── adapter_main_layout.xml │ │ │ │ ├── adapter_manager_layout.xml │ │ │ │ ├── adapter_refresh_load_layout.xml │ │ │ │ ├── activity_wechat_layout.xml │ │ │ │ ├── activity_slide_meituan_layout.xml │ │ │ │ ├── activity_slide_swipe_menu_layout.xml │ │ │ │ ├── adapter_multi_item1_layout.xml │ │ │ │ ├── activity_header_footer_layout.xml │ │ │ │ ├── adapter_item_click_layout.xml │ │ │ │ ├── item_swipe_menu_content.xml │ │ │ │ ├── activity_sidebar_layout.xml │ │ │ │ ├── adapter_draggable_layout.xml │ │ │ │ ├── adapter_multi_item2_layout.xml │ │ │ │ └── adapter_slide_swipe_menu_layout.xml │ │ │ └── menu │ │ │ │ └── main.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── superrecycleview │ │ │ │ └── library │ │ │ │ ├── bean │ │ │ │ ├── MultipleItemBean.java │ │ │ │ └── sidebar │ │ │ │ │ ├── WeChatBean.java │ │ │ │ │ └── MeituanHeaderBean.java │ │ │ │ ├── adapter │ │ │ │ ├── sidebar │ │ │ │ │ ├── HeaderAdapter.java │ │ │ │ │ ├── WeChatAdapter.java │ │ │ │ │ ├── MeiTuanAdapter1.java │ │ │ │ │ ├── SlideSwipeAdapter.java │ │ │ │ │ ├── MeituanHeaderAdapter.java │ │ │ │ │ └── MeiTuanAdapter.java │ │ │ │ ├── AnimationAdapter.java │ │ │ │ ├── MainAdapter.java │ │ │ │ ├── DragAdapter.java │ │ │ │ ├── HeaderFooterAdapter.java │ │ │ │ ├── LayoutMannagerAdapter.java │ │ │ │ ├── RefreshAndLoadMoreAdapter.java │ │ │ │ ├── ItemClickAdapter.java │ │ │ │ ├── MultiItemAdapter.java │ │ │ │ └── SwipeMenuAdapter.java │ │ │ │ ├── utils │ │ │ │ ├── ColorUtil.java │ │ │ │ └── DensityUtil.java │ │ │ │ ├── ui │ │ │ │ ├── SideBarActivity.java │ │ │ │ ├── AnimationActivity.java │ │ │ │ └── RefreshAndLoadMoreActivity.java │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── superrecycleview │ │ │ └── library │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── superrecycleview │ │ └── library │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── superlibrary ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── loading_01.png │ │ │ │ ├── loading_02.png │ │ │ │ ├── loading_03.png │ │ │ │ ├── loading_04.png │ │ │ │ ├── loading_05.png │ │ │ │ ├── loading_06.png │ │ │ │ ├── loading_07.png │ │ │ │ ├── loading_08.png │ │ │ │ ├── loading_09.png │ │ │ │ ├── loading_10.png │ │ │ │ ├── loading_11.png │ │ │ │ ├── loading_12.png │ │ │ │ ├── ic_loading_rotate.png │ │ │ │ ├── ic_pulltorefresh_arrow.png │ │ │ │ └── bga_adapter_divider_bitmap.png │ │ │ ├── drawable │ │ │ │ ├── progressloading.xml │ │ │ │ ├── bga_adapter_divider_shape.xml │ │ │ │ └── progressbar.xml │ │ │ ├── values │ │ │ │ ├── ids.xml │ │ │ │ ├── strings.xml │ │ │ │ └── attrs.xml │ │ │ └── layout │ │ │ │ ├── listview_footer.xml │ │ │ │ └── listview_header.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── superrecycleview │ │ │ └── superlibrary │ │ │ ├── adapter │ │ │ ├── AnimationType.java │ │ │ └── AnimationUtil.java │ │ │ ├── callback │ │ │ ├── ISuspensionInterface.java │ │ │ └── OnItemDragListener.java │ │ │ ├── recycleview │ │ │ ├── BaseRefreshHeader.java │ │ │ ├── progressindicator │ │ │ │ └── indicator │ │ │ │ │ ├── LineSpinFadeLoaderIndicator.java │ │ │ │ │ ├── SemiCircleSpinIndicator.java │ │ │ │ │ ├── LineScalePulseOutIndicator.java │ │ │ │ │ ├── LineScalePulseOutRapidIndicator.java │ │ │ │ │ ├── SquareSpinIndicator.java │ │ │ │ │ ├── BallPulseRiseIndicator.java │ │ │ │ │ ├── TriangleSkewSpinIndicator.java │ │ │ │ │ ├── BallScaleRippleIndicator.java │ │ │ │ │ ├── BallPulseSyncIndicator.java │ │ │ │ │ ├── LineScaleIndicator.java │ │ │ │ │ ├── BallScaleIndicator.java │ │ │ │ │ ├── BallPulseIndicator.java │ │ │ │ │ ├── LineScalePartyIndicator.java │ │ │ │ │ ├── BallRotateIndicator.java │ │ │ │ │ ├── BallClipRotateIndicator.java │ │ │ │ │ ├── BallScaleRippleMultipleIndicator.java │ │ │ │ │ ├── BallGridBeatIndicator.java │ │ │ │ │ ├── BallZigZagDeflectIndicator.java │ │ │ │ │ ├── BaseIndicatorController.java │ │ │ │ │ ├── BallScaleMultipleIndicator.java │ │ │ │ │ ├── BallBeatIndicator.java │ │ │ │ │ ├── BallZigZagIndicator.java │ │ │ │ │ ├── BallClipRotateMultipleIndicator.java │ │ │ │ │ ├── BallClipRotatePulseIndicator.java │ │ │ │ │ ├── BallTrianglePathIndicator.java │ │ │ │ │ └── BallGridPulseIndicator.java │ │ │ ├── AppBarStateChangeListener.java │ │ │ ├── ItemTouchHelperAdapter.java │ │ │ ├── ProgressStyle.java │ │ │ ├── SimpleViewSwitcher.java │ │ │ ├── JellyView.java │ │ │ ├── SimpleItemTouchHelperCallback.java │ │ │ └── LoadingMoreFooter.java │ │ │ └── sidebar │ │ │ ├── bean │ │ │ ├── BaseIndexBean.java │ │ │ └── BaseIndexPinyinBean.java │ │ │ └── helper │ │ │ └── IIndexBarDataHelper.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── superrecycleview │ │ │ └── superlibrary │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── superrecycleview │ │ └── superlibrary │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── gif ├── drag.gif ├── change.gif ├── multitem.gif ├── animation.gif └── swipemenu.gif ├── .idea ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties └── gradlew.bat /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':superlibrary' 2 | -------------------------------------------------------------------------------- /superlibrary/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | *.iml 3 | .idea -------------------------------------------------------------------------------- /gif/drag.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/gif/drag.gif -------------------------------------------------------------------------------- /gif/change.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/gif/change.gif -------------------------------------------------------------------------------- /gif/multitem.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/gif/multitem.gif -------------------------------------------------------------------------------- /gif/animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/gif/animation.gif -------------------------------------------------------------------------------- /gif/swipemenu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/gif/swipemenu.gif -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/app/src/main/res/mipmap-xhdpi/ic_header.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_left_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/app/src/main/res/mipmap-xhdpi/ic_left_logo.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_action_good.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/app/src/main/res/mipmap-xhdpi/ic_action_good.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_drag_handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/app/src/main/res/mipmap-xhdpi/ic_drag_handle.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_right_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/app/src/main/res/mipmap-xhdpi/ic_right_logo.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/iconfont_downgrey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/app/src/main/res/mipmap-xhdpi/iconfont_downgrey.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_action_favorite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/app/src/main/res/mipmap-xhdpi/ic_action_favorite.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/loading_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/loading_01.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/loading_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/loading_02.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/loading_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/loading_03.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/loading_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/loading_04.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/loading_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/loading_05.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/loading_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/loading_06.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/loading_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/loading_07.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/loading_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/loading_08.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/loading_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/loading_09.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/loading_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/loading_10.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/loading_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/loading_11.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/loading_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/loading_12.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/ic_loading_rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/ic_loading_rotate.png -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/ic_pulltorefresh_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/ic_pulltorefresh_arrow.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /superlibrary/src/main/res/mipmap-xhdpi/bga_adapter_divider_bitmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supercwn/SuperRecycleView/HEAD/superlibrary/src/main/res/mipmap-xhdpi/bga_adapter_divider_bitmap.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/meituan_iten_header_item_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_super_side_bar_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /superlibrary/src/main/res/drawable/progressloading.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/xml_oval_half_transparent_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 26 11:38:03 CST 2017 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-3.3-all.zip 7 | -------------------------------------------------------------------------------- /superlibrary/src/main/res/drawable/bga_adapter_divider_shape.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /superlibrary/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/adapter/AnimationType.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary.adapter; 2 | 3 | /** 4 | * Created by super南仔 on 07/28/16. 5 | * blog: http://supercwn.github.io/ 6 | * GitHub: https://github.com/supercwn 7 | */ 8 | public enum AnimationType { 9 | ALPHA, SCALE, SLIDE_FROM_BOTTOM, SLIDE_FROM_LEFT, SLIDE_FROM_RIGHT 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /superlibrary/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/test/java/com/superrecycleview/library/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.library; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | SuperRecycleView 3 | 4 | Alpha 5 | Scale 6 | Slide from left 7 | Slide from right 8 | GitHub 9 | Slide from bottom 10 | 11 | -------------------------------------------------------------------------------- /superlibrary/src/test/java/com/superrecycleview/superlibrary/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/callback/ISuspensionInterface.java: -------------------------------------------------------------------------------- 1 | 2 | package com.superrecycleview.superlibrary.callback; 3 | 4 | /** 5 | * 介绍:分类悬停的接口 作者:zhangxutong 邮箱:mcxtzhang@163.com 6 | * 主页:http://blog.csdn.net/zxt0601 时间: 2016/11/7. 7 | */ 8 | 9 | public interface ISuspensionInterface { 10 | // 是否需要显示悬停title 11 | boolean isShowSuspension(); 12 | 13 | // 悬停的title 14 | String getSuspensionTag(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | #ffffff 8 | #00000000 9 | #8f000000 10 | #f27242 11 | 12 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/superrecycleview/library/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.library; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_ad_header_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/recycleview/BaseRefreshHeader.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary.recycleview; 2 | 3 | /** 4 | * Created by Jack on 2015/10/19. 5 | */ 6 | interface BaseRefreshHeader { 7 | 8 | int STATE_NORMAL = 0; 9 | int STATE_RELEASE_TO_REFRESH = 1; 10 | int STATE_REFRESHING = 2; 11 | int STATE_DONE = 3; 12 | 13 | void onMove(float delta); 14 | 15 | boolean releaseAction(); 16 | 17 | void refreshComplete(); 18 | 19 | } -------------------------------------------------------------------------------- /superlibrary/src/androidTest/java/com/superrecycleview/superlibrary/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_drag_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_layoutmanager_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_swipemenu_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /superlibrary/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | SuperLibrary 3 | 4 | 下拉刷新 5 | 释放立即刷新 6 | 正在加载 7 | 没有了 8 | 正在刷新 9 | 刷新完成 10 | 上次更新时间: 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_header_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_item_click_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_multi_item_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_refresh_load_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_recycle_empty_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_footer_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_meituan_header_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_meituan_header_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_swipemenu_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_swipemenu1_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/callback/OnItemDragListener.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary.callback; 2 | 3 | import android.support.v7.widget.RecyclerView; 4 | 5 | /** 6 | * Created by super南仔 on 07/28/16. 7 | * blog: http://supercwn.github.io/ 8 | * GitHub: https://github.com/supercwn 9 | */ 10 | public interface OnItemDragListener { 11 | void onItemDragStart(RecyclerView.ViewHolder viewHolder, int pos); 12 | void onItemDragMoving(RecyclerView.ViewHolder source, int from, RecyclerView.ViewHolder target, int to); 13 | void onItemDragEnd(RecyclerView.ViewHolder viewHolder, int pos); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /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 D:\android_sdk\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 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_animation_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /superlibrary/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 D:\android_sdk\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 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /superlibrary/src/main/res/layout/listview_footer.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 13 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_multi_item3_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_header_footer_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/bean/MultipleItemBean.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.library.bean; 2 | 3 | /** 4 | * Created by super南仔 on 07/28/16. 5 | * blog: http://supercwn.github.io/ 6 | * GitHub: https://github.com/supercwn 7 | */ 8 | public class MultipleItemBean { 9 | 10 | private int type; 11 | private String name; 12 | private String info; 13 | 14 | public int getType() { 15 | return type; 16 | } 17 | 18 | public void setType(int type) { 19 | this.type = type; 20 | } 21 | 22 | public String getName() { 23 | return name; 24 | } 25 | 26 | public void setName(String name) { 27 | this.name = name; 28 | } 29 | 30 | public String getInfo() { 31 | return info; 32 | } 33 | 34 | public void setInfo(String info) { 35 | this.info = info; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_animation_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | ## Project-wide Gradle settings. 2 | # 3 | # For more details on how to configure your build environment visit 4 | # http://www.gradle.org/docs/current/userguide/build_environment.html 5 | # 6 | # Specifies the JVM arguments used for the daemon process. 7 | # The setting is particularly useful for tweaking memory settings. 8 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 9 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 10 | # 11 | # When configured, Gradle will run in incubating parallel mode. 12 | # This option should only be used with decoupled projects. More details, visit 13 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 14 | # org.gradle.parallel=true 15 | #Fri Jul 29 10:11:41 CST 2016 16 | systemProp.http.proxyHost=121.199.4.166 17 | systemProp.http.proxyPort=7000 18 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 24 5 | buildToolsVersion '25.0.0' 6 | 7 | defaultConfig { 8 | applicationId "com.superrecycleview.library" 9 | minSdkVersion 14 10 | targetSdkVersion 24 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | testCompile 'junit:junit:4.12' 25 | compile 'com.android.support:appcompat-v7:24.1.0' 26 | compile 'com.android.support:cardview-v7:24.1.0' 27 | compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.15' 28 | compile project(':superlibrary') 29 | } 30 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/sidebar/bean/BaseIndexBean.java: -------------------------------------------------------------------------------- 1 | 2 | package com.superrecycleview.superlibrary.sidebar.bean; 3 | 4 | import com.superrecycleview.superlibrary.callback.ISuspensionInterface; 5 | 6 | /** 7 | * 介绍:索引类的标志位的实体基类 作者:zhangxutong 邮箱:mcxtzhang@163.com 8 | * CSDN:http://blog.csdn.net/zxt0601 时间: 16/09/04. 9 | */ 10 | 11 | public abstract class BaseIndexBean implements ISuspensionInterface { 12 | private String baseIndexTag;// 所属的分类(城市的汉语拼音首字母) 13 | 14 | public String getBaseIndexTag() { 15 | return baseIndexTag; 16 | } 17 | 18 | public BaseIndexBean setBaseIndexTag(String baseIndexTag) { 19 | this.baseIndexTag = baseIndexTag; 20 | return this; 21 | } 22 | 23 | @Override 24 | public String getSuspensionTag() { 25 | return baseIndexTag; 26 | } 27 | 28 | @Override 29 | public boolean isShowSuspension() { 30 | return true; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/sidebar/bean/BaseIndexPinyinBean.java: -------------------------------------------------------------------------------- 1 | 2 | package com.superrecycleview.superlibrary.sidebar.bean; 3 | 4 | /** 5 | * 介绍:索引类的汉语拼音的接口 作者:zhangxutong 邮箱:mcxtzhang@163.com 6 | * CSDN:http://blog.csdn.net/zxt0601 时间: 16/09/04. 7 | */ 8 | 9 | public abstract class BaseIndexPinyinBean extends BaseIndexBean { 10 | private String baseIndexPinyin;// 城市的拼音 11 | 12 | public String getBaseIndexPinyin() { 13 | return baseIndexPinyin; 14 | } 15 | 16 | public BaseIndexPinyinBean setBaseIndexPinyin(String baseIndexPinyin) { 17 | this.baseIndexPinyin = baseIndexPinyin; 18 | return this; 19 | } 20 | 21 | // 是否需要被转化成拼音, 类似微信头部那种就不需要 美团的也不需要 22 | // 微信的头部 不需要显示索引 23 | // 美团的头部 索引自定义 24 | // 默认应该是需要的 25 | public boolean isNeedToPinyin() { 26 | return true; 27 | } 28 | 29 | // 需要转化成拼音的目标字段 30 | public abstract String getTarget(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/adapter/sidebar/HeaderAdapter.java: -------------------------------------------------------------------------------- 1 | 2 | package com.superrecycleview.library.adapter.sidebar; 3 | 4 | import android.content.Context; 5 | 6 | import com.superrecycleview.library.R; 7 | import com.superrecycleview.superlibrary.adapter.BaseViewHolder; 8 | import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * Created by super南仔 on 2017-05-09. 类备注: 需要传入的参数: 14 | */ 15 | public class HeaderAdapter extends SuperBaseAdapter { 16 | 17 | public HeaderAdapter(Context context, List data) { 18 | super(context, data); 19 | } 20 | 21 | @Override 22 | protected void convert(BaseViewHolder holder, String item, int position) { 23 | holder.setText(R.id.tvName, item); 24 | } 25 | 26 | @Override 27 | protected int getItemViewLayoutId(int position, String item) { 28 | return R.layout.adapter_meituan_header_layout; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/adapter/AnimationAdapter.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.library.adapter; 2 | 3 | 4 | import android.content.Context; 5 | 6 | import com.superrecycleview.library.R; 7 | import com.superrecycleview.superlibrary.adapter.BaseViewHolder; 8 | import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * Created by super南仔 on 07/28/16. 14 | * blog: http://supercwn.github.io/ 15 | * GitHub: https://github.com/supercwn 16 | */ 17 | public class AnimationAdapter extends SuperBaseAdapter { 18 | 19 | 20 | public AnimationAdapter(Context context, List data) { 21 | super(context, data); 22 | } 23 | 24 | @Override 25 | protected void convert(BaseViewHolder holder, String item, int position) { 26 | 27 | } 28 | 29 | @Override 30 | protected int getItemViewLayoutId(int position, String item) { 31 | return R.layout.adapter_animation_layout; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/adapter/MainAdapter.java: -------------------------------------------------------------------------------- 1 | 2 | package com.superrecycleview.library.adapter; 3 | 4 | import android.content.Context; 5 | 6 | import com.superrecycleview.library.R; 7 | import com.superrecycleview.superlibrary.adapter.BaseViewHolder; 8 | import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * Created by super南仔 on 07/28/16. blog: http://supercwn.github.io/ GitHub: 14 | * https://github.com/supercwn 15 | */ 16 | public class MainAdapter extends SuperBaseAdapter { 17 | 18 | public MainAdapter(Context context, List data) { 19 | super(context, data); 20 | } 21 | 22 | @Override 23 | protected void convert(BaseViewHolder holder, String item, int position) { 24 | holder.setText(R.id.info_text, item); 25 | } 26 | 27 | @Override 28 | protected int getItemViewLayoutId(int position, String item) { 29 | return R.layout.adapter_main_layout; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/adapter/DragAdapter.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.library.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.superrecycleview.library.R; 6 | import com.superrecycleview.superlibrary.adapter.BaseViewHolder; 7 | import com.superrecycleview.superlibrary.adapter.SuperBaseDragAdapter; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * Created by super南仔 on 07/28/16. 13 | * blog: http://supercwn.github.io/ 14 | * GitHub: https://github.com/supercwn 15 | */ 16 | public class DragAdapter extends SuperBaseDragAdapter { 17 | public DragAdapter(Context context, List data) { 18 | super(context, data); 19 | } 20 | 21 | @Override 22 | protected void convert(BaseViewHolder holder, String item, int position) { 23 | holder.setText(R.id.tv,item); 24 | } 25 | 26 | @Override 27 | protected int getItemViewLayoutId(int position, String item) { 28 | return R.layout.adapter_draggable_layout; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_swipe_menu1.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 16 | 17 | 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/adapter/HeaderFooterAdapter.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.library.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.superrecycleview.library.R; 6 | import com.superrecycleview.superlibrary.adapter.BaseViewHolder; 7 | import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * Created by super南仔 on 07/28/16. 13 | * blog: http://supercwn.github.io/ 14 | * GitHub: https://github.com/supercwn 15 | */ 16 | public class HeaderFooterAdapter extends SuperBaseAdapter { 17 | 18 | public HeaderFooterAdapter(Context context, List data) { 19 | super(context, data); 20 | } 21 | 22 | @Override 23 | protected void convert(BaseViewHolder holder, String item, int position) { 24 | holder.setText(R.id.tv_info,item); 25 | } 26 | 27 | @Override 28 | protected int getItemViewLayoutId(int position, String item) { 29 | return R.layout.adapter_header_footer_layout; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/adapter/LayoutMannagerAdapter.java: -------------------------------------------------------------------------------- 1 | 2 | package com.superrecycleview.library.adapter; 3 | 4 | import android.content.Context; 5 | 6 | import com.superrecycleview.library.R; 7 | import com.superrecycleview.superlibrary.adapter.BaseViewHolder; 8 | import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * Created by super南仔 on 07/28/16. blog: http://supercwn.github.io/ GitHub: 14 | * https://github.com/supercwn 15 | */ 16 | public class LayoutMannagerAdapter extends SuperBaseAdapter { 17 | 18 | public LayoutMannagerAdapter(Context context, List data) { 19 | super(context, data); 20 | } 21 | 22 | @Override 23 | protected void convert(BaseViewHolder holder, String item, int position) { 24 | holder.setText(R.id.info_text, item); 25 | } 26 | 27 | @Override 28 | protected int getItemViewLayoutId(int position, String item) { 29 | return R.layout.adapter_manager_layout; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/sidebar/helper/IIndexBarDataHelper.java: -------------------------------------------------------------------------------- 1 | 2 | package com.superrecycleview.superlibrary.sidebar.helper; 3 | 4 | import com.superrecycleview.superlibrary.sidebar.bean.BaseIndexPinyinBean; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 介绍:IndexBar 的 数据相关帮助类 1 将汉语转成拼音 2 填充indexTag 3 排序源数据源 4 10 | * 根据排序后的源数据源->indexBar的数据源 作者:zhangxutong 邮箱:mcxtzhang@163.com 11 | * 主页:http://blog.csdn.net/zxt0601 时间: 2016/11/28. 12 | */ 13 | 14 | public interface IIndexBarDataHelper { 15 | // 汉语-》拼音 16 | IIndexBarDataHelper convert(List data); 17 | 18 | // 拼音->tag 19 | IIndexBarDataHelper fillInexTag(List data); 20 | 21 | // 对源数据进行排序(RecyclerView) 22 | IIndexBarDataHelper sortSourceDatas(List datas); 23 | 24 | // 对IndexBar的数据源进行排序(右侧栏),在 sortSourceDatas 方法后调用 25 | IIndexBarDataHelper getSortedIndexDatas(List sourceDatas, 26 | List datas); 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/adapter/RefreshAndLoadMoreAdapter.java: -------------------------------------------------------------------------------- 1 | 2 | package com.superrecycleview.library.adapter; 3 | 4 | import android.content.Context; 5 | 6 | import com.superrecycleview.library.R; 7 | import com.superrecycleview.superlibrary.adapter.BaseViewHolder; 8 | import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * Created by super南仔 on 07/28/16. blog: http://supercwn.github.io/ GitHub: 14 | * https://github.com/supercwn 15 | */ 16 | public class RefreshAndLoadMoreAdapter extends SuperBaseAdapter { 17 | 18 | public RefreshAndLoadMoreAdapter(Context context, List data) { 19 | super(context, data); 20 | } 21 | 22 | @Override 23 | protected void convert(BaseViewHolder holder, String item, int position) { 24 | holder.setText(R.id.info_text, item); 25 | } 26 | 27 | @Override 28 | protected int getItemViewLayoutId(int position, String item) { 29 | return R.layout.adapter_refresh_load_layout; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/adapter/sidebar/WeChatAdapter.java: -------------------------------------------------------------------------------- 1 | 2 | package com.superrecycleview.library.adapter.sidebar; 3 | 4 | import android.content.Context; 5 | 6 | import com.superrecycleview.library.R; 7 | import com.superrecycleview.library.bean.sidebar.WeChatBean; 8 | import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * Created by super南仔 on 2017-05-04. 类备注: 需要传入的参数: 14 | */ 15 | public class WeChatAdapter extends SuperBaseAdapter { 16 | 17 | public WeChatAdapter(Context context, List data) { 18 | super(context, data); 19 | } 20 | 21 | @Override 22 | protected void convert(com.superrecycleview.superlibrary.adapter.BaseViewHolder holder, 23 | WeChatBean item, int position) { 24 | holder.setText(R.id.super_tv_name, item.getName()); 25 | } 26 | 27 | @Override 28 | protected int getItemViewLayoutId(int position, WeChatBean item) { 29 | return R.layout.adapter_wechat_layout; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/bean/sidebar/WeChatBean.java: -------------------------------------------------------------------------------- 1 | 2 | package com.superrecycleview.library.bean.sidebar; 3 | 4 | import com.superrecycleview.superlibrary.sidebar.bean.BaseIndexPinyinBean; 5 | 6 | /** 7 | * Created by super南仔 on 2017-05-04. 类备注: 需要传入的参数: 8 | */ 9 | public class WeChatBean extends BaseIndexPinyinBean { 10 | 11 | private String name;// 城市的名称 12 | private boolean isTop;// 是否是最上面 不需要被转化成拼音 13 | 14 | public String getName() { 15 | return name; 16 | } 17 | 18 | public void setName(String name) { 19 | this.name = name; 20 | } 21 | 22 | public boolean isTop() { 23 | return isTop; 24 | } 25 | 26 | public void setTop(boolean top) { 27 | isTop = top; 28 | } 29 | 30 | @Override 31 | public String getTarget() { 32 | return name; 33 | } 34 | 35 | @Override 36 | public boolean isNeedToPinyin() { 37 | return !isTop; 38 | } 39 | 40 | @Override 41 | public boolean isShowSuspension() { 42 | return !isTop; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/adapter/sidebar/MeiTuanAdapter1.java: -------------------------------------------------------------------------------- 1 | 2 | package com.superrecycleview.library.adapter.sidebar; 3 | 4 | import android.content.Context; 5 | 6 | import com.superrecycleview.library.R; 7 | import com.superrecycleview.library.bean.sidebar.WeChatBean; 8 | import com.superrecycleview.superlibrary.adapter.BaseViewHolder; 9 | import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | * Created by super南仔 on 2017-05-09. 类备注: 需要传入的参数: 15 | */ 16 | public class MeiTuanAdapter1 extends SuperBaseAdapter { 17 | 18 | public MeiTuanAdapter1(Context context, List data) { 19 | super(context, data); 20 | } 21 | 22 | @Override 23 | protected void convert(BaseViewHolder holder, WeChatBean item, int position) { 24 | holder.setText(R.id.super_tv_name, item.getName()); 25 | } 26 | 27 | @Override 28 | protected int getItemViewLayoutId(int position, WeChatBean item) { 29 | return R.layout.adapter_wechat_layout; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | -------------------------------------------------------------------------------- /superlibrary/src/main/res/drawable/progressbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/recycleview/progressindicator/indicator/LineSpinFadeLoaderIndicator.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary.recycleview.progressindicator.indicator; 2 | 3 | import android.graphics.Canvas; 4 | import android.graphics.Paint; 5 | import android.graphics.RectF; 6 | 7 | /** 8 | * Created by Jack on 2015/10/19. 9 | */ 10 | public class LineSpinFadeLoaderIndicator extends BallSpinFadeLoaderIndicator { 11 | 12 | 13 | @Override 14 | public void draw(Canvas canvas, Paint paint) { 15 | float radius=getWidth()/10; 16 | for (int i = 0; i < 8; i++) { 17 | canvas.save(); 18 | Point point=circleAt(getWidth(),getHeight(),getWidth()/2.5f-radius,i*(Math.PI/4)); 19 | canvas.translate(point.x, point.y); 20 | canvas.scale(scaleFloats[i], scaleFloats[i]); 21 | canvas.rotate(i*45); 22 | paint.setAlpha(alphas[i]); 23 | RectF rectF=new RectF(-radius,-radius/1.5f,1.5f*radius,radius/1.5f); 24 | canvas.drawRoundRect(rectF,5,5,paint); 25 | canvas.restore(); 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_wechat_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 17 | 22 | 23 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_swipe_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 19 | 31 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/recycleview/progressindicator/indicator/SemiCircleSpinIndicator.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary.recycleview.progressindicator.indicator; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.graphics.Canvas; 6 | import android.graphics.Paint; 7 | import android.graphics.RectF; 8 | 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | 12 | /** 13 | * Created by Jack on 2015/10/19. 14 | */ 15 | public class SemiCircleSpinIndicator extends BaseIndicatorController { 16 | 17 | 18 | @Override 19 | public void draw(Canvas canvas, Paint paint) { 20 | RectF rectF=new RectF(0,0,getWidth(),getHeight()); 21 | canvas.drawArc(rectF,-60,120,false,paint); 22 | } 23 | 24 | @Override 25 | public List createAnimation() { 26 | List animators=new ArrayList<>(); 27 | ObjectAnimator rotateAnim= ObjectAnimator.ofFloat(getTarget(),"rotation",0,180,360); 28 | rotateAnim.setDuration(600); 29 | rotateAnim.setRepeatCount(-1); 30 | rotateAnim.start(); 31 | animators.add(rotateAnim); 32 | return animators; 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_main_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_manager_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_refresh_load_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/adapter/ItemClickAdapter.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.library.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.superrecycleview.library.R; 6 | import com.superrecycleview.library.bean.MultipleItemBean; 7 | import com.superrecycleview.superlibrary.adapter.BaseViewHolder; 8 | import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * Created by super南仔 on 07/28/16. 14 | * blog: http://supercwn.github.io/ 15 | * GitHub: https://github.com/supercwn 16 | */ 17 | public class ItemClickAdapter extends SuperBaseAdapter { 18 | 19 | public ItemClickAdapter(Context context, List data) { 20 | super(context, data); 21 | } 22 | 23 | @Override 24 | protected void convert(BaseViewHolder holder, MultipleItemBean item, int position) { 25 | holder.setText(R.id.name_tv,item.getName()) 26 | .setOnClickListener(R.id.name_tv,new OnItemChildClickListener()) 27 | .setOnLongClickListener(R.id.image_iv,new OnItemChildLongClickListener()); 28 | } 29 | 30 | @Override 31 | protected int getItemViewLayoutId(int position, MultipleItemBean item) { 32 | return R.layout.adapter_item_click_layout; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_wechat_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 19 | 20 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_slide_meituan_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 19 | 20 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 广东 6 | 北京 7 | 福建 8 | 浙江 9 | 山东 10 | 江苏 11 | 河南 12 | 安徽 13 | 123 14 | 重庆 15 | 湖北 16 | 湖南 17 | 河北 18 | 四川 19 | 天津 20 | 吉林 21 | 黑龙江 22 | 江西 23 | 辽宁 24 | 内蒙古 25 | 宁夏 26 | 青海 27 | 山西 28 | 陕西 29 | 上海 30 | 新疆 31 | 西藏 32 | 云南 33 | 甘肃 34 | 贵州 35 | 广西 36 | 海南 37 | 38 | A 39 | a 40 | b 41 | d 42 | 43 | .a 44 | ;b 45 | #c 46 | d 47 | 48 | ab 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_slide_swipe_menu_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 19 | 20 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/recycleview/AppBarStateChangeListener.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary.recycleview; 2 | 3 | import android.support.design.widget.AppBarLayout; 4 | 5 | /** 6 | * Created by Jack on 2015/10/19. 7 | */ 8 | public abstract class AppBarStateChangeListener implements AppBarLayout.OnOffsetChangedListener { 9 | 10 | public enum State { 11 | EXPANDED, 12 | COLLAPSED, 13 | IDLE 14 | } 15 | 16 | private State mCurrentState = State.IDLE; 17 | 18 | @Override 19 | public final void onOffsetChanged(AppBarLayout appBarLayout, int i) { 20 | if (i == 0) { 21 | if (mCurrentState != State.EXPANDED) { 22 | onStateChanged(appBarLayout, State.EXPANDED); 23 | } 24 | mCurrentState = State.EXPANDED; 25 | } else if (Math.abs(i) >= appBarLayout.getTotalScrollRange()) { 26 | if (mCurrentState != State.COLLAPSED) { 27 | onStateChanged(appBarLayout, State.COLLAPSED); 28 | } 29 | mCurrentState = State.COLLAPSED; 30 | } else { 31 | if (mCurrentState != State.IDLE) { 32 | onStateChanged(appBarLayout, State.IDLE); 33 | } 34 | mCurrentState = State.IDLE; 35 | } 36 | } 37 | public abstract void onStateChanged(AppBarLayout appBarLayout, State state); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/recycleview/progressindicator/indicator/LineScalePulseOutIndicator.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary.recycleview.progressindicator.indicator; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ValueAnimator; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | /** 10 | * Created by Jack on 2015/10/19. 11 | */ 12 | public class LineScalePulseOutIndicator extends LineScaleIndicator { 13 | 14 | @Override 15 | public List createAnimation() { 16 | List animators=new ArrayList<>(); 17 | long[] delays=new long[]{500,250,0,250,500}; 18 | for (int i = 0; i < 5; i++) { 19 | final int index=i; 20 | ValueAnimator scaleAnim= ValueAnimator.ofFloat(1,0.3f,1); 21 | scaleAnim.setDuration(900); 22 | scaleAnim.setRepeatCount(-1); 23 | scaleAnim.setStartDelay(delays[i]); 24 | scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { 25 | @Override 26 | public void onAnimationUpdate(ValueAnimator animation) { 27 | scaleYFloats[index] = (float) animation.getAnimatedValue(); 28 | postInvalidate(); 29 | } 30 | }); 31 | scaleAnim.start(); 32 | animators.add(scaleAnim); 33 | } 34 | return animators; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/recycleview/progressindicator/indicator/LineScalePulseOutRapidIndicator.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary.recycleview.progressindicator.indicator; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ValueAnimator; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | /** 10 | * Created by Jack on 2015/10/19. 11 | */ 12 | public class LineScalePulseOutRapidIndicator extends LineScaleIndicator { 13 | 14 | @Override 15 | public List createAnimation() { 16 | List animators=new ArrayList<>(); 17 | long[] delays=new long[]{400,200,0,200,400}; 18 | for (int i = 0; i < 5; i++) { 19 | final int index=i; 20 | ValueAnimator scaleAnim= ValueAnimator.ofFloat(1,0.4f,1); 21 | scaleAnim.setDuration(1000); 22 | scaleAnim.setRepeatCount(-1); 23 | scaleAnim.setStartDelay(delays[i]); 24 | scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { 25 | @Override 26 | public void onAnimationUpdate(ValueAnimator animation) { 27 | scaleYFloats[index] = (float) animation.getAnimatedValue(); 28 | postInvalidate(); 29 | } 30 | }); 31 | scaleAnim.start(); 32 | animators.add(scaleAnim); 33 | } 34 | return animators; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/adapter/sidebar/SlideSwipeAdapter.java: -------------------------------------------------------------------------------- 1 | 2 | package com.superrecycleview.library.adapter.sidebar; 3 | 4 | import android.content.Context; 5 | 6 | import com.superrecycleview.library.R; 7 | import com.superrecycleview.library.bean.sidebar.WeChatBean; 8 | import com.superrecycleview.superlibrary.adapter.BaseViewHolder; 9 | import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter; 10 | import com.superrecycleview.superlibrary.recycleview.swipemenu.SuperSwipeMenuLayout; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | * Created by super南仔 on 2017-05-04. 类备注: 需要传入的参数: 16 | */ 17 | public class SlideSwipeAdapter extends SuperBaseAdapter { 18 | 19 | public SlideSwipeAdapter(Context context, List data) { 20 | super(context, data); 21 | } 22 | 23 | @Override 24 | protected void convert(BaseViewHolder holder, WeChatBean item, int position) { 25 | holder.setIsRecyclable(false);// 关闭Adapter的复用 26 | final SuperSwipeMenuLayout superSwipeMenuLayout = (SuperSwipeMenuLayout) holder.itemView; 27 | superSwipeMenuLayout.setSwipeEnable(true);// 设置是否可以侧滑 28 | holder.setText(R.id.super_tv_name, item.getName()).setOnClickListener(R.id.btnDel, 29 | new OnItemChildClickListener()); 30 | } 31 | 32 | @Override 33 | protected int getItemViewLayoutId(int position, WeChatBean item) { 34 | return R.layout.adapter_slide_swipe_menu_layout; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_multi_item1_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 20 | 21 | 28 | 29 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/utils/ColorUtil.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.library.utils; 2 | 3 | import android.content.Context; 4 | 5 | /** 6 | * Created by sunfusheng on 16/4/22. 7 | */ 8 | public class ColorUtil { 9 | 10 | 11 | // 成新的颜色值 12 | public static int getNewColorByStartEndColor(Context context, float fraction, int startValue, int endValue) { 13 | return evaluate(fraction, context.getResources().getColor(startValue), context.getResources().getColor(endValue)); 14 | } 15 | /** 16 | * 成新的颜色值 17 | * @param fraction 颜色取值的级别 (0.0f ~ 1.0f) 18 | * @param startValue 开始显示的颜色 19 | * @param endValue 结束显示的颜色 20 | * @return 返回生成新的颜色值 21 | */ 22 | public static int evaluate(float fraction, int startValue, int endValue) { 23 | int startA = (startValue >> 24) & 0xff; 24 | int startR = (startValue >> 16) & 0xff; 25 | int startG = (startValue >> 8) & 0xff; 26 | int startB = startValue & 0xff; 27 | 28 | int endA = (endValue >> 24) & 0xff; 29 | int endR = (endValue >> 16) & 0xff; 30 | int endG = (endValue >> 8) & 0xff; 31 | int endB = endValue & 0xff; 32 | 33 | return ((startA + (int) (fraction * (endA - startA))) << 24) | 34 | ((startR + (int) (fraction * (endR - startR))) << 16) | 35 | ((startG + (int) (fraction * (endG - startG))) << 8) | 36 | ((startB + (int) (fraction * (endB - startB)))); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_header_footer_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 21 | 29 | 30 | 31 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_item_click_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 21 | 22 | 29 | 30 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_swipe_menu_content.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 21 | 22 | 29 | 30 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/bean/sidebar/MeituanHeaderBean.java: -------------------------------------------------------------------------------- 1 | 2 | package com.superrecycleview.library.bean.sidebar; 3 | 4 | import com.superrecycleview.superlibrary.sidebar.bean.BaseIndexPinyinBean; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by super南仔 on 2017-05-09. 类备注:仿美团城市列表 HeaderView Bean
10 | * 需要传入的参数: 11 | */ 12 | public class MeituanHeaderBean extends BaseIndexPinyinBean { 13 | 14 | private List cityList; 15 | // 悬停ItemDecoration显示的Tag 16 | private String suspensionTag; 17 | 18 | public MeituanHeaderBean() { 19 | } 20 | 21 | public MeituanHeaderBean(List cityList, String suspensionTag, String indexBarTag) { 22 | this.cityList = cityList; 23 | this.suspensionTag = suspensionTag; 24 | this.setBaseIndexTag(indexBarTag); 25 | } 26 | 27 | public List getCityList() { 28 | return cityList; 29 | } 30 | 31 | public MeituanHeaderBean setCityList(List cityList) { 32 | this.cityList = cityList; 33 | return this; 34 | } 35 | 36 | public MeituanHeaderBean setSuspensionTag(String suspensionTag) { 37 | this.suspensionTag = suspensionTag; 38 | return this; 39 | } 40 | 41 | @Override 42 | public String getTarget() { 43 | return null; 44 | } 45 | 46 | @Override 47 | public boolean isNeedToPinyin() { 48 | return false; 49 | } 50 | 51 | @Override 52 | public String getSuspensionTag() { 53 | return suspensionTag; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/recycleview/progressindicator/indicator/SquareSpinIndicator.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary.recycleview.progressindicator.indicator; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.animation.PropertyValuesHolder; 6 | import android.graphics.Canvas; 7 | import android.graphics.Paint; 8 | import android.graphics.RectF; 9 | import android.view.animation.LinearInterpolator; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | /** 15 | * Created by Jack on 2015/10/19. 16 | */ 17 | public class SquareSpinIndicator extends BaseIndicatorController { 18 | 19 | @Override 20 | public void draw(Canvas canvas, Paint paint) { 21 | canvas.drawRect(new RectF(getWidth()/5,getHeight()/5,getWidth()*4/5,getHeight()*4/5),paint); 22 | } 23 | 24 | @Override 25 | public List createAnimation() { 26 | List animators=new ArrayList<>(); 27 | PropertyValuesHolder rotation5= PropertyValuesHolder.ofFloat("rotationX",0,180,180,0,0); 28 | PropertyValuesHolder rotation6= PropertyValuesHolder.ofFloat("rotationY",0,0,180,180,0); 29 | ObjectAnimator animator= ObjectAnimator.ofPropertyValuesHolder(getTarget(), rotation6,rotation5); 30 | animator.setInterpolator(new LinearInterpolator()); 31 | animator.setRepeatCount(-1); 32 | animator.setDuration(2500); 33 | animator.start(); 34 | animators.add(animator); 35 | return animators; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/adapter/MultiItemAdapter.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.library.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.superrecycleview.library.R; 6 | import com.superrecycleview.library.bean.MultipleItemBean; 7 | import com.superrecycleview.superlibrary.adapter.BaseViewHolder; 8 | import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * Created by super南仔 on 07/28/16. 14 | * blog: http://supercwn.github.io/ 15 | * GitHub: https://github.com/supercwn 16 | */ 17 | public class MultiItemAdapter extends SuperBaseAdapter { 18 | 19 | public MultiItemAdapter(Context context, List data) { 20 | super(context, data); 21 | } 22 | 23 | @Override 24 | protected void convert(BaseViewHolder holder, MultipleItemBean item, int position) { 25 | if(item.getType() == 0){ 26 | holder.setText(R.id.name_tv,item.getName()); 27 | } else if(item.getType() == 1){ 28 | holder.setText(R.id.name_tv,item.getName()) 29 | .setText(R.id.info_tv,item.getInfo()); 30 | } 31 | } 32 | 33 | @Override 34 | protected int getItemViewLayoutId(int position, MultipleItemBean item) { 35 | if(item.getType() == 0){ 36 | return R.layout.adapter_multi_item1_layout; 37 | } else if(item.getType() == 1){ 38 | return R.layout.adapter_multi_item2_layout; 39 | } else{ 40 | return R.layout.adapter_multi_item3_layout; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/recycleview/ItemTouchHelperAdapter.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary.recycleview; 2 | 3 | import android.support.v7.widget.RecyclerView; 4 | 5 | /** 6 | * Created by Jack on 2015/10/19. 7 | */ 8 | public interface ItemTouchHelperAdapter { 9 | 10 | /** 11 | * Called when an item has been dragged far enough to trigger a move. This is called every time 12 | * an item is shifted, and not at the end of a "drop" event.
13 | *
14 | * Implementations should call {@link RecyclerView.Adapter#notifyItemMoved(int, int)} after 15 | * adjusting the underlying data to reflect this move. 16 | * 17 | * @param fromPosition The start position of the moved item. 18 | * @param toPosition Then resolved position of the moved item. 19 | * 20 | * @see RecyclerView#getAdapterPositionFor(RecyclerView.ViewHolder) 21 | * @see RecyclerView.ViewHolder#getAdapterPosition() 22 | */ 23 | void onItemMove(int fromPosition, int toPosition); 24 | 25 | 26 | /** 27 | * Called when an item has been dismissed by a swipe.
28 | *
29 | * Implementations should call {@link RecyclerView.Adapter#notifyItemRemoved(int)} after 30 | * adjusting the underlying data to reflect this removal. 31 | * 32 | * @param position The position of the item dismissed. 33 | * 34 | * @see RecyclerView#getAdapterPositionFor(RecyclerView.ViewHolder) 35 | * @see RecyclerView.ViewHolder#getAdapterPosition() 36 | */ 37 | void onItemDismiss(int position); 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_sidebar_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 18 | 19 | 29 | 30 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/recycleview/ProgressStyle.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary.recycleview; 2 | 3 | /** 4 | * Created by Jack on 2015/10/19. 5 | */ 6 | public class ProgressStyle { 7 | public static final int SysProgress=-1; 8 | public static final int BallPulse=0; 9 | public static final int BallGridPulse=1; 10 | public static final int BallClipRotate=2; 11 | public static final int BallClipRotatePulse=3; 12 | public static final int SquareSpin=4; 13 | public static final int BallClipRotateMultiple=5; 14 | public static final int BallPulseRise=6; 15 | public static final int BallRotate=7; 16 | public static final int CubeTransition=8; 17 | public static final int BallZigZag=9; 18 | public static final int BallZigZagDeflect=10; 19 | public static final int BallTrianglePath=11; 20 | public static final int BallScale=12; 21 | public static final int LineScale=13; 22 | public static final int LineScaleParty=14; 23 | public static final int BallScaleMultiple=15; 24 | public static final int BallPulseSync=16; 25 | public static final int BallBeat=17; 26 | public static final int LineScalePulseOut=18; 27 | public static final int LineScalePulseOutRapid=19; 28 | public static final int BallScaleRipple=20; 29 | public static final int BallScaleRippleMultiple=21; 30 | public static final int BallSpinFadeLoader=22; 31 | public static final int LineSpinFadeLoader=23; 32 | public static final int TriangleSkewSpin=24; 33 | public static final int Pacman=25; 34 | public static final int BallGridBeat=26; 35 | public static final int SemiCircleSpin=27; 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/superrecycleview/library/utils/DensityUtil.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.library.utils; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.util.DisplayMetrics; 6 | 7 | public class DensityUtil { 8 | 9 | // 根据手机的分辨率将dp的单位转成px(像素) 10 | public static int dip2px(Context context, float dpValue) { 11 | final float scale = context.getResources().getDisplayMetrics().density; 12 | return (int) (dpValue * scale + 0.5f); 13 | } 14 | 15 | // 根据手机的分辨率将px(像素)的单位转成dp 16 | public static int px2dip(Context context, float pxValue) { 17 | final float scale = context.getResources().getDisplayMetrics().density; 18 | return (int) (pxValue / scale + 0.5f); 19 | } 20 | 21 | // 将px值转换为sp值 22 | public static int px2sp(Context context, float pxValue) { 23 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; 24 | return (int) (pxValue / fontScale + 0.5f); 25 | } 26 | 27 | // 将sp值转换为px值 28 | public static int sp2px(Context context, float spValue) { 29 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; 30 | return (int) (spValue * fontScale + 0.5f); 31 | } 32 | 33 | // 屏幕宽度(像素) 34 | public static int getWindowWidth(Activity context){ 35 | DisplayMetrics metric = new DisplayMetrics(); 36 | context.getWindowManager().getDefaultDisplay().getMetrics(metric); 37 | return metric.widthPixels; 38 | } 39 | 40 | // 屏幕高度(像素) 41 | public static int getWindowHeight(Activity activity){ 42 | DisplayMetrics metric = new DisplayMetrics(); 43 | activity.getWindowManager().getDefaultDisplay().getMetrics(metric); 44 | return metric.heightPixels; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/recycleview/progressindicator/indicator/BallPulseRiseIndicator.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary.recycleview.progressindicator.indicator; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.animation.PropertyValuesHolder; 6 | import android.graphics.Canvas; 7 | import android.graphics.Paint; 8 | import android.view.animation.LinearInterpolator; 9 | 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | /** 14 | * Created by Jack on 2015/10/19. 15 | */ 16 | public class BallPulseRiseIndicator extends BaseIndicatorController{ 17 | 18 | @Override 19 | public void draw(Canvas canvas, Paint paint) { 20 | float radius=getWidth()/10; 21 | canvas.drawCircle(getWidth()/4,radius*2,radius,paint); 22 | canvas.drawCircle(getWidth()*3/4,radius*2,radius,paint); 23 | 24 | canvas.drawCircle(radius,getHeight()-2*radius,radius,paint); 25 | canvas.drawCircle(getWidth()/2,getHeight()-2*radius,radius,paint); 26 | canvas.drawCircle(getWidth()-radius,getHeight()-2*radius,radius,paint); 27 | } 28 | 29 | @Override 30 | public List createAnimation() { 31 | PropertyValuesHolder rotation6= PropertyValuesHolder.ofFloat("rotationX",0,360); 32 | ObjectAnimator animator= ObjectAnimator.ofPropertyValuesHolder(getTarget(), rotation6); 33 | animator.setInterpolator(new LinearInterpolator()); 34 | animator.setRepeatCount(-1); 35 | animator.setDuration(1500); 36 | animator.start(); 37 | List animators=new ArrayList<>(); 38 | animators.add(animator); 39 | return animators; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /superlibrary/src/main/java/com/superrecycleview/superlibrary/recycleview/progressindicator/indicator/TriangleSkewSpinIndicator.java: -------------------------------------------------------------------------------- 1 | package com.superrecycleview.superlibrary.recycleview.progressindicator.indicator; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.animation.PropertyValuesHolder; 6 | import android.graphics.Canvas; 7 | import android.graphics.Paint; 8 | import android.graphics.Path; 9 | import android.view.animation.LinearInterpolator; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | /** 15 | * Created by Jack on 2015/10/19. 16 | */ 17 | public class TriangleSkewSpinIndicator extends BaseIndicatorController { 18 | 19 | @Override 20 | public void draw(Canvas canvas, Paint paint) { 21 | Path path=new Path(); 22 | path.moveTo(getWidth()/5,getHeight()*4/5); 23 | path.lineTo(getWidth()*4/5, getHeight()*4/5); 24 | path.lineTo(getWidth()/2,getHeight()/5); 25 | path.close(); 26 | canvas.drawPath(path, paint); 27 | } 28 | 29 | @Override 30 | public List createAnimation() { 31 | List animators=new ArrayList<>(); 32 | PropertyValuesHolder rotation5= PropertyValuesHolder.ofFloat("rotationX",0,180,180,0,0); 33 | PropertyValuesHolder rotation6= PropertyValuesHolder.ofFloat("rotationY",0,0,180,180,0); 34 | 35 | ObjectAnimator animator= ObjectAnimator.ofPropertyValuesHolder(getTarget(), rotation6,rotation5); 36 | animator.setInterpolator(new LinearInterpolator()); 37 | animator.setRepeatCount(-1); 38 | animator.setDuration(2500); 39 | animator.start(); 40 | 41 | animators.add(animator); 42 | return animators; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_draggable_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 21 | 22 | 33 | 34 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_multi_item2_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 22 | 23 | 33 | 34 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_slide_swipe_menu_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 14 | 15 | 20 | 21 | 28 | 29 | 30 | 35 | 36 |