├── Community.iml
├── README.md
├── app
├── .gitignore
├── app.iml
├── build.gradle
├── libs
│ ├── arm64-v8a
│ │ ├── libBaiduMapSDK_base_v3_7_3.so
│ │ ├── libBaiduMapSDK_cloud_v3_7_3.so
│ │ ├── libBaiduMapSDK_map_v3_7_3.so
│ │ ├── libBaiduMapSDK_radar_v3_7_3.so
│ │ ├── libBaiduMapSDK_search_v3_7_3.so
│ │ ├── libBaiduMapSDK_util_v3_7_3.so
│ │ └── liblocSDK6a.so
│ ├── armeabi-v7a
│ │ ├── libBaiduMapSDK_base_v3_7_3.so
│ │ ├── libBaiduMapSDK_cloud_v3_7_3.so
│ │ ├── libBaiduMapSDK_map_v3_7_3.so
│ │ ├── libBaiduMapSDK_radar_v3_7_3.so
│ │ ├── libBaiduMapSDK_search_v3_7_3.so
│ │ ├── libBaiduMapSDK_util_v3_7_3.so
│ │ └── liblocSDK6a.so
│ ├── armeabi
│ │ ├── libBaiduMapSDK_base_v3_7_3.so
│ │ ├── libBaiduMapSDK_cloud_v3_7_3.so
│ │ ├── libBaiduMapSDK_map_v3_7_3.so
│ │ ├── libBaiduMapSDK_radar_v3_7_3.so
│ │ ├── libBaiduMapSDK_search_v3_7_3.so
│ │ ├── libBaiduMapSDK_util_v3_7_3.so
│ │ └── liblocSDK6a.so
│ ├── baidumapapi_base_v3_7_3.jar
│ ├── baidumapapi_cloud_v3_7_3.jar
│ ├── baidumapapi_map_v3_7_3.jar
│ ├── baidumapapi_radar_v3_7_3.jar
│ ├── baidumapapi_search_v3_7_3.jar
│ ├── baidumapapi_util_v3_7_3.jar
│ ├── locSDK_6.13.jar
│ ├── x86
│ │ ├── libBaiduMapSDK_base_v3_7_3.so
│ │ ├── libBaiduMapSDK_cloud_v3_7_3.so
│ │ ├── libBaiduMapSDK_map_v3_7_3.so
│ │ ├── libBaiduMapSDK_radar_v3_7_3.so
│ │ ├── libBaiduMapSDK_search_v3_7_3.so
│ │ ├── libBaiduMapSDK_util_v3_7_3.so
│ │ └── liblocSDK6a.so
│ └── x86_64
│ │ ├── libBaiduMapSDK_base_v3_7_3.so
│ │ ├── libBaiduMapSDK_cloud_v3_7_3.so
│ │ ├── libBaiduMapSDK_map_v3_7_3.so
│ │ ├── libBaiduMapSDK_radar_v3_7_3.so
│ │ ├── libBaiduMapSDK_search_v3_7_3.so
│ │ ├── libBaiduMapSDK_util_v3_7_3.so
│ │ └── liblocSDK6a.so
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── xylife
│ │ └── community
│ │ └── ApplicationTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── xylife
│ │ │ └── community
│ │ │ ├── AppContext.java
│ │ │ ├── adapter
│ │ │ ├── ExerciseListAdapter.java
│ │ │ ├── MyFragmentPagerAdapter.java
│ │ │ ├── NewsListAdapter.java
│ │ │ ├── PartyListAdapter.java
│ │ │ ├── PostPhotoAdapter.java
│ │ │ └── viewholder
│ │ │ │ ├── ExerciseViewHolder.java
│ │ │ │ ├── NewsViewHolder.java
│ │ │ │ └── PartyViewHolder.java
│ │ │ ├── api
│ │ │ ├── APIService.java
│ │ │ ├── APIWrapper.java
│ │ │ └── util
│ │ │ │ ├── RetrofitUtil.java
│ │ │ │ ├── RxHelper.java
│ │ │ │ └── RxSubscriber.java
│ │ │ ├── base
│ │ │ ├── BaseActivity.java
│ │ │ ├── BaseListFragment.java
│ │ │ ├── BasePartyFragment.java
│ │ │ └── BaseTextActivity.java
│ │ │ ├── bean
│ │ │ ├── Advertisement.java
│ │ │ ├── Exercise.java
│ │ │ ├── ImageItem.java
│ │ │ ├── JavaResponse.java
│ │ │ ├── News.java
│ │ │ ├── NewsResponse.java
│ │ │ ├── PartyEntity.java
│ │ │ ├── Response.java
│ │ │ ├── RowDescriptor.java
│ │ │ ├── TestEntity.java
│ │ │ └── TestResponse.java
│ │ │ ├── exception
│ │ │ └── ApiException.java
│ │ │ ├── fragment
│ │ │ ├── AttendNotesFragment.java
│ │ │ ├── CommentFragment.java
│ │ │ ├── HomeFragment.java
│ │ │ ├── PartyDetailFragment.java
│ │ │ ├── PartyFragment.java
│ │ │ ├── ScheduleFragment.java
│ │ │ └── UserCenterFragment.java
│ │ │ ├── listener
│ │ │ └── OnRowClickListener.java
│ │ │ ├── ui
│ │ │ ├── ChargingPileActivity.java
│ │ │ ├── CommentActivity.java
│ │ │ ├── FeedbackActivity.java
│ │ │ ├── ForgetPwdActivity.java
│ │ │ ├── FragmentDetailsActivity.java
│ │ │ ├── LoginActivity.java
│ │ │ ├── MainActivity.java
│ │ │ ├── PartyDetailActivity.java
│ │ │ ├── PostActivity.java
│ │ │ ├── RegisterActivity.java
│ │ │ ├── SettingActivity.java
│ │ │ ├── SignActivity.java
│ │ │ ├── SplashActivity.java
│ │ │ ├── UserInfoActivity.java
│ │ │ └── error
│ │ │ │ └── ErrorLayout.java
│ │ │ ├── utils
│ │ │ ├── AESCrypt.java
│ │ │ ├── Bimp.java
│ │ │ ├── Constant.java
│ │ │ ├── DoubleClickExitHelper.java
│ │ │ ├── FlipitAnimation.java
│ │ │ ├── RecyclerItemAnimator.java
│ │ │ └── RowActionEnum.java
│ │ │ ├── view
│ │ │ └── HomeSlideShowView.java
│ │ │ └── widget
│ │ │ ├── CustomAppCompatEditText.java
│ │ │ ├── GradientIconView.java
│ │ │ └── GradientTextView.java
│ └── res
│ │ ├── anim
│ │ ├── anim_scale_in.xml
│ │ └── anim_scale_out.xml
│ │ ├── drawable
│ │ ├── abs_list_selector_background_transition_holo_dark.xml
│ │ ├── action_bar_item_background.xml
│ │ ├── ic_product_default.9.png
│ │ ├── list_selector_holo_dark.xml
│ │ ├── picker_photo_bg.xml
│ │ ├── progressloading.xml
│ │ ├── selector_common_button.xml
│ │ ├── selector_common_corners_button.xml
│ │ ├── selector_green_corners_button.xml
│ │ ├── shape_common_button.xml
│ │ ├── shape_common_button_pressed.xml
│ │ ├── shape_common_corners_button.xml
│ │ ├── shape_common_corners_button_pressed.xml
│ │ ├── shape_green_corners_button.xml
│ │ ├── shape_green_corners_button_pressed.xml
│ │ ├── shape_orange_corners_bg.xml
│ │ └── widget_general_row_selector.xml
│ │ ├── layout-v21
│ │ └── layout_list_item_exercise.xml
│ │ ├── layout
│ │ ├── acitivity_feedback.xml
│ │ ├── activity_charging_pile.xml
│ │ ├── activity_comment.xml
│ │ ├── activity_forget_pwd.xml
│ │ ├── activity_fragment_details.xml
│ │ ├── activity_login.xml
│ │ ├── activity_main.xml
│ │ ├── activity_party.xml
│ │ ├── activity_party_detail.xml
│ │ ├── activity_post.xml
│ │ ├── activity_register.xml
│ │ ├── activity_setting.xml
│ │ ├── activity_sign.xml
│ │ ├── activity_splash.xml
│ │ ├── activity_user_info.xml
│ │ ├── fragment_attend_notes.xml
│ │ ├── fragment_base_party.xml
│ │ ├── fragment_comment.xml
│ │ ├── fragment_home.xml
│ │ ├── fragment_party_detail.xml
│ │ ├── fragment_pull_refresh_recyclerview.xml
│ │ ├── fragment_schedule.xml
│ │ ├── fragment_tab_viewpager.xml
│ │ ├── fragment_user_center.xml
│ │ ├── gradient_icon_layout.xml
│ │ ├── gradient_textview_layout.xml
│ │ ├── item_party.xml
│ │ ├── layout_home_header.xml
│ │ ├── layout_horizontal_line.xml
│ │ ├── layout_list_item_exercise.xml
│ │ ├── layout_list_item_news.xml
│ │ ├── layout_slideshow.xml
│ │ ├── picker_item_photo.xml
│ │ ├── title_bar.xml
│ │ ├── title_bar_text.xml
│ │ ├── user_info_layout.xml
│ │ ├── view_empty_layout.xml
│ │ ├── view_error_layout.xml
│ │ ├── widget_round_row.xml
│ │ └── widget_round_text_row.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ ├── abs__list_focused_holo.9.png
│ │ ├── abs__list_longpressed_holo.9.png
│ │ ├── abs__list_pressed_holo_dark.9.png
│ │ ├── abs__list_selector_disabled_holo_dark.9.png
│ │ ├── back_narrow_btn.png
│ │ ├── btn_add_big.png
│ │ ├── checkbox_checked.png
│ │ ├── dot_blur.png
│ │ ├── dot_focus.png
│ │ ├── girl.png
│ │ ├── ic_about.png
│ │ ├── ic_around_shop.png
│ │ ├── ic_avatar.png
│ │ ├── ic_feedback.png
│ │ ├── ic_launcher.png
│ │ ├── ic_loaction.png
│ │ ├── ic_page_failed.png
│ │ ├── ic_page_icon_network.png
│ │ ├── ic_photo_default.9.png
│ │ ├── ic_scan.png
│ │ ├── ic_time.png
│ │ ├── ic_to_top.png
│ │ ├── ic_user_avater.png
│ │ ├── loading.png
│ │ └── right_arrow.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_menu_home.png
│ │ ├── ic_menu_home_pressed.png
│ │ ├── ic_menu_me.png
│ │ ├── ic_menu_me_pressed.png
│ │ ├── ic_menu_schedule.png
│ │ └── ic_menu_schedule_pressed.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ ├── values-zh-rCN
│ │ ├── arrays.xml
│ │ └── strings.xml
│ │ └── values
│ │ ├── arrays.xml
│ │ ├── attr.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── xylife
│ └── community
│ └── ExampleUnitTest.java
├── build.gradle
├── build
├── generated
│ └── mockable-android-23.jar
└── intermediates
│ ├── dex-cache
│ └── cache.xml
│ └── proguard-files
│ └── proguard-android.txt-2.2.0-alpha2
├── common_library
├── .gitignore
├── build.gradle
├── common_library.iml
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── android
│ │ └── framewok
│ │ └── ApplicationTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── android
│ │ │ └── framewok
│ │ │ ├── AppBaseContext.java
│ │ │ ├── AppManager.java
│ │ │ ├── base
│ │ │ ├── BaseFragment.java
│ │ │ ├── BaseParentActivity.java
│ │ │ └── ListBaseAdapter.java
│ │ │ ├── bean
│ │ │ └── Entity.java
│ │ │ ├── interf
│ │ │ ├── BaseFragmentInterface.java
│ │ │ └── BaseViewInterface.java
│ │ │ ├── util
│ │ │ ├── AppToast.java
│ │ │ ├── DialogHelper.java
│ │ │ ├── NetUtil.java
│ │ │ ├── TLog.java
│ │ │ └── Util.java
│ │ │ └── widget
│ │ │ ├── CircleImageView.java
│ │ │ └── DrawableCenterTextView.java
│ └── res
│ │ ├── drawable-xhdpi
│ │ └── loading_progress.png
│ │ ├── drawable
│ │ ├── bg_loading_dialog_shape.xml
│ │ ├── loading_dialog_progressbar.xml
│ │ ├── selector_white_preferences_item.xml
│ │ ├── shape_white_preferences_item.xml
│ │ └── shape_white_preferences_item_pressed.xml
│ │ ├── layout
│ │ └── layout_loading_dialog.xml
│ │ └── values
│ │ ├── attr.xml
│ │ ├── dimens.xml
│ │ ├── ids.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── android
│ └── framewok
│ └── ExampleUnitTest.java
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── local.properties
├── pic
└── app.gif
├── pull_recyclerview_library
├── .gitignore
├── build.gradle
├── libs
│ └── universal-image-loader-1.9.5.jar
├── proguard-rules.pro
├── pull_recyclerview_library.iml
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── cundong
│ │ └── recyclerview
│ │ └── ApplicationTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── cundong
│ │ │ └── recyclerview
│ │ │ ├── ArrowRefreshHeader.java
│ │ │ ├── BaseRefreshHeader.java
│ │ │ ├── CommonFooter.java
│ │ │ ├── CommonHeader.java
│ │ │ ├── CustRecyclerView.java
│ │ │ ├── ExStaggeredGridLayoutManager.java
│ │ │ ├── HeaderAndFooterRecyclerViewAdapter.java
│ │ │ ├── HeaderLayout.java
│ │ │ ├── HeaderSpanSizeLookup.java
│ │ │ ├── JellyView.java
│ │ │ ├── LoadingFooter.java
│ │ │ ├── LoadingMoreFooter.java
│ │ │ ├── MarginDecoration.java
│ │ │ ├── OnListLoadNextPageListener.java
│ │ │ ├── OnScrollListener.java
│ │ │ ├── ProgressStyle.java
│ │ │ ├── RecyclerOnScrollListener.java
│ │ │ ├── RecyclerViewStateUtils.java
│ │ │ ├── RecyclerViewUtils.java
│ │ │ ├── ScrollDetector.java
│ │ │ ├── ShowHideOnScroll.java
│ │ │ ├── SimpleViewSwitcher.java
│ │ │ └── progressindicator
│ │ │ ├── AVLoadingIndicatorView.java
│ │ │ └── indicator
│ │ │ ├── BallBeatIndicator.java
│ │ │ ├── BallClipRotateIndicator.java
│ │ │ ├── BallClipRotateMultipleIndicator.java
│ │ │ ├── BallClipRotatePulseIndicator.java
│ │ │ ├── BallGridBeatIndicator.java
│ │ │ ├── BallGridPulseIndicator.java
│ │ │ ├── BallPulseIndicator.java
│ │ │ ├── BallPulseRiseIndicator.java
│ │ │ ├── BallPulseSyncIndicator.java
│ │ │ ├── BallRotateIndicator.java
│ │ │ ├── BallScaleIndicator.java
│ │ │ ├── BallScaleMultipleIndicator.java
│ │ │ ├── BallScaleRippleIndicator.java
│ │ │ ├── BallScaleRippleMultipleIndicator.java
│ │ │ ├── BallSpinFadeLoaderIndicator.java
│ │ │ ├── BallTrianglePathIndicator.java
│ │ │ ├── BallZigZagDeflectIndicator.java
│ │ │ ├── BallZigZagIndicator.java
│ │ │ ├── BaseIndicatorController.java
│ │ │ ├── CubeTransitionIndicator.java
│ │ │ ├── LineScaleIndicator.java
│ │ │ ├── LineScalePartyIndicator.java
│ │ │ ├── LineScalePulseOutIndicator.java
│ │ │ ├── LineScalePulseOutRapidIndicator.java
│ │ │ ├── LineSpinFadeLoaderIndicator.java
│ │ │ ├── PacmanIndicator.java
│ │ │ ├── SemiCircleSpinIndicator.java
│ │ │ ├── SquareSpinIndicator.java
│ │ │ └── TriangleSkewSpinIndicator.java
│ └── res
│ │ ├── anim
│ │ ├── floating_action_button_hide.xml
│ │ └── floating_action_button_show.xml
│ │ ├── drawable-hdpi
│ │ ├── ic_loading_rotate.png
│ │ ├── ic_pulltorefresh_arrow.png
│ │ ├── ic_tip.png
│ │ ├── 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
│ │ └── progressbar.xml
│ │ ├── drawable
│ │ └── progressloading.xml
│ │ ├── layout
│ │ ├── layout_recyclerview_footer.xml
│ │ ├── layout_recyclerview_header.xml
│ │ ├── layout_recyclerview_list_footer.xml
│ │ ├── layout_recyclerview_list_footer_end.xml
│ │ ├── layout_recyclerview_list_footer_loading.xml
│ │ ├── layout_recyclerview_list_footer_network_error.xml
│ │ ├── listview_header.xml
│ │ └── pull_to_refresh_head.xml
│ │ └── values
│ │ ├── attr.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── cundong
│ └── recyclerview
│ └── ExampleUnitTest.java
└── settings.gradle
/Community.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #Community
2 |
3 | APP基本框架:
4 | - 使用Retrofit+RxJava!
5 | - 底部滑动导航!
6 | - RecyclerView下拉刷新,滑动底部自动加载更多。
7 |
8 |
9 | 效果图:
10 |
11 | 
12 |
13 | 本项目使用的pull_recyclerview_library框架已经更名,最新请移步:
14 | https://github.com/jdsjlzx/LRecyclerView
15 |
16 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'com.neenbedankt.android-apt'
3 |
4 | repositories {
5 | flatDir {
6 | dir 'libs'
7 | }
8 | }
9 |
10 | android {
11 | compileSdkVersion 23
12 | buildToolsVersion "23.0.3"
13 |
14 | sourceSets {
15 | main {
16 | jniLibs.srcDir 'libs'
17 | }
18 | }
19 |
20 | defaultConfig {
21 | applicationId "com.xylife.community"
22 | minSdkVersion 16
23 | targetSdkVersion 23
24 | versionCode 1
25 | versionName "1.0"
26 | }
27 |
28 | buildTypes {
29 | release {
30 | minifyEnabled false
31 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
32 | }
33 | }
34 | }
35 |
36 | dependencies {
37 | compile fileTree(include: ['*.jar'], dir: 'libs')
38 | testCompile 'junit:junit:4.12'
39 | compile project(':pull_recyclerview_library')
40 | compile project(':common_library')
41 | compile 'com.android.support:design:23.4.0'
42 | compile 'com.android.support:appcompat-v7:23.4.0'
43 | compile 'com.android.support:cardview-v7:23.4.0'
44 | compile 'com.squareup.okhttp3:okhttp:3.2.0'
45 | compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
46 | compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4'
47 | compile 'com.squareup.retrofit2:adapter-rxjava:2.0.0-beta4'
48 | compile 'com.squareup.okhttp3:logging-interceptor:3.1.2'
49 | compile 'com.jakewharton:butterknife:8.0.1'
50 | compile 'com.nineoldandroids:library:2.4.0'
51 | compile 'com.github.bumptech.glide:glide:3.6.0'
52 | compile 'me.iwf.photopicker:PhotoPicker:0.8.1@aar'
53 | apt 'com.jakewharton:butterknife-compiler:8.0.1'
54 | compile 'io.reactivex:rxandroid:1.1.0'
55 | compile 'io.reactivex:rxjava:1.1.0'
56 | compile 'com.trello:rxlifecycle:0.6.1'
57 | compile 'com.trello:rxlifecycle-components:0.6.1'
58 | compile 'com.github.bumptech.glide:glide:3.6.1'
59 | compile 'jp.wasabeef:recyclerview-animators:2.2.3'
60 | }
61 |
--------------------------------------------------------------------------------
/app/libs/arm64-v8a/libBaiduMapSDK_base_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/arm64-v8a/libBaiduMapSDK_base_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/arm64-v8a/libBaiduMapSDK_cloud_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/arm64-v8a/libBaiduMapSDK_cloud_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/arm64-v8a/libBaiduMapSDK_map_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/arm64-v8a/libBaiduMapSDK_map_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/arm64-v8a/libBaiduMapSDK_radar_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/arm64-v8a/libBaiduMapSDK_radar_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/arm64-v8a/libBaiduMapSDK_search_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/arm64-v8a/libBaiduMapSDK_search_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/arm64-v8a/libBaiduMapSDK_util_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/arm64-v8a/libBaiduMapSDK_util_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/arm64-v8a/liblocSDK6a.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/arm64-v8a/liblocSDK6a.so
--------------------------------------------------------------------------------
/app/libs/armeabi-v7a/libBaiduMapSDK_base_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi-v7a/libBaiduMapSDK_base_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/armeabi-v7a/libBaiduMapSDK_cloud_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi-v7a/libBaiduMapSDK_cloud_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/armeabi-v7a/libBaiduMapSDK_map_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi-v7a/libBaiduMapSDK_map_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/armeabi-v7a/libBaiduMapSDK_radar_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi-v7a/libBaiduMapSDK_radar_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/armeabi-v7a/libBaiduMapSDK_search_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi-v7a/libBaiduMapSDK_search_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/armeabi-v7a/libBaiduMapSDK_util_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi-v7a/libBaiduMapSDK_util_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/armeabi-v7a/liblocSDK6a.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi-v7a/liblocSDK6a.so
--------------------------------------------------------------------------------
/app/libs/armeabi/libBaiduMapSDK_base_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi/libBaiduMapSDK_base_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/armeabi/libBaiduMapSDK_cloud_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi/libBaiduMapSDK_cloud_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/armeabi/libBaiduMapSDK_map_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi/libBaiduMapSDK_map_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/armeabi/libBaiduMapSDK_radar_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi/libBaiduMapSDK_radar_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/armeabi/libBaiduMapSDK_search_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi/libBaiduMapSDK_search_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/armeabi/libBaiduMapSDK_util_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi/libBaiduMapSDK_util_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/armeabi/liblocSDK6a.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/armeabi/liblocSDK6a.so
--------------------------------------------------------------------------------
/app/libs/baidumapapi_base_v3_7_3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/baidumapapi_base_v3_7_3.jar
--------------------------------------------------------------------------------
/app/libs/baidumapapi_cloud_v3_7_3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/baidumapapi_cloud_v3_7_3.jar
--------------------------------------------------------------------------------
/app/libs/baidumapapi_map_v3_7_3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/baidumapapi_map_v3_7_3.jar
--------------------------------------------------------------------------------
/app/libs/baidumapapi_radar_v3_7_3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/baidumapapi_radar_v3_7_3.jar
--------------------------------------------------------------------------------
/app/libs/baidumapapi_search_v3_7_3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/baidumapapi_search_v3_7_3.jar
--------------------------------------------------------------------------------
/app/libs/baidumapapi_util_v3_7_3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/baidumapapi_util_v3_7_3.jar
--------------------------------------------------------------------------------
/app/libs/locSDK_6.13.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/locSDK_6.13.jar
--------------------------------------------------------------------------------
/app/libs/x86/libBaiduMapSDK_base_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86/libBaiduMapSDK_base_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/x86/libBaiduMapSDK_cloud_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86/libBaiduMapSDK_cloud_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/x86/libBaiduMapSDK_map_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86/libBaiduMapSDK_map_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/x86/libBaiduMapSDK_radar_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86/libBaiduMapSDK_radar_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/x86/libBaiduMapSDK_search_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86/libBaiduMapSDK_search_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/x86/libBaiduMapSDK_util_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86/libBaiduMapSDK_util_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/x86/liblocSDK6a.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86/liblocSDK6a.so
--------------------------------------------------------------------------------
/app/libs/x86_64/libBaiduMapSDK_base_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86_64/libBaiduMapSDK_base_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/x86_64/libBaiduMapSDK_cloud_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86_64/libBaiduMapSDK_cloud_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/x86_64/libBaiduMapSDK_map_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86_64/libBaiduMapSDK_map_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/x86_64/libBaiduMapSDK_radar_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86_64/libBaiduMapSDK_radar_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/x86_64/libBaiduMapSDK_search_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86_64/libBaiduMapSDK_search_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/x86_64/libBaiduMapSDK_util_v3_7_3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86_64/libBaiduMapSDK_util_v3_7_3.so
--------------------------------------------------------------------------------
/app/libs/x86_64/liblocSDK6a.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/libs/x86_64/liblocSDK6a.so
--------------------------------------------------------------------------------
/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 /Users/lizhixian/Documents/Android/studio_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/androidTest/java/com/xylife/community/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community;
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/java/com/xylife/community/AppContext.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community;
2 |
3 | import android.app.Application;
4 |
5 | import com.android.framewok.AppBaseContext;
6 | import com.baidu.mapapi.SDKInitializer;
7 |
8 | public class AppContext extends Application {
9 |
10 | private static AppContext instance;
11 |
12 | public static AppContext getInstance() {
13 | return instance;
14 | }
15 |
16 | @Override
17 | public void onCreate() {
18 | super.onCreate();
19 | instance = this;
20 | SDKInitializer.initialize(this);
21 | }
22 |
23 |
24 |
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/adapter/ExerciseListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.adapter;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | import com.android.framewok.base.ListBaseAdapter;
11 | import com.xylife.community.R;
12 | import com.xylife.community.adapter.viewholder.ExerciseViewHolder;
13 | import com.xylife.community.bean.Exercise;
14 | import com.xylife.community.ui.PartyDetailActivity;
15 |
16 | public class ExerciseListAdapter extends ListBaseAdapter {
17 |
18 | private Context mContext;
19 | private int lastPosition = -1;
20 | private int type = -1; // 0 首页;1 日程
21 |
22 | public ExerciseListAdapter(int type) {
23 | this.type = type;
24 | }
25 |
26 | @Override
27 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
28 | mContext = parent.getContext();
29 | View view = LayoutInflater.from(mContext).inflate(R.layout.layout_list_item_exercise, parent, false);
30 | return new ExerciseViewHolder(view);
31 | }
32 |
33 | @Override
34 | public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
35 | final ExerciseViewHolder viewHolder = (ExerciseViewHolder) holder;
36 | final Exercise exercise = this.mDataList.get(position);
37 |
38 | viewHolder.companyNameText.setText("富电科技");
39 | viewHolder.certificationText.setText("官方");
40 |
41 | if (type == 1) {
42 | viewHolder.enrolBtn.setVisibility(View.GONE);
43 | }
44 |
45 | viewHolder.titleText.setText("哪种鞋最适合运动,一起来聊聊呗");
46 | viewHolder.timeText.setText("05/30 12:00 - 06/30 12:00");
47 | viewHolder.locationText.setText("768创意产业园");
48 |
49 | viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
50 | @Override
51 | public void onClick(View v) {
52 | Intent intent = new Intent(mContext, PartyDetailActivity.class);
53 | mContext.startActivity(intent);
54 | }
55 | });
56 |
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/adapter/MyFragmentPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.adapter;
2 |
3 |
4 | import android.support.v4.app.Fragment;
5 | import android.support.v4.app.FragmentManager;
6 | import android.support.v4.app.FragmentPagerAdapter;
7 |
8 | import java.util.ArrayList;
9 |
10 | public class MyFragmentPagerAdapter extends FragmentPagerAdapter {
11 |
12 | private ArrayList mFragments;
13 |
14 | private CharSequence[] mLabels;
15 |
16 | public MyFragmentPagerAdapter(FragmentManager fm, ArrayList mFragments, CharSequence[] mLabels) {
17 | super(fm);
18 | this.mFragments = mFragments;
19 | this.mLabels = mLabels;
20 | }
21 |
22 |
23 | @Override
24 | public Fragment getItem(int position) {
25 | return mFragments.get(position);
26 |
27 | }
28 |
29 | @Override
30 | public int getCount() {
31 | return mFragments.size();
32 | }
33 |
34 | @Override
35 | public CharSequence getPageTitle(int position) {
36 | return mLabels[position];
37 | }
38 |
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/adapter/NewsListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.adapter;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | import com.android.framewok.base.ListBaseAdapter;
11 | import com.xylife.community.R;
12 | import com.xylife.community.adapter.viewholder.NewsViewHolder;
13 | import com.xylife.community.bean.News;
14 | import com.xylife.community.ui.PartyDetailActivity;
15 |
16 | public class NewsListAdapter extends ListBaseAdapter {
17 |
18 | private Context mContext;
19 |
20 | public NewsListAdapter() {
21 | }
22 |
23 | @Override
24 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
25 | mContext = parent.getContext();
26 | View view = LayoutInflater.from(mContext).inflate(R.layout.layout_list_item_news, parent, false);
27 | return new NewsViewHolder(view);
28 | }
29 |
30 | @Override
31 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
32 | final NewsViewHolder viewHolder = (NewsViewHolder) holder;
33 | final News news = this.mDataList.get(position);
34 |
35 | viewHolder.titleText.setText(news.famous_saying);
36 | viewHolder.speakerText.setText(news.famous_name);
37 |
38 | viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
39 | @Override
40 | public void onClick(View v) {
41 | Intent intent = new Intent(mContext, PartyDetailActivity.class);
42 | mContext.startActivity(intent);
43 | }
44 | });
45 |
46 |
47 |
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/adapter/PartyListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.adapter;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 |
8 | import com.android.framewok.base.ListBaseAdapter;
9 | import com.xylife.community.R;
10 | import com.xylife.community.adapter.viewholder.NewsViewHolder;
11 | import com.xylife.community.adapter.viewholder.PartyViewHolder;
12 | import com.xylife.community.bean.News;
13 | import com.xylife.community.bean.PartyEntity;
14 |
15 | import java.util.Collection;
16 |
17 | /**
18 | * Created by SK on 2016-05-18.
19 | */
20 | public class PartyListAdapter extends ListBaseAdapter {
21 |
22 | @Override
23 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
24 | mContext = parent.getContext();
25 | View view = LayoutInflater.from(mContext).inflate(R.layout.item_party, parent, false);
26 | return new PartyViewHolder(view);
27 | }
28 |
29 | @Override
30 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
31 | super.onBindViewHolder(holder, position);
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/adapter/viewholder/ExerciseViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.adapter.viewholder;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.View;
5 | import android.widget.Button;
6 | import android.widget.ImageView;
7 | import android.widget.TextView;
8 |
9 | import com.xylife.community.R;
10 |
11 | import butterknife.BindView;
12 | import butterknife.ButterKnife;
13 |
14 | public class ExerciseViewHolder extends RecyclerView.ViewHolder{
15 | @BindView(R.id.logo_image) public ImageView logoImage;
16 | @BindView(R.id.certification_text) public TextView certificationText;
17 | @BindView(R.id.company_name_text) public TextView companyNameText;
18 | @BindView(R.id.title_text) public TextView titleText;
19 | @BindView(R.id.time_text) public TextView timeText;
20 | @BindView(R.id.location_text) public TextView locationText;
21 | @BindView(R.id.enrol_btn) public Button enrolBtn;
22 |
23 |
24 | public ExerciseViewHolder(View itemView) {
25 | super(itemView);
26 | ButterKnife.bind(this,itemView);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/adapter/viewholder/NewsViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.adapter.viewholder;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.View;
5 | import android.widget.TextView;
6 |
7 | import com.xylife.community.R;
8 |
9 | import butterknife.BindView;
10 | import butterknife.ButterKnife;
11 |
12 | public class NewsViewHolder extends RecyclerView.ViewHolder{
13 | @BindView(R.id.title_text) public TextView titleText;
14 | @BindView(R.id.speaker_text) public TextView speakerText;
15 |
16 |
17 | public NewsViewHolder(View itemView) {
18 | super(itemView);
19 | ButterKnife.bind(this,itemView);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/adapter/viewholder/PartyViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.adapter.viewholder;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.View;
5 |
6 | import butterknife.ButterKnife;
7 |
8 | /**
9 | * Created by SK on 2016-05-18.
10 | */
11 | public class PartyViewHolder extends RecyclerView.ViewHolder {
12 |
13 |
14 | public PartyViewHolder(View itemView) {
15 | super(itemView);
16 | ButterKnife.bind(this,itemView);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/api/APIService.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.api;
2 |
3 | import com.xylife.community.bean.Advertisement;
4 | import com.xylife.community.bean.Exercise;
5 | import com.xylife.community.bean.JavaResponse;
6 | import com.xylife.community.bean.Response;
7 | import com.xylife.community.bean.TestResponse;
8 |
9 | import java.util.List;
10 |
11 | import retrofit2.http.GET;
12 | import retrofit2.http.Header;
13 | import retrofit2.http.Query;
14 | import rx.Observable;
15 |
16 | /**
17 | * Retrofit 2.0中我们还可以在@Url里面定义完整的URL:这种情况下Base URL会被忽略。
18 | */
19 | public interface APIService {
20 |
21 | @GET("avatardata/mingrenmingyan/lookup")
22 | Observable>> getFamousResult(@Header("apiKey") String apiKey,
23 | @Query("keyword") String keyword,
24 | @Query("page") int page,
25 | @Query("rows") int rows);
26 |
27 | @GET("http://ip.taobao.com/service/getIpInfo.php")
28 | Observable getTestResult(@Query("ip") String keyword);
29 |
30 | @GET("http://203.130.41.104:8050/guizi-app-jiqimao/haier/user/userLoginNew.json")
31 | Observable login(@Query("phone") String name,
32 | @Query("password") String password,
33 | @Query("userType") int userType);
34 |
35 | @GET("http://203.130.41.104:8050/guizi-app-jiqimao/haier/version/findAdvertImg.json?attType=5")
36 | Observable>> getBannerImages();
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/api/util/RetrofitUtil.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.api.util;
2 |
3 |
4 | import com.xylife.community.api.APIService;
5 | import com.xylife.community.utils.Constant;
6 |
7 | import okhttp3.OkHttpClient;
8 | import okhttp3.logging.HttpLoggingInterceptor;
9 | import retrofit2.Retrofit;
10 | import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
11 | import retrofit2.converter.gson.GsonConverterFactory;
12 |
13 | public class RetrofitUtil {
14 | /**
15 | * 服务器地址
16 | */
17 | private static final String API_HOST = Constant.BASEURL;
18 |
19 | private static final String API_TEST_HOST = Constant.BASEURL_IP;
20 |
21 | private static Retrofit mRetrofit;
22 | private static APIService mAPIService;
23 |
24 | private static Retrofit getRetrofit() {
25 | if (mRetrofit == null) {
26 | // Log
27 | HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
28 | logging.setLevel(HttpLoggingInterceptor.Level.BODY);
29 | OkHttpClient client = new OkHttpClient.Builder().addInterceptor(logging).build();
30 |
31 | mRetrofit = new Retrofit.Builder()
32 | .baseUrl(API_HOST)
33 | .addConverterFactory(GsonConverterFactory.create())
34 | .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
35 | .client(client)
36 | .build();
37 | }
38 | return mRetrofit;
39 | }
40 |
41 | public static APIService getAPIService() {
42 | if (mAPIService == null) {
43 | mAPIService = getRetrofit().create(APIService.class);
44 | }
45 | return mAPIService;
46 | }
47 |
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/api/util/RxHelper.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.api.util;
2 |
3 |
4 | import com.android.framewok.util.DialogHelper;
5 | import com.trello.rxlifecycle.ActivityEvent;
6 | import com.trello.rxlifecycle.RxLifecycle;
7 | import com.trello.rxlifecycle.components.support.RxAppCompatActivity;
8 |
9 | import rx.Observable;
10 | import rx.android.schedulers.AndroidSchedulers;
11 | import rx.functions.Action0;
12 | import rx.schedulers.Schedulers;
13 |
14 | public class RxHelper {
15 | private String mMessage;
16 |
17 | public RxHelper(String message){
18 | mMessage = message;
19 | }
20 |
21 | //子线程运行,主线程回调
22 | public Observable.Transformer io_main(final RxAppCompatActivity context) {
23 | return new Observable.Transformer() {
24 |
25 | @Override
26 | public Observable call(Observable tObservable) {
27 |
28 | Observable observable = (Observable) tObservable
29 | .subscribeOn(Schedulers.io())
30 | .doOnSubscribe(new Action0() {
31 | @Override
32 | public void call() {
33 | DialogHelper.showProgressDlg(context, mMessage);
34 | }
35 | })
36 | .subscribeOn(AndroidSchedulers.mainThread())
37 | .observeOn(AndroidSchedulers.mainThread())
38 | .compose(RxLifecycle.bindUntilEvent(context.lifecycle(), ActivityEvent.STOP));
39 |
40 | return observable;
41 |
42 | }
43 | };
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/api/util/RxSubscriber.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.api.util;
2 |
3 | import com.android.framewok.util.DialogHelper;
4 |
5 | import rx.Subscriber;
6 |
7 | /**
8 | * Created by Lzx on 2016/5/27.
9 | */
10 |
11 | public abstract class RxSubscriber extends Subscriber {
12 |
13 | @Override
14 | public void onCompleted() {
15 | DialogHelper.stopProgressDlg();
16 | }
17 |
18 | @Override
19 | public void onError(Throwable e) {
20 | e.printStackTrace();
21 | _onError(e.toString());
22 |
23 | }
24 |
25 | @Override
26 | public void onNext(T t) {
27 | _onNext(t);
28 | }
29 |
30 | public abstract void _onNext(T t);
31 |
32 | public abstract void _onError(String msg);
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/base/BaseActivity.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.base;
2 |
3 | import android.view.View;
4 | import android.widget.ImageView;
5 | import android.widget.TextView;
6 |
7 | import com.android.framewok.base.BaseParentActivity;
8 | import com.xylife.community.R;
9 |
10 | import butterknife.BindView;
11 | import butterknife.ButterKnife;
12 | import butterknife.OnClick;
13 |
14 | public abstract class BaseActivity extends BaseParentActivity implements View.OnClickListener{
15 | @BindView(R.id.title_text)
16 | protected TextView mTitleText;
17 | @BindView(R.id.back_img)
18 | protected ImageView mBackBtn;
19 | @BindView(R.id.right_img)
20 | protected ImageView mRightBtn;
21 |
22 | @Override
23 | protected void initTitleBar() {
24 | ButterKnife.bind(this);
25 |
26 | }
27 |
28 | @Override
29 | @OnClick({R.id.back_img})
30 | public void onClick(View view) {
31 | switch (view.getId()) {
32 | case R.id.back_img:
33 | onBackPressed();
34 | break;
35 | default:
36 | break;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/base/BasePartyFragment.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.base;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.widget.LinearLayoutManager;
5 | import android.view.View;
6 |
7 | import com.android.framewok.base.ListBaseAdapter;
8 | import com.android.framewok.util.TLog;
9 | import com.xylife.community.R;
10 | import com.xylife.community.adapter.PartyListAdapter;
11 | import com.xylife.community.bean.Exercise;
12 | import com.xylife.community.bean.Response;
13 |
14 | import java.util.List;
15 |
16 | import rx.Observable;
17 |
18 | /**
19 | * Created by SK on 2016-05-25.
20 | */
21 | public class BasePartyFragment extends BaseListFragment> {
22 |
23 | public static BasePartyFragment newInstance(String title) {
24 | BasePartyFragment fragment = new BasePartyFragment();
25 | Bundle args = new Bundle();
26 | args.putString("title", title);
27 | fragment.setArguments(args);
28 | return fragment;
29 | }
30 |
31 | @Override
32 | public void initView(View view) {
33 | super.initView(view);
34 | }
35 |
36 | @Override
37 | public void initData() {
38 | super.initData();
39 | }
40 |
41 | @Override
42 | protected int getLayoutId() {
43 | return R.layout.fragment_base_party;
44 | }
45 |
46 | @Override
47 | protected ListBaseAdapter getListAdapter() {
48 | return new PartyListAdapter();
49 | }
50 |
51 | @Override
52 | protected void initLayoutManager() {
53 | mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
54 | }
55 |
56 | @Override
57 | protected Observable>> sendRequestData() {
58 | TLog.log("sendRequestData mCurrentPage = " + mCurrentPage);
59 | //return APIWrapper.getInstance().queryLookUp("人才",mCurrentPage);
60 | return null;
61 | }
62 |
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/base/BaseTextActivity.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.base;
2 |
3 | import android.view.View;
4 | import android.widget.ImageView;
5 | import android.widget.TextView;
6 |
7 | import com.android.framewok.base.BaseParentActivity;
8 | import com.xylife.community.R;
9 |
10 | import butterknife.BindView;
11 | import butterknife.ButterKnife;
12 | import butterknife.OnClick;
13 |
14 | public abstract class BaseTextActivity extends BaseParentActivity implements View.OnClickListener{
15 | @BindView(R.id.title_text)
16 | protected TextView mTitleText;
17 | @BindView(R.id.back_img)
18 | protected ImageView mBackBtn;
19 | @BindView(R.id.right_text)
20 | protected TextView mRightText;
21 |
22 | @Override
23 | protected void initTitleBar() {
24 | ButterKnife.bind(this);
25 |
26 | }
27 |
28 | @Override
29 | @OnClick({R.id.back_img})
30 | public void onClick(View view) {
31 | switch (view.getId()) {
32 | case R.id.back_img:
33 | onBackPressed();
34 | break;
35 | default:
36 | break;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/bean/Advertisement.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.bean;
2 |
3 | public class Advertisement {
4 |
5 | public String attPathUrl;
6 | public String attUrl;
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/bean/Exercise.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.bean;
2 |
3 | import com.android.framewok.bean.Entity;
4 |
5 | /**
6 | * 集体活动
7 | */
8 | public class Exercise extends Entity {
9 | public String famous_name;
10 | public String famous_saying;
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/bean/ImageItem.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.bean;
2 |
3 | import java.io.IOException;
4 | import java.io.Serializable;
5 |
6 | import android.graphics.Bitmap;
7 |
8 | import com.xylife.community.utils.Bimp;
9 |
10 |
11 | public class ImageItem implements Serializable {
12 | public String imageId;
13 | public String thumbnailPath;
14 | public String imagePath;
15 | private Bitmap bitmap;
16 | public boolean isSelected = false;
17 |
18 | public String getImageId() {
19 | return imageId;
20 | }
21 | public void setImageId(String imageId) {
22 | this.imageId = imageId;
23 | }
24 | public String getThumbnailPath() {
25 | return thumbnailPath;
26 | }
27 | public void setThumbnailPath(String thumbnailPath) {
28 | this.thumbnailPath = thumbnailPath;
29 | }
30 | public String getImagePath() {
31 | return imagePath;
32 | }
33 | public void setImagePath(String imagePath) {
34 | this.imagePath = imagePath;
35 | }
36 | public boolean isSelected() {
37 | return isSelected;
38 | }
39 | public void setSelected(boolean isSelected) {
40 | this.isSelected = isSelected;
41 | }
42 | public Bitmap getBitmap() {
43 | if(bitmap == null){
44 | try {
45 | bitmap = Bimp.revitionImageSize(imagePath);
46 | } catch (IOException e) {
47 | // TODO Auto-generated catch block
48 | e.printStackTrace();
49 | }
50 | }
51 | return bitmap;
52 | }
53 | public void setBitmap(Bitmap bitmap) {
54 | this.bitmap = bitmap;
55 | }
56 |
57 |
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/bean/JavaResponse.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.bean;
2 |
3 | public class JavaResponse extends Response{
4 |
5 | public int infoCode;
6 | public String message;
7 | public T data;
8 |
9 | public boolean isSuccess() {
10 | return infoCode == 200;
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/bean/News.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.bean;
2 |
3 | import com.android.framewok.bean.Entity;
4 |
5 | public class News extends Entity {
6 | public String famous_name;
7 | public String famous_saying;
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/bean/NewsResponse.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.bean;
2 |
3 | import java.util.List;
4 |
5 | public class NewsResponse extends Response{
6 |
7 | public int total;
8 | public int error_code;
9 | public String reason;
10 | public List result;
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/bean/PartyEntity.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.bean;
2 |
3 | import com.android.framewok.bean.Entity;
4 |
5 | import java.io.Serializable;
6 |
7 | /**
8 | * Created by SK on 2016-05-18.
9 | */
10 | public class PartyEntity extends Entity implements Serializable {
11 |
12 |
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/bean/Response.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.bean;
2 |
3 |
4 | public class Response {
5 |
6 | public boolean isSuccess() {
7 | return error_code == 0;
8 | }
9 |
10 |
11 | public int total;
12 | public int error_code;
13 | public String reason;
14 | public T result;
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/bean/RowDescriptor.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.bean;
2 |
3 | import com.xylife.community.utils.RowActionEnum;
4 |
5 | /**
6 | * Created by Twilight on 2015/1/25.
7 | */
8 | public class RowDescriptor {
9 | public int iconRes;
10 | public String lable;
11 | public RowActionEnum action;
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/bean/TestEntity.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.bean;
2 |
3 | import com.android.framewok.bean.Entity;
4 |
5 | /**
6 | * Created by SK on 2016-05-24.
7 | */
8 | public class TestEntity extends Entity{
9 |
10 | public String country;
11 |
12 | public String country_id;
13 |
14 | public String ip;
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/bean/TestResponse.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.bean;
2 |
3 | import junit.framework.Test;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * Created by SK on 2016-05-24.
9 | */
10 | public class TestResponse {
11 |
12 | public int code;
13 |
14 | public TestEntity data;
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/exception/ApiException.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.exception;
2 |
3 | /**
4 | * Created by liukun on 16/3/10.
5 | */
6 | public class ApiException extends RuntimeException {
7 |
8 | public static final int USER_NOT_EXIST = 100;
9 | public static final int WRONG_PASSWORD = 101;
10 |
11 | public ApiException(int resultCode) {
12 | this(getApiExceptionMessage(resultCode));
13 | }
14 |
15 | public ApiException(String detailMessage) {
16 | super(detailMessage);
17 | }
18 |
19 | /**
20 | * 由于服务器传递过来的错误信息直接给用户看的话,用户未必能够理解
21 | * 需要根据错误码对错误信息进行一个转换,在显示给用户
22 | * @param code
23 | * @return
24 | */
25 | private static String getApiExceptionMessage(int code){
26 | String message = "";
27 | switch (code) {
28 | case USER_NOT_EXIST:
29 | message = "该用户不存在";
30 | break;
31 | case WRONG_PASSWORD:
32 | message = "密码错误";
33 | break;
34 | default:
35 | message = "未知错误";
36 |
37 | }
38 | return message;
39 | }
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/fragment/AttendNotesFragment.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.fragment;
2 |
3 | import com.android.framewok.base.BaseFragment;
4 | import com.xylife.community.R;
5 |
6 | /**
7 | * Created by SK on 2016-05-27.
8 | */
9 | public class AttendNotesFragment extends BaseFragment {
10 |
11 | public AttendNotesFragment() {
12 | }
13 |
14 | @Override
15 | protected int getLayoutId() {
16 | return R.layout.fragment_attend_notes;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/fragment/CommentFragment.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.fragment;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.view.View;
6 | import android.widget.Button;
7 | import android.widget.TextView;
8 |
9 | import com.android.framewok.base.BaseFragment;
10 | import com.xylife.community.R;
11 | import com.xylife.community.ui.CommentActivity;
12 |
13 | import butterknife.BindView;
14 | import butterknife.ButterKnife;
15 |
16 | /**
17 | * Created by SK on 2016-05-27.
18 | */
19 | public class CommentFragment extends BaseFragment{
20 |
21 | @BindView(R.id.comment_btn)
22 | Button comment;
23 |
24 | public CommentFragment() {
25 | }
26 |
27 | @Override
28 | protected int getLayoutId() {
29 | return R.layout.fragment_comment;
30 | }
31 |
32 |
33 | @Override
34 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
35 | super.onViewCreated(view, savedInstanceState);
36 | ButterKnife.bind(this, view);
37 | initView(view);
38 | initData();
39 | }
40 |
41 | @Override
42 | public void initView(View view) {
43 | comment.setOnClickListener(this);
44 | }
45 |
46 | @Override
47 | public void onClick(View view) {
48 | switch (view.getId()) {
49 | case R.id.comment_btn:
50 | gotoActivity(CommentActivity.class);
51 | break;
52 | default:
53 | break;
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/fragment/HomeFragment.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.fragment;
2 |
3 | import android.support.v7.widget.LinearLayoutManager;
4 | import android.view.View;
5 |
6 | import com.android.framewok.base.ListBaseAdapter;
7 | import com.cundong.recyclerview.CommonHeader;
8 | import com.cundong.recyclerview.RecyclerViewUtils;
9 | import com.xylife.community.R;
10 | import com.xylife.community.adapter.ExerciseListAdapter;
11 | import com.xylife.community.api.APIWrapper;
12 | import com.xylife.community.base.BaseListFragment;
13 | import com.xylife.community.bean.Exercise;
14 | import com.xylife.community.bean.Response;
15 | import com.xylife.community.view.HomeSlideShowView;
16 |
17 | import java.util.List;
18 |
19 | import rx.Observable;
20 |
21 |
22 | public class HomeFragment extends BaseListFragment> {
23 |
24 | private HomeSlideShowView slideShowView;
25 | @Override
26 | public void initView(View view) {
27 | super.initView(view);
28 |
29 | headerView = new CommonHeader(getActivity(), R.layout.layout_home_header);
30 | RecyclerViewUtils.setHeaderView(mRecyclerView, headerView);
31 |
32 | slideShowView = (HomeSlideShowView) headerView.findViewById(R.id.banner_view);
33 | }
34 |
35 | @Override
36 | protected ListBaseAdapter getListAdapter() {
37 | return new ExerciseListAdapter(0);
38 | }
39 |
40 |
41 | @Override
42 | protected void onRefresh() {
43 | if (null != slideShowView){
44 | slideShowView.refreshView();
45 | }
46 |
47 | }
48 |
49 | @Override
50 | public void initData() {
51 | super.initData();
52 |
53 | }
54 |
55 | @Override
56 | protected Observable>> sendRequestData() {
57 | return APIWrapper.getInstance().queryLookUp("人才",mCurrentPage);
58 | }
59 |
60 | @Override
61 | protected void initLayoutManager() {
62 | mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
63 | }
64 |
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/fragment/PartyDetailFragment.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.fragment;
2 |
3 | import com.android.framewok.base.BaseFragment;
4 | import com.xylife.community.R;
5 |
6 | /**
7 | * Created by SK on 2016-05-27.
8 | */
9 | public class PartyDetailFragment extends BaseFragment {
10 |
11 |
12 | public PartyDetailFragment() {
13 |
14 | }
15 |
16 | @Override
17 | protected int getLayoutId() {
18 | return R.layout.fragment_party_detail;
19 | }
20 |
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/fragment/ScheduleFragment.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.fragment;
2 |
3 | import android.support.v7.widget.LinearLayoutManager;
4 | import android.view.View;
5 |
6 | import com.android.framewok.base.ListBaseAdapter;
7 | import com.android.framewok.util.TLog;
8 | import com.xylife.community.adapter.ExerciseListAdapter;
9 | import com.xylife.community.api.APIWrapper;
10 | import com.xylife.community.base.BaseListFragment;
11 | import com.xylife.community.bean.Exercise;
12 | import com.xylife.community.bean.Response;
13 |
14 | import java.util.List;
15 |
16 | import rx.Observable;
17 |
18 | /**
19 | * Created by SK on 2016-05-30.
20 | *
21 | */
22 | public class ScheduleFragment extends BaseListFragment> {
23 |
24 |
25 | @Override
26 | public void initView(View view) {
27 | super.initView(view);
28 |
29 | }
30 |
31 | @Override
32 | protected ListBaseAdapter getListAdapter() {
33 | return new ExerciseListAdapter(1);
34 | }
35 |
36 | @Override
37 | protected void initLayoutManager() {
38 | mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
39 | }
40 |
41 | @Override
42 | public void initData() {
43 | super.initData();
44 | }
45 |
46 | @Override
47 | protected Observable>> sendRequestData() {
48 | TLog.log("sendRequestData mCurrentPage = " + mCurrentPage);
49 | return APIWrapper.getInstance().queryLookUp("人才",mCurrentPage);
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/fragment/UserCenterFragment.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.fragment;
2 |
3 |
4 | import android.os.Bundle;
5 | import android.support.v7.widget.AppCompatTextView;
6 | import android.view.View;
7 |
8 | import com.android.framewok.base.BaseFragment;
9 | import com.android.framewok.widget.CircleImageView;
10 | import com.xylife.community.R;
11 | import com.xylife.community.ui.FeedbackActivity;
12 | import com.xylife.community.ui.UserInfoActivity;
13 |
14 | import butterknife.BindView;
15 | import butterknife.ButterKnife;
16 |
17 | public class UserCenterFragment extends BaseFragment {
18 |
19 | @BindView(R.id.my_info)
20 | AppCompatTextView myInfo;
21 | @BindView(R.id.avatar_image)
22 | CircleImageView avatarImg;
23 | @BindView(R.id.feedback)
24 | AppCompatTextView feedback;
25 |
26 | @Override
27 | protected int getLayoutId() {
28 | return R.layout.fragment_user_center;
29 | }
30 |
31 | @Override
32 | public void onViewCreated(View view, Bundle savedInstanceState) {
33 | super.onViewCreated(view, savedInstanceState);
34 | ButterKnife.bind(this, view);
35 | initView(view);
36 | initData();
37 | }
38 |
39 | @Override
40 | public void initView(View view) {
41 | super.initView(view);
42 | avatarImg.setOnClickListener(this);
43 | myInfo.setOnClickListener(this);
44 | feedback.setOnClickListener(this);
45 | }
46 |
47 | @Override
48 | public void onClick(View view) {
49 | switch (view.getId()) {
50 | case R.id.avatar_image:
51 | gotoActivity(UserInfoActivity.class);
52 | break;
53 | case R.id.my_info:
54 | gotoActivity(UserInfoActivity.class);
55 | break;
56 | case R.id.feedback:
57 | gotoActivity(FeedbackActivity.class);
58 | break;
59 | default:
60 | break;
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/listener/OnRowClickListener.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.listener;
2 |
3 | import android.view.View;
4 |
5 | /**
6 | * Created by Twilight on 2015/1/25.
7 | */
8 | public interface OnRowClickListener {
9 | void onRowClick(View view);
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/ui/ChargingPileActivity.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.ui;
2 |
3 | import com.xylife.community.R;
4 | import com.xylife.community.base.BaseActivity;
5 |
6 | /**
7 | * Created by SK on 2016-05-18.
8 | */
9 | public class ChargingPileActivity extends BaseActivity {
10 |
11 | @Override
12 | protected int getLayoutId() {
13 | return R.layout.activity_charging_pile;
14 | }
15 |
16 | @Override
17 | public void initView() {
18 | mTitleText.setText(R.string.charging_pile);
19 | }
20 |
21 | @Override
22 | public void initData() {
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/ui/CommentActivity.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.ui;
2 |
3 | import com.xylife.community.R;
4 | import com.xylife.community.base.BaseActivity;
5 |
6 | /**
7 | * Created by SK on 2016-05-30.
8 | */
9 | public class CommentActivity extends BaseActivity {
10 |
11 | @Override
12 | protected int getLayoutId() {
13 | return R.layout.activity_comment;
14 | }
15 |
16 | @Override
17 | public void initView() {
18 | mTitleText.setText(R.string.comment);
19 | }
20 |
21 | @Override
22 | public void initData() {
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/ui/FeedbackActivity.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.ui;
2 |
3 | import com.xylife.community.R;
4 | import com.xylife.community.base.BaseTextActivity;
5 |
6 | /**
7 | * Created by SK on 2016-06-01.
8 | */
9 |
10 | public class FeedbackActivity extends BaseTextActivity {
11 |
12 | @Override
13 | protected int getLayoutId() {
14 | return R.layout.acitivity_feedback;
15 | }
16 |
17 | @Override
18 | public void initView() {
19 | mTitleText.setText(R.string.title_feedback);
20 | mRightText.setText(R.string.send);
21 | }
22 |
23 | @Override
24 | public void initData() {
25 |
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/ui/ForgetPwdActivity.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.ui;
2 |
3 | import android.view.View;
4 | import android.widget.Button;
5 |
6 | import com.xylife.community.R;
7 | import com.xylife.community.base.BaseActivity;
8 | import com.xylife.community.base.BaseTextActivity;
9 | import com.xylife.community.utils.FlipitAnimation;
10 |
11 | import butterknife.BindView;
12 |
13 | /**
14 | * Created by SK on 2016-05-17.
15 | */
16 | public class ForgetPwdActivity extends BaseTextActivity {
17 |
18 | @BindView(R.id.next)
19 | Button next;
20 | @BindView(R.id.reset_pwd)
21 | Button resetPwd;
22 | @BindView(R.id.retrieve_pwd_layout)
23 | View retrievePwdLayout;
24 | @BindView(R.id.reset_pwd_layout)
25 | View resetPwdLayout;
26 |
27 | private FlipitAnimation flipitAnimation;
28 |
29 | @Override
30 | protected int getLayoutId() {
31 | return R.layout.activity_forget_pwd;
32 | }
33 |
34 | @Override
35 | public void initView() {
36 | mTitleText.setText(R.string.retrieve_pwd);
37 | mRightText.setText(R.string.register);
38 |
39 | next.setOnClickListener(this);
40 | resetPwd.setOnClickListener(this);
41 | mRightText.setOnClickListener(this);
42 |
43 | flipitAnimation = new FlipitAnimation(retrievePwdLayout, resetPwdLayout);
44 | }
45 |
46 | @Override
47 | public void initData() {
48 |
49 | }
50 |
51 | @Override
52 | public void onClick(View view) {
53 | super.onClick(view);
54 | switch (view.getId()) {
55 | case R.id.next:
56 | flipitAnimation.flipit();
57 | break;
58 | case R.id.reset_pwd:
59 | flipitAnimation.flipit();
60 | break;
61 | case R.id.right_text:
62 | gotoActivity(RegisterActivity.class);
63 | break;
64 | default:
65 | break;
66 | }
67 | }
68 |
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/ui/FragmentDetailsActivity.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.ui;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.support.v4.app.FragmentManager;
6 | import android.support.v4.app.FragmentTransaction;
7 |
8 | import com.xylife.community.R;
9 | import com.xylife.community.base.BaseActivity;
10 |
11 |
12 | public class FragmentDetailsActivity extends BaseActivity {
13 | public static final int DISPLAY_NEWS = 0;
14 | public static final String BUNDLE_KEY_DISPLAY_TYPE = "BUNDLE_KEY_DISPLAY_TYPE";
15 |
16 | @Override
17 | protected int getLayoutId() {
18 | return R.layout.activity_fragment_details;
19 | }
20 |
21 | @Override
22 | public void initView() {
23 | mTitleText.setText("操作统计");
24 | }
25 |
26 | @Override
27 | public void initData() {
28 |
29 | Fragment fragment = null;
30 | Bundle bundle = getIntent().getExtras();
31 | int displayType = bundle.getInt(BUNDLE_KEY_DISPLAY_TYPE, DISPLAY_NEWS);
32 | switch (displayType) {
33 | case DISPLAY_NEWS:
34 | fragment = new Fragment();
35 | break;
36 | default:
37 | break;
38 | }
39 |
40 | FragmentManager manager = getSupportFragmentManager();
41 | FragmentTransaction transaction = manager.beginTransaction();
42 | transaction.add(R.id.fragment, fragment);
43 | transaction.commit();
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/ui/RegisterActivity.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.ui;
2 |
3 | import android.view.View;
4 | import android.widget.Button;
5 |
6 | import com.xylife.community.R;
7 | import com.xylife.community.base.BaseActivity;
8 | import com.xylife.community.utils.FlipitAnimation;
9 |
10 | import butterknife.BindView;
11 |
12 | /**
13 | * Created by SK on 2016-05-17.
14 | */
15 | public class RegisterActivity extends BaseActivity {
16 |
17 | @BindView(R.id.input_phone_layout)
18 | View inputPhoneLayout;
19 | @BindView(R.id.input_code_layout)
20 | View inputCodeLayout;
21 | @BindView(R.id.next)
22 | Button next;
23 | @BindView(R.id.completed)
24 | Button completed;
25 |
26 | private FlipitAnimation flipitAnimation;
27 |
28 | @Override
29 | protected int getLayoutId() {
30 | return R.layout.activity_register;
31 | }
32 |
33 | @Override
34 | public void initView() {
35 | mTitleText.setText(R.string.register);
36 |
37 | next.setOnClickListener(this);
38 | completed.setOnClickListener(this);
39 |
40 | flipitAnimation = new FlipitAnimation(inputPhoneLayout, inputCodeLayout);
41 | }
42 |
43 | @Override
44 | public void initData() {
45 |
46 | }
47 |
48 | @Override
49 | public void onClick(View view) {
50 | super.onClick(view);
51 | switch (view.getId()) {
52 | case R.id.next:
53 | flipitAnimation.flipit();
54 | break;
55 | case R.id.completed:
56 | flipitAnimation.flipit();
57 | break;
58 | default:
59 | break;
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/ui/SettingActivity.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.ui;
2 |
3 | import com.xylife.community.R;
4 | import com.xylife.community.base.BaseActivity;
5 |
6 | /**
7 | * Created by SK on 2016-05-17.
8 | */
9 | public class SettingActivity extends BaseActivity {
10 |
11 | @Override
12 | protected int getLayoutId() {
13 | return R.layout.activity_setting;
14 | }
15 |
16 | @Override
17 | public void initView() {
18 | mTitleText.setText(R.string.setting);
19 | }
20 |
21 | @Override
22 | public void initData() {
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/ui/SignActivity.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.ui;
2 |
3 | import com.xylife.community.R;
4 | import com.xylife.community.base.BaseActivity;
5 |
6 | /**
7 | * Created by SK on 2016-05-27.
8 | */
9 | public class SignActivity extends BaseActivity {
10 |
11 |
12 | @Override
13 | protected int getLayoutId() {
14 | return R.layout.activity_sign;
15 | }
16 |
17 | @Override
18 | public void initView() {
19 |
20 |
21 | }
22 |
23 | @Override
24 | public void initData() {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/ui/UserInfoActivity.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.ui;
2 |
3 | import com.xylife.community.R;
4 | import com.xylife.community.base.BaseActivity;
5 |
6 | /**
7 | * Created by SK on 2016-05-27.
8 | */
9 | public class UserInfoActivity extends BaseActivity {
10 |
11 | @Override
12 | protected int getLayoutId() {
13 | return R.layout.activity_user_info;
14 | }
15 |
16 | @Override
17 | public void initView() {
18 | mTitleText.setText("资料修改");
19 | }
20 |
21 | @Override
22 | public void initData() {
23 |
24 | }
25 |
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/utils/Bimp.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.utils;
2 |
3 | import java.io.BufferedInputStream;
4 | import java.io.File;
5 | import java.io.FileInputStream;
6 | import java.io.IOException;
7 | import java.util.ArrayList;
8 | import java.util.List;
9 |
10 | import android.graphics.Bitmap;
11 | import android.graphics.BitmapFactory;
12 |
13 | import com.xylife.community.bean.ImageItem;
14 |
15 |
16 | public class Bimp {
17 | public static int max = 0;
18 |
19 | public static ArrayList tempSelectBitmap = new ArrayList(); //选择的图片的临时列表
20 |
21 | public static Bitmap revitionImageSize(String path) throws IOException {
22 | BufferedInputStream in = new BufferedInputStream(new FileInputStream(
23 | new File(path)));
24 | BitmapFactory.Options options = new BitmapFactory.Options();
25 | options.inJustDecodeBounds = true;
26 | BitmapFactory.decodeStream(in, null, options);
27 | in.close();
28 | int i = 0;
29 | Bitmap bitmap = null;
30 | while (true) {
31 | if ((options.outWidth >> i <= 1000)
32 | && (options.outHeight >> i <= 1000)) {
33 | in = new BufferedInputStream(
34 | new FileInputStream(new File(path)));
35 | options.inSampleSize = (int) Math.pow(2.0D, i);
36 | options.inJustDecodeBounds = false;
37 | bitmap = BitmapFactory.decodeStream(in, null, options);
38 | break;
39 | }
40 | i += 1;
41 | }
42 | return bitmap;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/utils/Constant.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.utils;
2 |
3 | public class Constant {
4 | public static final int PAGE_SIZE = 10;// 默认分页大小
5 | public static final String OK = "1";
6 |
7 | public static String BASEURL_IP = "http://ip.taobao.com"; //服务器地址
8 | public static String BASEURL="http://apis.baidu.com"; //服务器地址
9 | public static String APIKEY="7ff49d067102772f69d7b4f26c380287";
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/utils/DoubleClickExitHelper.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.utils;
2 |
3 |
4 | import android.app.Activity;
5 | import android.os.Handler;
6 | import android.os.Looper;
7 | import android.support.design.widget.Snackbar;
8 | import android.view.KeyEvent;
9 | import android.view.View;
10 |
11 | import com.android.framewok.AppManager;
12 |
13 | /**
14 | * 双击退出工具类
15 | *
16 | * @author wxc
17 | */
18 | public class DoubleClickExitHelper {
19 |
20 | private final Activity mActivity;
21 |
22 | private boolean isOnKeyBacking;
23 | private Handler mHandler;
24 | private Snackbar snackbar;
25 |
26 | public DoubleClickExitHelper(Activity activity) {
27 | mActivity = activity;
28 | mHandler = new Handler(Looper.getMainLooper());
29 | AppManager.getAppManager().addActivity(mActivity);
30 | }
31 |
32 | /**
33 | * Activity onKeyDown事件
34 | */
35 | public boolean onKeyDown(int keyCode, View view) {
36 | if (keyCode != KeyEvent.KEYCODE_BACK) {
37 | return false;
38 | }
39 | if (isOnKeyBacking) {
40 | mHandler.removeCallbacks(onBackTimeRunnable);
41 | if (snackbar != null) {
42 | snackbar.dismiss();
43 | }
44 | AppManager.getAppManager().AppExit(mActivity);
45 | return true;
46 | } else {
47 | isOnKeyBacking = true;
48 | if (snackbar == null) {
49 | snackbar = Snackbar.make(view, "再次点击退出应用", Snackbar.LENGTH_SHORT);
50 | }
51 | snackbar.show();
52 | mHandler.postDelayed(onBackTimeRunnable, 2000);
53 | return true;
54 | }
55 | }
56 |
57 | private Runnable onBackTimeRunnable = new Runnable() {
58 | @Override
59 | public void run() {
60 | isOnKeyBacking = false;
61 | if (snackbar != null) {
62 | snackbar.dismiss();
63 | }
64 | }
65 | };
66 | }
67 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/utils/FlipitAnimation.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.utils;
2 |
3 | import android.animation.Animator;
4 | import android.animation.AnimatorListenerAdapter;
5 | import android.animation.ObjectAnimator;
6 | import android.view.View;
7 | import android.view.animation.AccelerateInterpolator;
8 | import android.view.animation.DecelerateInterpolator;
9 | import android.view.animation.Interpolator;
10 |
11 | /**
12 | * Created by SK on 2016-05-17.
13 | */
14 | public class FlipitAnimation {
15 | private Interpolator accelerator = new AccelerateInterpolator();
16 | private Interpolator decelerator = new DecelerateInterpolator();
17 |
18 | private View layout1, layout2;
19 |
20 | public FlipitAnimation(View layout1, View layout2) {
21 | this.layout1 = layout1;
22 | this.layout2 = layout2;
23 | }
24 |
25 | public void flipit() {
26 | final View visibleList;
27 | final View invisibleList;
28 | if (layout1.getVisibility() == View.GONE) {
29 | visibleList = layout2;
30 | invisibleList = layout1;
31 | } else {
32 | invisibleList = layout2;
33 | visibleList = layout1;
34 | }
35 | ObjectAnimator visToInvis = ObjectAnimator.ofFloat(visibleList, "rotationY", 0f, 90f);
36 | visToInvis.setDuration(500);
37 | visToInvis.setInterpolator(accelerator);
38 | final ObjectAnimator invisToVis = ObjectAnimator.ofFloat(invisibleList, "rotationY", -90f, 0f);
39 | invisToVis.setDuration(500);
40 | invisToVis.setInterpolator(decelerator);
41 | visToInvis.addListener(new AnimatorListenerAdapter() {
42 | @Override
43 | public void onAnimationEnd(Animator anim) {
44 | visibleList.setVisibility(View.GONE);
45 | invisToVis.start();
46 | invisibleList.setVisibility(View.VISIBLE);
47 | }
48 | });
49 | visToInvis.start();
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xylife/community/utils/RowActionEnum.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community.utils;
2 |
3 | /**
4 | * Created by Twilight on 2015/1/25.
5 | */
6 | public enum RowActionEnum {
7 | action, POSTS
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/anim_scale_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/anim_scale_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/abs_list_selector_background_transition_holo_dark.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/action_bar_item_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_product_default.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/drawable/ic_product_default.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/list_selector_holo_dark.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/picker_photo_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
8 |
9 |
10 |
11 | -
12 |
13 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progressloading.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | -
20 |
26 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_common_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_common_corners_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_green_corners_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_common_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_common_button_pressed.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_common_corners_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_common_corners_button_pressed.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_green_corners_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_green_corners_button_pressed.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_orange_corners_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/widget_general_row_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/acitivity_feedback.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_charging_pile.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
11 |
12 |
15 |
16 |
21 |
22 |
26 |
27 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_comment.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
11 |
12 |
16 |
17 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_fragment_details.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_party.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_sign.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
13 |
21 |
22 |
23 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_attend_notes.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_base_party.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
10 |
14 |
15 |
19 |
20 |
21 |
22 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_comment.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_home.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_party_detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_pull_refresh_recyclerview.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
15 |
16 |
21 |
22 |
26 |
27 |
28 |
33 |
34 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_schedule.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_tab_viewpager.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/gradient_icon_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/gradient_textview_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_horizontal_line.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_list_item_news.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
28 |
29 |
37 |
38 |
46 |
47 |
48 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_slideshow.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
18 |
19 |
24 |
25 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/picker_item_photo.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/title_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
15 |
16 |
27 |
28 |
38 |
39 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/title_bar_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
14 |
15 |
23 |
24 |
34 |
35 |
43 |
44 |
45 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_empty_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_error_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
17 |
18 |
22 |
23 |
29 |
30 |
35 |
36 |
37 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/widget_round_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
27 |
28 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/widget_round_text_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
27 |
28 |
38 |
39 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/abs__list_focused_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/abs__list_focused_holo.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/abs__list_longpressed_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/abs__list_longpressed_holo.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/abs__list_pressed_holo_dark.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/abs__list_pressed_holo_dark.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/abs__list_selector_disabled_holo_dark.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/abs__list_selector_disabled_holo_dark.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/back_narrow_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/back_narrow_btn.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/btn_add_big.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/btn_add_big.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/checkbox_checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/checkbox_checked.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/dot_blur.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/dot_blur.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/dot_focus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/dot_focus.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/girl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/girl.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/ic_about.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_around_shop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/ic_around_shop.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/ic_avatar.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_feedback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/ic_feedback.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_loaction.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/ic_loaction.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_page_failed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/ic_page_failed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_page_icon_network.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/ic_page_icon_network.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_photo_default.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/ic_photo_default.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_scan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/ic_scan.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_time.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/ic_time.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_to_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/ic_to_top.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_user_avater.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/ic_user_avater.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/loading.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/right_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xhdpi/right_arrow.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_menu_home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xxhdpi/ic_menu_home.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_menu_home_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xxhdpi/ic_menu_home_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_menu_me.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xxhdpi/ic_menu_me.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_menu_me_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xxhdpi/ic_menu_me_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_menu_schedule.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xxhdpi/ic_menu_schedule.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_menu_schedule_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xxhdpi/ic_menu_schedule_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh-rCN/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | - @string/app_name
7 | - 日程
8 | - 我的
9 |
10 |
11 |
12 | - 全部
13 | - 比亚迪
14 | - 宝马
15 | - 特斯拉
16 | - 雪佛兰
17 | - 本田
18 | - 丰田
19 |
20 |
21 |
22 | - 活动详情
23 | - 参加须知
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attr.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FF44C88E
4 | #FF26A66E
5 | #FF44C88E
6 |
7 |
8 | #FFF0F0F0
9 | #44C88E
10 | #999999
11 |
12 | #ff44c88e
13 | #ff26a66e
14 | #ffababab
15 | #ff898989
16 | #ff666666
17 |
18 | #ff333333
19 |
20 | #FF858585
21 | #FF999999
22 |
23 | #FFf96060
24 |
25 | #dddddd
26 |
27 | #d9d9d9
28 | #e5e5e5
29 |
30 | #ffb2b2b2
31 | #ffdddddd
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 | 200dp
7 |
8 |
--------------------------------------------------------------------------------
/app/src/test/java/com/xylife/community/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.xylife.community;
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 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.0-alpha2'
9 | classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
10 | }
11 | }
12 |
13 | allprojects {
14 | repositories {
15 | jcenter()
16 | }
17 | }
18 |
19 | task clean(type: Delete) {
20 | delete rootProject.buildDir
21 | }
22 |
--------------------------------------------------------------------------------
/build/generated/mockable-android-23.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/build/generated/mockable-android-23.jar
--------------------------------------------------------------------------------
/common_library/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/common_library/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.3"
6 |
7 | defaultConfig {
8 | minSdkVersion 16
9 | targetSdkVersion 23
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile fileTree(dir: 'libs', include: ['*.jar'])
23 | testCompile 'junit:junit:4.12'
24 | compile 'com.android.support:appcompat-v7:23.4.0'
25 | compile 'com.android.support:recyclerview-v7:23.4.0'
26 |
27 | compile 'com.trello:rxlifecycle:0.6.1'
28 | compile 'com.trello:rxlifecycle-components:0.6.1'
29 | }
30 |
--------------------------------------------------------------------------------
/common_library/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 /Users/lizhixian/Documents/Android/studio_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 |
--------------------------------------------------------------------------------
/common_library/src/androidTest/java/com/android/framewok/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok;
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 | }
--------------------------------------------------------------------------------
/common_library/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/common_library/src/main/java/com/android/framewok/AppBaseContext.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok;
2 |
3 | import android.app.Application;
4 |
5 | public class AppBaseContext extends Application {
6 |
7 | private static AppBaseContext instance;
8 |
9 | @Override
10 | public void onCreate() {
11 | super.onCreate();
12 | instance = this;
13 | }
14 |
15 |
16 | public static AppBaseContext getInstance() {
17 | return instance;
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/common_library/src/main/java/com/android/framewok/base/BaseFragment.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok.base;
2 |
3 |
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.support.v4.app.Fragment;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 |
11 | import com.android.framewok.AppBaseContext;
12 | import com.android.framewok.interf.BaseFragmentInterface;
13 |
14 |
15 | public class BaseFragment extends Fragment implements View.OnClickListener,BaseFragmentInterface {
16 | public final String TAG= this.getClass().getName();
17 | protected LayoutInflater mInflater;
18 |
19 | public AppBaseContext getApplication() {
20 | return (AppBaseContext) getActivity().getApplication();
21 | }
22 |
23 | @Override
24 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
25 | Bundle savedInstanceState) {
26 | this.mInflater = inflater;
27 | View view = inflater.inflate(getLayoutId(), container, false);
28 | return view;
29 | }
30 |
31 | protected int getLayoutId() {
32 | return 0;
33 | }
34 |
35 | @Override
36 | public void initView(View view) {
37 |
38 | }
39 |
40 | @Override
41 | public void initData() {
42 |
43 | }
44 |
45 | @Override
46 | public void onClick(View view) {
47 |
48 | }
49 |
50 | /**
51 | * 打开一个Activity 默认 不关闭当前activity
52 | * @param clz
53 | */
54 | public void gotoActivity(Class> clz) {
55 | gotoActivity(clz, false, null);
56 | }
57 |
58 | public void gotoActivity(Class> clz,boolean isCloseCurrentActivity) {
59 | gotoActivity(clz, isCloseCurrentActivity, null);
60 | }
61 |
62 | public void gotoActivity(Class> clz,boolean isCloseCurrentActivity,Bundle ex) {
63 | Intent intent=new Intent(getActivity(), clz);
64 | if(ex!=null)
65 | intent.putExtras(ex);
66 | startActivity(intent);
67 | if (isCloseCurrentActivity) {
68 | getActivity().finish();
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/common_library/src/main/java/com/android/framewok/base/BaseParentActivity.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok.base;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.view.LayoutInflater;
7 |
8 | import com.android.framewok.AppManager;
9 | import com.android.framewok.interf.BaseViewInterface;
10 | import com.trello.rxlifecycle.components.support.RxAppCompatActivity;
11 |
12 | public abstract class BaseParentActivity extends RxAppCompatActivity implements BaseViewInterface {
13 |
14 | protected LayoutInflater mInflater;
15 | protected Context mContext;
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | AppManager.getAppManager().addActivity(this);
21 | if (getLayoutId() != 0) {
22 | setContentView(getLayoutId());
23 | }
24 |
25 | mInflater = getLayoutInflater();
26 | mContext = this;
27 | initTitleBar();
28 | initView();
29 | initData();
30 |
31 | }
32 |
33 | /**
34 | * 打开一个Activity 默认 不关闭当前activity
35 | * @param clz
36 | */
37 | public void gotoActivity(Class> clz) {
38 | gotoActivity(clz, false, null);
39 | }
40 |
41 | public void gotoActivity(Class> clz,boolean isCloseCurrentActivity) {
42 | gotoActivity(clz, isCloseCurrentActivity, null);
43 | }
44 |
45 | public void gotoActivity(Class> clz,boolean isCloseCurrentActivity,Bundle ex) {
46 | Intent intent=new Intent(this, clz);
47 | if(ex!=null)
48 | intent.putExtras(ex);
49 | startActivity(intent);
50 | if (isCloseCurrentActivity) {
51 | finish();
52 | }
53 | }
54 |
55 | @Override
56 | protected void onDestroy() {
57 | super.onDestroy();
58 | }
59 |
60 | protected int getLayoutId() {
61 | return 0;
62 | }
63 |
64 | protected void initTitleBar() {
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/common_library/src/main/java/com/android/framewok/base/ListBaseAdapter.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok.base;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.ViewGroup;
6 |
7 | import com.android.framewok.bean.Entity;
8 |
9 | import java.util.ArrayList;
10 | import java.util.Collection;
11 |
12 | public class ListBaseAdapter extends RecyclerView.Adapter {
13 | protected Context mContext;
14 | protected int mScreenWidth;
15 | public void setScreenWidth(int width) {
16 | mScreenWidth = width;
17 | }
18 |
19 | protected ArrayList mDataList = new ArrayList<>();
20 |
21 | @Override
22 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
23 | return null;
24 | }
25 |
26 | @Override
27 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
28 |
29 | }
30 |
31 | @Override
32 | public int getItemCount() {
33 | return mDataList.size();
34 | }
35 |
36 | public void setDataList(Collection list) {
37 | this.mDataList.clear();
38 | this.mDataList.addAll(list);
39 | notifyDataSetChanged();
40 | }
41 |
42 | public void addAll(Collection list) {
43 | int lastIndex = this.mDataList.size();
44 | if (this.mDataList.addAll(list)) {
45 | notifyItemRangeInserted(lastIndex, list.size());
46 | }
47 | }
48 |
49 | public void clear() {
50 | mDataList.clear();
51 | notifyDataSetChanged();
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/common_library/src/main/java/com/android/framewok/bean/Entity.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok.bean;
2 |
3 |
4 | /**
5 | * 实体类
6 | *
7 | */
8 | public abstract class Entity {
9 | protected int id;
10 | }
11 |
--------------------------------------------------------------------------------
/common_library/src/main/java/com/android/framewok/interf/BaseFragmentInterface.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok.interf;
2 |
3 | import android.view.View;
4 |
5 | public interface BaseFragmentInterface {
6 |
7 | public void initView(View view);
8 |
9 | public void initData();
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/common_library/src/main/java/com/android/framewok/interf/BaseViewInterface.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok.interf;
2 |
3 | /**
4 | *
5 | * @author deyi
6 | *
7 | */
8 | public interface BaseViewInterface {
9 |
10 | public void initView();
11 |
12 | public void initData();
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/common_library/src/main/java/com/android/framewok/util/AppToast.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok.util;
2 |
3 | import android.content.Context;
4 | import android.widget.Toast;
5 |
6 | public class AppToast {
7 |
8 | protected static final String TAG = "AppToast";
9 | public static Toast toast;
10 |
11 | public static void showShortText(Context context, int resId) {
12 | if(context==null)return;
13 | if(toast != null)
14 | toast.cancel();
15 | toast = Toast.makeText(context, resId, Toast.LENGTH_SHORT);
16 | toast.show();
17 | }
18 | public static void showShortText(Context context, CharSequence text) {
19 | if(context==null)return;
20 | if(toast != null)
21 | toast.cancel();
22 | toast = Toast.makeText(context, text, Toast.LENGTH_SHORT);
23 | toast.show();
24 | }
25 |
26 |
27 |
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/common_library/src/main/java/com/android/framewok/util/NetUtil.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok.util;
2 |
3 | import android.content.Context;
4 | import android.net.ConnectivityManager;
5 | import android.net.NetworkInfo;
6 |
7 | public class NetUtil {
8 | public static boolean isNetConnected(Context context) {
9 | boolean isNetConnected;
10 | // 获得网络连接服务
11 | ConnectivityManager connManager = (ConnectivityManager) context
12 | .getSystemService(Context.CONNECTIVITY_SERVICE);
13 | NetworkInfo info = connManager.getActiveNetworkInfo();
14 | if (info != null && info.isAvailable()) {
15 | isNetConnected = true;
16 | } else {
17 | isNetConnected = false;
18 | }
19 | return isNetConnected;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/common_library/src/main/java/com/android/framewok/util/TLog.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok.util;
2 |
3 | import android.util.Log;
4 |
5 | public class TLog {
6 | public static final String LOG_TAG = "App";
7 | public static boolean DEBUG = true;
8 |
9 | public TLog() {
10 | }
11 |
12 | public static final void analytics(String log) {
13 | if (DEBUG)
14 | Log.d(LOG_TAG, log);
15 | }
16 |
17 | public static final void error(String log) {
18 | if (DEBUG)
19 | Log.e(LOG_TAG, "" + log);
20 | }
21 |
22 | public static final void log(String log) {
23 | if (DEBUG)
24 | Log.i(LOG_TAG, log);
25 | }
26 |
27 | public static final void log(String tag, String log) {
28 | if (DEBUG)
29 | Log.i(tag, log);
30 | }
31 |
32 | public static final void logv(String log) {
33 | if (DEBUG)
34 | Log.v(LOG_TAG, log);
35 | }
36 |
37 | public static final void warn(String log) {
38 | if (DEBUG)
39 | Log.w(LOG_TAG, log);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/common_library/src/main/java/com/android/framewok/util/Util.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok.util;
2 |
3 |
4 | import android.app.Activity;
5 | import android.content.Context;
6 | import android.graphics.Point;
7 | import android.text.TextUtils;
8 | import android.view.Display;
9 | import android.view.WindowManager;
10 |
11 | import java.io.UnsupportedEncodingException;
12 | import java.security.MessageDigest;
13 | import java.security.NoSuchAlgorithmException;
14 |
15 | public class Util {
16 |
17 | /*
18 | * MD5加密
19 | */
20 | public static String getMD5Text(String text) {
21 | if (TextUtils.isEmpty(text)) {
22 | return null;
23 | }
24 | MessageDigest messageDigest = null;
25 |
26 | try {
27 | messageDigest = MessageDigest.getInstance("MD5");
28 |
29 | messageDigest.reset();
30 |
31 | messageDigest.update(text.getBytes("UTF-8"));
32 | } catch (NoSuchAlgorithmException e) {
33 | System.out.println("NoSuchAlgorithmException caught!");
34 | System.exit(-1);
35 | } catch (UnsupportedEncodingException e) {
36 | e.printStackTrace();
37 | }
38 |
39 | byte[] byteArray = messageDigest.digest();
40 |
41 | StringBuffer md5StrBuff = new StringBuffer();
42 |
43 | for (int i = 0; i < byteArray.length; i++) {
44 | if (Integer.toHexString(0xFF & byteArray[i]).length() == 1)
45 | md5StrBuff.append("0").append(
46 | Integer.toHexString(0xFF & byteArray[i]));
47 | else
48 | md5StrBuff.append(Integer.toHexString(0xFF & byteArray[i]));
49 | }
50 | // 16位加密,从第9位到25位
51 | /*return md5StrBuff.substring(8, 24).toString().toLowerCase();*/
52 | //32位加密
53 | return md5StrBuff.toString().toLowerCase();
54 | }
55 |
56 | /**
57 | * 获得屏幕宽度
58 | *
59 | * @param context
60 | * @return
61 | */
62 | public static int getScreenWidth(Context context) {
63 | WindowManager windowManager = ((Activity) context).getWindowManager();
64 | Display display = windowManager.getDefaultDisplay();
65 | Point size = new Point();
66 | display.getSize(size);
67 | return size.x;//屏幕寬度
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/common_library/src/main/java/com/android/framewok/widget/DrawableCenterTextView.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok.widget;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.graphics.drawable.Drawable;
6 | import android.util.AttributeSet;
7 | import android.widget.TextView;
8 |
9 | /**
10 | * Created by Lzx on 2016/4/7.
11 | */
12 | public class DrawableCenterTextView extends TextView {
13 |
14 | public DrawableCenterTextView(Context context, AttributeSet attrs,
15 | int defStyle) {
16 | super(context, attrs, defStyle);
17 | }
18 |
19 | public DrawableCenterTextView(Context context, AttributeSet attrs) {
20 | super(context, attrs);
21 | }
22 |
23 | public DrawableCenterTextView(Context context) {
24 | super(context);
25 | }
26 |
27 | @Override
28 | protected void onDraw(Canvas canvas) {
29 | Drawable[] drawables = getCompoundDrawables();
30 | if (drawables != null) {
31 | Drawable drawableLeft = drawables[0];
32 | if (drawableLeft != null) {
33 | float textWidth = getPaint().measureText(getText().toString());
34 | int drawablePadding = getCompoundDrawablePadding();
35 | int drawableWidth = 0;
36 | drawableWidth = drawableLeft.getIntrinsicWidth();
37 | float bodyWidth = textWidth + drawableWidth + drawablePadding;
38 | canvas.translate((getWidth() - bodyWidth) / 2, 0);
39 | }
40 | }
41 | super.onDraw(canvas);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/common_library/src/main/res/drawable-xhdpi/loading_progress.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/common_library/src/main/res/drawable-xhdpi/loading_progress.png
--------------------------------------------------------------------------------
/common_library/src/main/res/drawable/bg_loading_dialog_shape.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/common_library/src/main/res/drawable/loading_dialog_progressbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/common_library/src/main/res/drawable/selector_white_preferences_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/common_library/src/main/res/drawable/shape_white_preferences_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/common_library/src/main/res/drawable/shape_white_preferences_item_pressed.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/common_library/src/main/res/layout/layout_loading_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
25 |
26 |
--------------------------------------------------------------------------------
/common_library/src/main/res/values/attr.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/common_library/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 48.0dip
3 |
4 | 12sp
5 | 14sp
6 | 16sp
7 | 18sp
8 | 20sp
9 |
10 |
11 | 16.0sp
12 | 14.0sp
13 | 12.0sp
14 | 10.0sp
15 |
16 |
17 |
--------------------------------------------------------------------------------
/common_library/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common_library/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | commonLibrary
3 |
4 |
5 | 点击屏幕,重新加载
6 | 暂无内容
7 | 加载中…
8 | 内容加载失败\r\n点击重新加载
9 | 没有可用的网络
10 | 没有可用的网络
11 |
12 |
--------------------------------------------------------------------------------
/common_library/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/common_library/src/test/java/com/android/framewok/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.android.framewok;
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 | }
--------------------------------------------------------------------------------
/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 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
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-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file is automatically generated by Android Studio.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must *NOT* be checked into Version Control Systems,
5 | # as it contains information specific to your local configuration.
6 | #
7 | # Location of the SDK. This is only used by Gradle.
8 | # For customization when using a Version Control System, please read the
9 | # header note.
10 | #Tue May 31 23:33:55 CST 2016
11 | sdk.dir=/Users/lizhixian/Documents/Android/studio_sdk
12 |
--------------------------------------------------------------------------------
/pic/app.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pic/app.gif
--------------------------------------------------------------------------------
/pull_recyclerview_library/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.3"
6 |
7 | defaultConfig {
8 | minSdkVersion 16
9 | targetSdkVersion 23
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile fileTree(dir: 'libs', include: ['*.jar'])
23 | testCompile 'junit:junit:4.12'
24 | compile 'com.android.support:recyclerview-v7:23.4.0'
25 | }
26 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/libs/universal-image-loader-1.9.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/libs/universal-image-loader-1.9.5.jar
--------------------------------------------------------------------------------
/pull_recyclerview_library/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-sdk-windows/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 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/androidTest/java/com/cundong/recyclerview/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview;
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 | }
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/BaseRefreshHeader.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview;
2 |
3 | /**
4 | * Created by jianghejie on 15/11/22.
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 | }
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/CommonFooter.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.RelativeLayout;
6 |
7 | /**
8 | * Created by cundong on 2015/10/9.
9 | *
10 | * RecyclerView的FooterView,简单的展示一个TextView
11 | */
12 | public class CommonFooter extends RelativeLayout {
13 |
14 | public CommonFooter(Context context,int resId) {
15 | super(context);
16 | init(context, resId);
17 | }
18 |
19 | public CommonFooter(Context context, AttributeSet attrs) {
20 | super(context, attrs);
21 | init(context);
22 | }
23 |
24 | public CommonFooter(Context context, AttributeSet attrs, int defStyleAttr) {
25 | super(context, attrs, defStyleAttr);
26 | init(context);
27 | }
28 |
29 | public void init(Context context) {
30 |
31 | inflate(context, R.layout.layout_recyclerview_footer, this);
32 | }
33 |
34 | public void init(Context context,int resId) {
35 |
36 | inflate(context, resId, this);
37 | }
38 | }
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/CommonHeader.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.RelativeLayout;
6 |
7 |
8 | /**
9 | * Created by cundong on 2015/10/9.
10 | *
11 | * RecyclerView的HeaderView,简单的展示一个TextView
12 | */
13 | public class CommonHeader extends RelativeLayout {
14 | int resId;
15 | public CommonHeader(Context context,int resId) {
16 | super(context);
17 | init(context,resId);
18 | }
19 |
20 | public CommonHeader(Context context, AttributeSet attrs) {
21 | super(context, attrs);
22 | init(context);
23 | }
24 |
25 | public CommonHeader(Context context, AttributeSet attrs, int defStyleAttr) {
26 | super(context, attrs, defStyleAttr);
27 | init(context);
28 | }
29 |
30 | public void init(Context context) {
31 |
32 | inflate(context, R.layout.layout_recyclerview_header, this);
33 | }
34 | public void init(Context context,int resId) {
35 |
36 | inflate(context, resId, this);
37 | }
38 | }
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/HeaderLayout.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.RelativeLayout;
6 |
7 |
8 | /**
9 | * Created by cundong on 2015/10/9.
10 | *
11 | * RecyclerView的HeaderView,简单的展示一个TextView
12 | */
13 | public class HeaderLayout extends RelativeLayout {
14 |
15 | public HeaderLayout(Context context, int resourcesId) {
16 | super(context);
17 | init(context, resourcesId);
18 | }
19 |
20 | public HeaderLayout(Context context, AttributeSet attrs, int resourcesId) {
21 | super(context, attrs);
22 | init(context, resourcesId);
23 | }
24 |
25 | public HeaderLayout(Context context, AttributeSet attrs, int defStyleAttr, int resourcesId) {
26 | super(context, attrs, defStyleAttr);
27 | init(context, resourcesId);
28 | }
29 |
30 | public void init(Context context, int resourcesId) {
31 |
32 | inflate(context, resourcesId, this);
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/HeaderSpanSizeLookup.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview;
2 |
3 | import android.support.v7.widget.GridLayoutManager;
4 |
5 | /**
6 | * Created by cundong on 2015/10/23.
7 | *
8 | * RecyclerView为GridLayoutManager时,设置了HeaderView,就会用到这个SpanSizeLookup
9 | */
10 | public class HeaderSpanSizeLookup extends GridLayoutManager.SpanSizeLookup {
11 |
12 | private HeaderAndFooterRecyclerViewAdapter adapter;
13 | private int mSpanSize = 1;
14 |
15 | public HeaderSpanSizeLookup(HeaderAndFooterRecyclerViewAdapter adapter, int spanSize) {
16 | this.adapter = adapter;
17 | this.mSpanSize = spanSize;
18 | }
19 |
20 | @Override
21 | public int getSpanSize(int position) {
22 | boolean isHeaderOrFooter = adapter.isHeader(position) || adapter.isFooter(position);
23 | return isHeaderOrFooter ? mSpanSize : 1;
24 | }
25 | }
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/MarginDecoration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.cundong.recyclerview;
18 |
19 | import android.content.Context;
20 | import android.content.res.TypedArray;
21 | import android.graphics.Canvas;
22 | import android.graphics.Paint;
23 | import android.graphics.Rect;
24 | import android.graphics.drawable.Drawable;
25 | import android.support.v4.view.ViewCompat;
26 | import android.support.v7.widget.GridLayoutManager;
27 | import android.support.v7.widget.LinearLayoutManager;
28 | import android.support.v7.widget.RecyclerView;
29 | import android.view.View;
30 |
31 | public class MarginDecoration extends RecyclerView.ItemDecoration {
32 |
33 | private int margin;
34 |
35 | public MarginDecoration(Context context,int margin) {
36 | this.margin = margin;
37 | }
38 |
39 | @Override
40 | public void getItemOffsets(
41 | Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
42 | outRect.set(margin, margin, margin, margin);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/OnListLoadNextPageListener.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview;
2 |
3 | import android.view.View;
4 |
5 | /**
6 | * Created by cundong on 2015/10/9.
7 | * RecyclerView/ListView/GridView 滑动加载下一页时的回调接口
8 | */
9 | public interface OnListLoadNextPageListener {
10 |
11 | /**
12 | * 开始加载下一页
13 | *
14 | * @param view 当前RecyclerView/ListView/GridView
15 | */
16 | public void onLoadNextPage(View view);
17 | }
18 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/OnScrollListener.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview;
2 |
3 |
4 | /**
5 | * Created by lzx on 2016/1/5.
6 | * RecyclerView
7 | */
8 | public interface OnScrollListener {
9 |
10 | public abstract void onScrollUp();//scroll down to up
11 |
12 | public abstract void onScrollDown();//scroll from up to down
13 |
14 | public abstract void onBottom();//load next page
15 |
16 | public abstract void onScrolled(int distanceX, int distanceY);// moving state,you can get the move distance
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/ProgressStyle.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview;
2 |
3 | /**
4 | * Created by jianghejie on 15/11/23.
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 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/SimpleViewSwitcher.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 |
8 | /**
9 | * Created by jianghejie on 15/11/22.
10 | */
11 | public class SimpleViewSwitcher extends ViewGroup {
12 |
13 | public SimpleViewSwitcher(Context context) {
14 | super(context);
15 | }
16 |
17 | public SimpleViewSwitcher(Context context, AttributeSet attrs) {
18 | this(context, attrs, 0);
19 | }
20 |
21 | public SimpleViewSwitcher(Context context, AttributeSet attrs, int defStyle) {
22 | super(context, attrs, defStyle);
23 | }
24 |
25 | @Override
26 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
27 | int childCount = this.getChildCount();
28 | int maxHeight = 0;
29 | int maxWidth = 0;
30 | for (int i = 0; i < childCount; i++) {
31 | View child = this.getChildAt(i);
32 | this.measureChild(child, widthMeasureSpec, heightMeasureSpec);
33 | int cw = child.getMeasuredWidth();
34 | // int ch = child.getMeasuredHeight();
35 | maxWidth = child.getMeasuredWidth();
36 | maxHeight = child.getMeasuredHeight();
37 | }
38 | setMeasuredDimension(maxWidth, maxHeight);
39 | }
40 |
41 | @Override
42 | protected void onLayout(boolean changed, int l, int t, int r, int b) {
43 |
44 | final int count = getChildCount();
45 |
46 | for (int i = 0; i < count; i++) {
47 | final View child = getChildAt(i);
48 | if (child.getVisibility() != View.GONE) {
49 | child.layout(0, 0, r - l, b - t);
50 |
51 | }
52 | }
53 | }
54 |
55 | public void setView(View view) {
56 | if (this.getChildCount() != 0){
57 | this.removeViewAt(0);
58 | }
59 | this.addView(view,0);
60 | }
61 |
62 | }
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/BallClipRotateIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.progressindicator.indicator;
2 |
3 | import android.animation.Animator;
4 | import android.animation.ValueAnimator;
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/16.
14 | */
15 | public class BallClipRotateIndicator extends BaseIndicatorController {
16 |
17 | float scaleFloat=1,degrees;
18 |
19 | @Override
20 | public void draw(Canvas canvas, Paint paint) {
21 | paint.setStyle(Paint.Style.STROKE);
22 | paint.setStrokeWidth(3);
23 |
24 | float circleSpacing=12;
25 | float x = (getWidth()) / 2;
26 | float y=(getHeight()) / 2;
27 | canvas.translate(x, y);
28 | canvas.scale(scaleFloat, scaleFloat);
29 | canvas.rotate(degrees);
30 | RectF rectF=new RectF(-x+circleSpacing,-y+circleSpacing,0+x-circleSpacing,0+y-circleSpacing);
31 | canvas.drawArc(rectF, -45, 270, false, paint);
32 | }
33 |
34 | @Override
35 | public List createAnimation() {
36 | List animators=new ArrayList<>();
37 | ValueAnimator scaleAnim=ValueAnimator.ofFloat(1,0.6f,0.5f,1);
38 | scaleAnim.setDuration(750);
39 | scaleAnim.setRepeatCount(-1);
40 | scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
41 | @Override
42 | public void onAnimationUpdate(ValueAnimator animation) {
43 | scaleFloat = (float) animation.getAnimatedValue();
44 | postInvalidate();
45 | }
46 | });
47 | scaleAnim.start();
48 |
49 | ValueAnimator rotateAnim=ValueAnimator.ofFloat(0,180,360);
50 | rotateAnim.setDuration(750);
51 | rotateAnim.setRepeatCount(-1);
52 | rotateAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
53 | @Override
54 | public void onAnimationUpdate(ValueAnimator animation) {
55 | degrees = (float) animation.getAnimatedValue();
56 | postInvalidate();
57 | }
58 | });
59 | rotateAnim.start();
60 | animators.add(scaleAnim);
61 | animators.add(rotateAnim);
62 | return animators;
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/BallPulseIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.progressindicator.indicator;
2 |
3 | import android.animation.Animator;
4 | import android.animation.ValueAnimator;
5 | import android.graphics.Canvas;
6 | import android.graphics.Paint;
7 |
8 | import java.util.ArrayList;
9 | import java.util.List;
10 |
11 | /**
12 | * Created by Jack on 2015/10/16.
13 | */
14 | public class BallPulseIndicator extends BaseIndicatorController{
15 |
16 | public static final float SCALE=1.0f;
17 |
18 | //scale x ,y
19 | private float[] scaleFloats=new float[]{SCALE,
20 | SCALE,
21 | SCALE};
22 |
23 |
24 |
25 | @Override
26 | public void draw(Canvas canvas, Paint paint) {
27 | float circleSpacing=4;
28 | float radius=(Math.min(getWidth(),getHeight())-circleSpacing*2)/6;
29 | float x = getWidth()/ 2-(radius*2+circleSpacing);
30 | float y=getHeight() / 2;
31 | for (int i = 0; i < 3; i++) {
32 | canvas.save();
33 | float translateX=x+(radius*2)*i+circleSpacing*i;
34 | canvas.translate(translateX, y);
35 | canvas.scale(scaleFloats[i], scaleFloats[i]);
36 | canvas.drawCircle(0, 0, radius, paint);
37 | canvas.restore();
38 | }
39 | }
40 |
41 | @Override
42 | public List createAnimation() {
43 | List animators=new ArrayList<>();
44 | int[] delays=new int[]{120,240,360};
45 | for (int i = 0; i < 3; i++) {
46 | final int index=i;
47 |
48 | ValueAnimator scaleAnim=ValueAnimator.ofFloat(1,0.3f,1);
49 |
50 | scaleAnim.setDuration(750);
51 | scaleAnim.setRepeatCount(-1);
52 | scaleAnim.setStartDelay(delays[i]);
53 |
54 | scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
55 | @Override
56 | public void onAnimationUpdate(ValueAnimator animation) {
57 | scaleFloats[index] = (float) animation.getAnimatedValue();
58 | postInvalidate();
59 |
60 | }
61 | });
62 | scaleAnim.start();
63 | animators.add(scaleAnim);
64 | }
65 | return animators;
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/BallPulseRiseIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.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/17.
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 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/BallPulseSyncIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.progressindicator.indicator;
2 |
3 | import android.animation.Animator;
4 | import android.animation.ValueAnimator;
5 | import android.graphics.Canvas;
6 | import android.graphics.Paint;
7 |
8 | import java.util.ArrayList;
9 | import java.util.List;
10 |
11 | /**
12 | * Created by Jack on 2015/10/19.
13 | */
14 | public class BallPulseSyncIndicator extends BaseIndicatorController {
15 |
16 | float[] translateYFloats=new float[3];
17 |
18 | @Override
19 | public void draw(Canvas canvas, Paint paint) {
20 | float circleSpacing=4;
21 | float radius=(getWidth()-circleSpacing*2)/6;
22 | float x = getWidth()/ 2-(radius*2+circleSpacing);
23 | for (int i = 0; i < 3; i++) {
24 | canvas.save();
25 | float translateX=x+(radius*2)*i+circleSpacing*i;
26 | canvas.translate(translateX, translateYFloats[i]);
27 | canvas.drawCircle(0, 0, radius, paint);
28 | canvas.restore();
29 | }
30 | }
31 |
32 | @Override
33 | public List createAnimation() {
34 | List animators=new ArrayList<>();
35 | float circleSpacing=4;
36 | float radius=(getWidth()-circleSpacing*2)/6;
37 | int[] delays=new int[]{70,140,210};
38 | for (int i = 0; i < 3; i++) {
39 | final int index=i;
40 | ValueAnimator scaleAnim=ValueAnimator.ofFloat(getHeight()/2,getHeight()/2-radius*2,getHeight()/2);
41 | scaleAnim.setDuration(600);
42 | scaleAnim.setRepeatCount(-1);
43 | scaleAnim.setStartDelay(delays[i]);
44 | scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
45 | @Override
46 | public void onAnimationUpdate(ValueAnimator animation) {
47 | translateYFloats[index] = (float) animation.getAnimatedValue();
48 | postInvalidate();
49 | }
50 | });
51 | scaleAnim.start();
52 | animators.add(scaleAnim);
53 | }
54 | return animators;
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/BallRotateIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.progressindicator.indicator;
2 |
3 | import android.animation.Animator;
4 | import android.animation.ObjectAnimator;
5 | import android.animation.ValueAnimator;
6 | import android.graphics.Canvas;
7 | import android.graphics.Paint;
8 |
9 | import java.util.ArrayList;
10 | import java.util.List;
11 |
12 | /**
13 | * Created by Jack on 2015/10/17.
14 | */
15 | public class BallRotateIndicator extends BaseIndicatorController{
16 |
17 | float scaleFloat=0.5f;
18 |
19 |
20 | @Override
21 | public void draw(Canvas canvas, Paint paint) {
22 | float radius=getWidth()/10;
23 | float x = getWidth()/ 2;
24 | float y=getHeight()/2;
25 |
26 | canvas.save();
27 | canvas.translate(x - radius * 2 - radius, y);
28 | canvas.scale(scaleFloat, scaleFloat);
29 | canvas.drawCircle(0, 0, radius, paint);
30 | canvas.restore();
31 |
32 | canvas.save();
33 | canvas.translate(x, y);
34 | canvas.scale(scaleFloat, scaleFloat);
35 | canvas.drawCircle(0, 0, radius, paint);
36 | canvas.restore();
37 |
38 | canvas.save();
39 | canvas.translate(x + radius * 2 + radius, y);
40 | canvas.scale(scaleFloat, scaleFloat);
41 | canvas.drawCircle(0,0,radius, paint);
42 | canvas.restore();
43 | }
44 |
45 | @Override
46 | public List createAnimation() {
47 | List animators=new ArrayList<>();
48 | ValueAnimator scaleAnim=ValueAnimator.ofFloat(0.5f,1,0.5f);
49 | scaleAnim.setDuration(1000);
50 | scaleAnim.setRepeatCount(-1);
51 | scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
52 | @Override
53 | public void onAnimationUpdate(ValueAnimator animation) {
54 | scaleFloat = (float) animation.getAnimatedValue();
55 | postInvalidate();
56 | }
57 | });
58 | scaleAnim.start();
59 |
60 | ObjectAnimator rotateAnim=ObjectAnimator.ofFloat(getTarget(),"rotation",0,180,360);
61 | rotateAnim.setDuration(1000);
62 | rotateAnim.setRepeatCount(-1);
63 | rotateAnim.start();
64 |
65 | animators.add(scaleAnim);
66 | animators.add(rotateAnim);
67 | return animators;
68 | }
69 |
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/BallScaleIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.progressindicator.indicator;
2 |
3 | import android.animation.Animator;
4 | import android.animation.ValueAnimator;
5 | import android.graphics.Canvas;
6 | import android.graphics.Paint;
7 | import android.view.animation.LinearInterpolator;
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 BallScaleIndicator extends BaseIndicatorController {
16 |
17 | float scale=1;
18 | int alpha=255;
19 |
20 | @Override
21 | public void draw(Canvas canvas, Paint paint) {
22 | float circleSpacing=4;
23 | paint.setAlpha(alpha);
24 | canvas.scale(scale,scale,getWidth()/2,getHeight()/2);
25 | paint.setAlpha(alpha);
26 | canvas.drawCircle(getWidth()/2,getHeight()/2,getWidth()/2-circleSpacing,paint);
27 | }
28 |
29 | @Override
30 | public List createAnimation() {
31 | List animators=new ArrayList<>();
32 | ValueAnimator scaleAnim=ValueAnimator.ofFloat(0,1);
33 | scaleAnim.setInterpolator(new LinearInterpolator());
34 | scaleAnim.setDuration(1000);
35 | scaleAnim.setRepeatCount(-1);
36 | scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
37 | @Override
38 | public void onAnimationUpdate(ValueAnimator animation) {
39 | scale = (float) animation.getAnimatedValue();
40 | postInvalidate();
41 | }
42 | });
43 | scaleAnim.start();
44 |
45 | ValueAnimator alphaAnim=ValueAnimator.ofInt(255, 0);
46 | alphaAnim.setInterpolator(new LinearInterpolator());
47 | alphaAnim.setDuration(1000);
48 | alphaAnim.setRepeatCount(-1);
49 | alphaAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
50 | @Override
51 | public void onAnimationUpdate(ValueAnimator animation) {
52 | alpha = (int) animation.getAnimatedValue();
53 | postInvalidate();
54 | }
55 | });
56 | alphaAnim.start();
57 | animators.add(scaleAnim);
58 | animators.add(alphaAnim);
59 | return animators;
60 | }
61 |
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/BallScaleRippleIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.progressindicator.indicator;
2 |
3 | import android.animation.Animator;
4 | import android.animation.ValueAnimator;
5 | import android.graphics.Canvas;
6 | import android.graphics.Paint;
7 | import android.view.animation.LinearInterpolator;
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 BallScaleRippleIndicator extends BallScaleIndicator {
16 |
17 |
18 | @Override
19 | public void draw(Canvas canvas, Paint paint) {
20 | paint.setStyle(Paint.Style.STROKE);
21 | paint.setStrokeWidth(3);
22 | super.draw(canvas, paint);
23 | }
24 |
25 | @Override
26 | public List createAnimation() {
27 | List animators=new ArrayList<>();
28 | ValueAnimator scaleAnim=ValueAnimator.ofFloat(0,1);
29 | scaleAnim.setInterpolator(new LinearInterpolator());
30 | scaleAnim.setDuration(1000);
31 | scaleAnim.setRepeatCount(-1);
32 | scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
33 | @Override
34 | public void onAnimationUpdate(ValueAnimator animation) {
35 | scale = (float) animation.getAnimatedValue();
36 | postInvalidate();
37 | }
38 | });
39 | scaleAnim.start();
40 |
41 | ValueAnimator alphaAnim=ValueAnimator.ofInt(0, 255);
42 | alphaAnim.setInterpolator(new LinearInterpolator());
43 | alphaAnim.setDuration(1000);
44 | alphaAnim.setRepeatCount(-1);
45 | alphaAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
46 | @Override
47 | public void onAnimationUpdate(ValueAnimator animation) {
48 | alpha = (int) animation.getAnimatedValue();
49 | postInvalidate();
50 | }
51 | });
52 | alphaAnim.start();
53 |
54 | animators.add(scaleAnim);
55 | animators.add(alphaAnim);
56 | return animators;
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/LineScaleIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.progressindicator.indicator;
2 |
3 | import android.animation.Animator;
4 | import android.animation.ValueAnimator;
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 LineScaleIndicator extends BaseIndicatorController {
16 |
17 | public static final float SCALE=1.0f;
18 |
19 | float[] scaleYFloats=new float[]{SCALE,
20 | SCALE,
21 | SCALE,
22 | SCALE,
23 | SCALE,};
24 |
25 | @Override
26 | public void draw(Canvas canvas, Paint paint) {
27 | float translateX=getWidth()/11;
28 | float translateY=getHeight()/2;
29 | for (int i = 0; i < 5; i++) {
30 | canvas.save();
31 | canvas.translate((2 + i * 2) * translateX - translateX / 2, translateY);
32 | canvas.scale(SCALE, scaleYFloats[i]);
33 | RectF rectF=new RectF(-translateX/2,-getHeight()/2.5f,translateX/2,getHeight()/2.5f);
34 | canvas.drawRoundRect(rectF, 5, 5, paint);
35 | canvas.restore();
36 | }
37 | }
38 |
39 | @Override
40 | public List createAnimation() {
41 | List animators=new ArrayList<>();
42 | long[] delays=new long[]{100,200,300,400,500};
43 | for (int i = 0; i < 5; i++) {
44 | final int index=i;
45 | ValueAnimator scaleAnim=ValueAnimator.ofFloat(1, 0.4f, 1);
46 | scaleAnim.setDuration(1000);
47 | scaleAnim.setRepeatCount(-1);
48 | scaleAnim.setStartDelay(delays[i]);
49 | scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
50 | @Override
51 | public void onAnimationUpdate(ValueAnimator animation) {
52 | scaleYFloats[index] = (float) animation.getAnimatedValue();
53 | postInvalidate();
54 | }
55 | });
56 | scaleAnim.start();
57 | animators.add(scaleAnim);
58 | }
59 | return animators;
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/LineScalePartyIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.progressindicator.indicator;
2 |
3 | import android.animation.Animator;
4 | import android.animation.ValueAnimator;
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 LineScalePartyIndicator extends BaseIndicatorController {
16 |
17 | public static final float SCALE=1.0f;
18 |
19 | float[] scaleFloats=new float[]{SCALE,
20 | SCALE,
21 | SCALE,
22 | SCALE,
23 | SCALE,};
24 |
25 | @Override
26 | public void draw(Canvas canvas, Paint paint) {
27 | float translateX=getWidth()/9;
28 | float translateY=getHeight()/2;
29 | for (int i = 0; i < 4; i++) {
30 | canvas.save();
31 | canvas.translate((2 + i * 2) * translateX - translateX / 2, translateY);
32 | canvas.scale(scaleFloats[i], scaleFloats[i]);
33 | RectF rectF=new RectF(-translateX/2,-getHeight()/2.5f,translateX/2,getHeight()/2.5f);
34 | canvas.drawRoundRect(rectF,5,5,paint);
35 | canvas.restore();
36 | }
37 | }
38 |
39 | @Override
40 | public List createAnimation() {
41 | List animators=new ArrayList<>();
42 | long[] durations=new long[]{1260, 430, 1010, 730};
43 | long[] delays=new long[]{770, 290, 280, 740};
44 | for (int i = 0; i < 4; i++) {
45 | final int index=i;
46 | ValueAnimator scaleAnim=ValueAnimator.ofFloat(1,0.4f,1);
47 | scaleAnim.setDuration(durations[i]);
48 | scaleAnim.setRepeatCount(-1);
49 | scaleAnim.setStartDelay(delays[i]);
50 | scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
51 | @Override
52 | public void onAnimationUpdate(ValueAnimator animation) {
53 | scaleFloats[index] = (float) animation.getAnimatedValue();
54 | postInvalidate();
55 | }
56 | });
57 | scaleAnim.start();
58 | animators.add(scaleAnim);
59 | }
60 | return animators;
61 | }
62 |
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/LineScalePulseOutIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.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 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/LineScalePulseOutRapidIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.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 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/LineSpinFadeLoaderIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.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/24.
9 | * Email:81813780@qq.com
10 | */
11 | public class LineSpinFadeLoaderIndicator extends BallSpinFadeLoaderIndicator {
12 |
13 |
14 | @Override
15 | public void draw(Canvas canvas, Paint paint) {
16 | float radius=getWidth()/10;
17 | for (int i = 0; i < 8; i++) {
18 | canvas.save();
19 | Point point=circleAt(getWidth(),getHeight(),getWidth()/2.5f-radius,i*(Math.PI/4));
20 | canvas.translate(point.x, point.y);
21 | canvas.scale(scaleFloats[i], scaleFloats[i]);
22 | canvas.rotate(i*45);
23 | paint.setAlpha(alphas[i]);
24 | RectF rectF=new RectF(-radius,-radius/1.5f,1.5f*radius,radius/1.5f);
25 | canvas.drawRoundRect(rectF,5,5,paint);
26 | canvas.restore();
27 | }
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/SemiCircleSpinIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.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/20.
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 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/SquareSpinIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.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/16.
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 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/java/com/cundong/recyclerview/progressindicator/indicator/TriangleSkewSpinIndicator.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview.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/20.
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 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/anim/floating_action_button_hide.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/anim/floating_action_button_show.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/ic_loading_rotate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/ic_loading_rotate.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/ic_pulltorefresh_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/ic_pulltorefresh_arrow.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/ic_tip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/ic_tip.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_01.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_02.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_03.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_04.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_05.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_06.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_07.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_08.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_09.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_09.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_10.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_11.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stay4it/Community/8ffc1508bc7c10475348d3ce0da6cde719abf5e1/pull_recyclerview_library/src/main/res/drawable-hdpi/loading_12.png
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable-hdpi/progressbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/drawable/progressloading.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/layout/layout_recyclerview_footer.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
24 |
25 |
29 |
30 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/layout/layout_recyclerview_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
24 |
25 |
29 |
30 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/layout/layout_recyclerview_list_footer.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
20 |
21 |
26 |
27 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/layout/layout_recyclerview_list_footer_end.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/layout/layout_recyclerview_list_footer_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
27 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/layout/layout_recyclerview_list_footer_network_error.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
22 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/values/attr.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 | #000000
5 | #ff2bc1ab
6 |
7 | #F0F0F0
8 | #8A000000
9 |
10 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 0.66dp
4 | 4dp
5 | 6dp
6 | 10dp
7 | 14dp
8 | 18dp
9 | 22dp
10 | 36dp
11 | 40dp
12 | 60dp
13 | 72dp
14 |
15 | 12sp
16 | 14sp
17 | 16sp
18 |
19 | 10dp
20 |
21 |
22 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | pull_recyclerview_library
3 |
4 | 下拉刷新
5 | 释放立即刷新
6 | 正在加载...
7 | 没有了
8 | 正在刷新...
9 | 刷新完成
10 | 上次更新时间:
11 |
12 |
13 | 正在加载中…
14 | 点击重新加载
15 | 已全部加载完
16 |
17 |
--------------------------------------------------------------------------------
/pull_recyclerview_library/src/test/java/com/cundong/recyclerview/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.cundong.recyclerview;
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 | }
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':pull_recyclerview_library', ':common_library'
2 |
--------------------------------------------------------------------------------