├── .gitignore ├── README.md ├── agiledevelop ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── simon │ │ └── agiledevelop │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── simon │ │ │ └── agiledevelop │ │ │ ├── HttpInterceptor.java │ │ │ ├── ResultSubscriber.java │ │ │ ├── ServiceHelper.java │ │ │ ├── glide │ │ │ ├── BlurTransformation.java │ │ │ ├── CircleTransform.java │ │ │ ├── GlideConfiguration.java │ │ │ └── RoundTransformation.java │ │ │ ├── log │ │ │ ├── FastPrintWriter.java │ │ │ ├── FormatException.java │ │ │ ├── LLog.java │ │ │ ├── LogFormat.java │ │ │ ├── Logger.java │ │ │ └── StackTraceUtil.java │ │ │ ├── mvpframe │ │ │ ├── BaseActivity.java │ │ │ ├── BaseFragment.java │ │ │ ├── BasePresenter.java │ │ │ ├── CoreActivity.java │ │ │ ├── MvpModel.java │ │ │ ├── MvpView.java │ │ │ ├── Presenter.java │ │ │ ├── RxBus.java │ │ │ ├── RxManager.java │ │ │ └── RxPresenter.java │ │ │ ├── progress │ │ │ ├── ProgressListener.java │ │ │ └── ProgressResponseBody.java │ │ │ ├── recycler │ │ │ ├── RecycledViewHolder.java │ │ │ ├── adapter │ │ │ │ ├── RecycledAdapter.java │ │ │ │ ├── RecycledMultiItemAdapter.java │ │ │ │ └── RecycledSectionAdapter.java │ │ │ ├── animation │ │ │ │ ├── AlphaInAnimation.java │ │ │ │ ├── BaseAnimation.java │ │ │ │ ├── ScaleInAnimation.java │ │ │ │ ├── SlideInBottomAnimation.java │ │ │ │ ├── SlideInLeftAnimation.java │ │ │ │ └── SlideInRightAnimation.java │ │ │ ├── divider │ │ │ │ ├── Divider.java │ │ │ │ ├── HorizontalDivider.java │ │ │ │ └── VerticalDivider.java │ │ │ ├── entity │ │ │ │ ├── AbstractExpandableItem.java │ │ │ │ ├── IExpandable.java │ │ │ │ ├── MultiItemEntity.java │ │ │ │ └── SectionEntity.java │ │ │ └── listeners │ │ │ │ ├── OnItemClickListener.java │ │ │ │ └── SimpleClickListener.java │ │ │ ├── state │ │ │ ├── StateView.java │ │ │ ├── loading │ │ │ │ ├── Animatable.java │ │ │ │ ├── Loading.java │ │ │ │ ├── LoadingCircleDrawable.java │ │ │ │ └── LoadingDrawable.java │ │ │ └── network │ │ │ │ ├── NetChangeObserver.java │ │ │ │ ├── NetStateReceiver.java │ │ │ │ └── NetWorkListener.java │ │ │ ├── utils │ │ │ ├── App.java │ │ │ ├── AppManager.java │ │ │ ├── CloseHelper.java │ │ │ ├── DeviceHelper.java │ │ │ ├── ImgLoadHelper.java │ │ │ ├── KeyboardHelper.java │ │ │ ├── NetHelper.java │ │ │ ├── PhoneHelper.java │ │ │ ├── PreferencesHelper.java │ │ │ ├── ResHelper.java │ │ │ ├── SDCardHelper.java │ │ │ ├── ScreenHelper.java │ │ │ ├── ToastHelper.java │ │ │ └── schedulers │ │ │ │ ├── AndroidSchedulerTransformer.java │ │ │ │ ├── BaseSchedulerProvider.java │ │ │ │ ├── ImmediateSchedulerProvider.java │ │ │ │ └── SchedulerProvider.java │ │ │ └── widget │ │ │ ├── AvatarImageView.java │ │ │ ├── AvatarLayout.java │ │ │ ├── CircleImageView.java │ │ │ ├── SelectorButton.java │ │ │ └── behavior │ │ │ ├── AnimateHelper.java │ │ │ ├── BottomBehavior.java │ │ │ └── TitleBehavior.java │ └── res │ │ ├── drawable-xhdpi │ │ ├── head_portrait_def.png │ │ ├── placeholder.png │ │ ├── rotate_arrow.png │ │ ├── sample_footer_loading.png │ │ ├── state_empty.png │ │ ├── state_error.png │ │ ├── state_net_error.png │ │ └── state_nonet.png │ │ ├── drawable │ │ └── sample_footer_loading_progress.xml │ │ ├── layout │ │ ├── banner_layout.xml │ │ ├── banner_view.xml │ │ ├── cube_ptr_classic_default_header.xml │ │ ├── cube_ptr_simple_loading.xml │ │ ├── def_loading.xml │ │ ├── view_empty.xml │ │ ├── view_error.xml │ │ └── view_progress.xml │ │ └── values │ │ ├── attrs_avatar.xml │ │ ├── attrs_badge.xml │ │ ├── attrs_banner.xml │ │ ├── attrs_circleimv.xml │ │ ├── attrs_cube_ptr.xml │ │ ├── attrs_selector_button.xml │ │ ├── attrs_stateview.xml │ │ ├── colors.xml │ │ ├── dimen.xml │ │ ├── load_attrs.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── simon │ └── agiledevelop │ └── ExampleUnitTest.java ├── app ├── .gitignore ├── build.gradle ├── drib.jks ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── simon │ │ └── dribbble │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── editor.html │ │ ├── fonts │ │ │ ├── Pacifico.ttf │ │ │ └── agency.ttf │ │ ├── normalize.css │ │ ├── rich_editor.js │ │ └── style.css │ ├── java │ │ └── com │ │ │ └── simon │ │ │ ├── crop │ │ │ ├── Crop.java │ │ │ ├── CropImageActivity.java │ │ │ ├── CropImageView.java │ │ │ ├── CropUtil.java │ │ │ ├── HighlightView.java │ │ │ ├── ImageViewTouchBase.java │ │ │ ├── Log.java │ │ │ ├── MonitoredActivity.java │ │ │ └── RotateBitmap.java │ │ │ ├── dribbble │ │ │ ├── DribbbleApp.java │ │ │ ├── GlobalConstant.java │ │ │ ├── UncaughtException.java │ │ │ ├── data │ │ │ │ ├── Api.java │ │ │ │ ├── DribbbleDataManger.java │ │ │ │ ├── GsonResponseBodyConverter.java │ │ │ │ ├── SearchConverter.java │ │ │ │ ├── model │ │ │ │ │ ├── AttachmentEntity.java │ │ │ │ │ ├── BucketEntity.java │ │ │ │ │ ├── CommentEntity.java │ │ │ │ │ ├── CommonEntity.java │ │ │ │ │ ├── FollowersEntity.java │ │ │ │ │ ├── ImagesEntity.java │ │ │ │ │ ├── LikeEntity.java │ │ │ │ │ ├── LinksEntity.java │ │ │ │ │ ├── ProjectEntity.java │ │ │ │ │ ├── ShotEntity.java │ │ │ │ │ ├── TeamEntity.java │ │ │ │ │ ├── TokenEntity.java │ │ │ │ │ ├── User.java │ │ │ │ │ └── UserLikeEntity.java │ │ │ │ └── remote │ │ │ │ │ └── DribbbleService.java │ │ │ ├── listener │ │ │ │ ├── ItemDiffCallBack.java │ │ │ │ └── TextWatcherImpl.java │ │ │ ├── ui │ │ │ │ ├── AboutActivity.java │ │ │ │ ├── CommListContract.java │ │ │ │ ├── CommListFragment.java │ │ │ │ ├── CommListPresenter.java │ │ │ │ ├── baselist │ │ │ │ │ ├── BaseListContract.java │ │ │ │ │ └── ListActivity.java │ │ │ │ ├── buckets │ │ │ │ │ ├── BucketPresenter.java │ │ │ │ │ ├── UserBucketsAdapter.java │ │ │ │ │ └── UserBucketsFragment.java │ │ │ │ ├── main │ │ │ │ │ ├── AvatarActivity.java │ │ │ │ │ ├── HomeActivity.java │ │ │ │ │ ├── HomeFmAdapter.java │ │ │ │ │ └── SplashActivity.java │ │ │ │ ├── projects │ │ │ │ │ ├── ProjectAdapter.java │ │ │ │ │ ├── ProjectPresenter.java │ │ │ │ │ └── ProjectsFragment.java │ │ │ │ ├── shots │ │ │ │ │ ├── AttachAdapter.java │ │ │ │ │ ├── AttachPresenter.java │ │ │ │ │ ├── AttachmentFragment.java │ │ │ │ │ ├── BucketsFragment.java │ │ │ │ │ ├── BucketsPresenter.java │ │ │ │ │ ├── CommentActivity.java │ │ │ │ │ ├── CommentAdapter.java │ │ │ │ │ ├── CommentContract.java │ │ │ │ │ ├── CommentPresenter.java │ │ │ │ │ ├── CreateContract.java │ │ │ │ │ ├── CreatePresenter.java │ │ │ │ │ ├── CreateShotActivity.java │ │ │ │ │ ├── DetailBigPicActivity.java │ │ │ │ │ ├── LikesAdapter.java │ │ │ │ │ ├── LikesFragment.java │ │ │ │ │ ├── LikesPresenter.java │ │ │ │ │ ├── RichEditorActivity.java │ │ │ │ │ ├── SearchActivity.java │ │ │ │ │ ├── SearchContract.java │ │ │ │ │ ├── SearchPresenter.java │ │ │ │ │ ├── SheetActivity.java │ │ │ │ │ ├── ShotDetailActivity.java │ │ │ │ │ ├── ShotDetailContract.java │ │ │ │ │ ├── ShotDetailPresenter.java │ │ │ │ │ ├── ShotsAdapter.java │ │ │ │ │ ├── ShotsContract.java │ │ │ │ │ ├── ShotsFragment.java │ │ │ │ │ └── ShotsPresenter.java │ │ │ │ ├── team │ │ │ │ │ ├── TeamAdapter.java │ │ │ │ │ ├── TeamFragment.java │ │ │ │ │ └── TeamPresenter.java │ │ │ │ └── user │ │ │ │ │ ├── FollowersAdapter.java │ │ │ │ │ ├── FollowersFragment.java │ │ │ │ │ ├── FollowersPresenter.java │ │ │ │ │ ├── LikeShotsPresenter.java │ │ │ │ │ ├── SettingsActivity.java │ │ │ │ │ ├── SignInActivity.java │ │ │ │ │ ├── SignInContract.java │ │ │ │ │ ├── SignPresenter.java │ │ │ │ │ ├── UserInfoActivity.java │ │ │ │ │ ├── UserInfoContract.java │ │ │ │ │ ├── UserInfoPresenter.java │ │ │ │ │ ├── UserLikesFragment.java │ │ │ │ │ ├── UserShotsContract.java │ │ │ │ │ ├── UserShotsFragment.java │ │ │ │ │ └── UserShotsPresenter.java │ │ │ ├── util │ │ │ │ ├── ColorPhrase.java │ │ │ │ ├── DateTimeUtil.java │ │ │ │ ├── DialogHelp.java │ │ │ │ ├── DribbblePrefs.java │ │ │ │ ├── ParcelUtils.java │ │ │ │ ├── RegexHelper.java │ │ │ │ ├── StringUtil.java │ │ │ │ ├── TimeZoneUtil.java │ │ │ │ └── UIUtils.java │ │ │ └── widget │ │ │ │ ├── BottomSheet.java │ │ │ │ ├── CircleTransform.java │ │ │ │ ├── ProgressLayout.java │ │ │ │ ├── ProgressWheel.java │ │ │ │ ├── PullBackLayout.java │ │ │ │ ├── RatioImageView.java │ │ │ │ ├── RoundTransform.java │ │ │ │ ├── SmileyLoadingView.java │ │ │ │ ├── TagGroup.java │ │ │ │ ├── loadingdia │ │ │ │ ├── AnimatedView.java │ │ │ │ ├── AnimatorPlayer.java │ │ │ │ ├── HesitateInterpolator.java │ │ │ │ ├── ProgressLayout.java │ │ │ │ └── SpotsDialog.java │ │ │ │ ├── navigationbar │ │ │ │ ├── NavigationTabBar.java │ │ │ │ └── behavior │ │ │ │ │ ├── BehaviorBottomBar.java │ │ │ │ │ ├── BehaviorFab.java │ │ │ │ │ ├── BehaviorScrollZoomFab.java │ │ │ │ │ ├── NavigationTabBarBehavior.java │ │ │ │ │ └── VerticalScrollingBehavior.java │ │ │ │ ├── richeditor │ │ │ │ ├── RichEditor.java │ │ │ │ └── Utils.java │ │ │ │ └── statelayout │ │ │ │ ├── FadeScaleViewAnimProvider.java │ │ │ │ ├── FadeViewAnimProvider.java │ │ │ │ └── ViewAnimProvider.java │ │ │ └── listeners │ │ │ └── EndlessScrollListener.java │ └── res │ │ ├── anim │ │ ├── anim_bottom_in.xml │ │ ├── anim_bottom_out.xml │ │ └── fade.xml │ │ ├── drawable-hdpi │ │ ├── abc_spinner.9.png │ │ ├── ic_action_create.png │ │ ├── ic_center_normal.png │ │ ├── ic_center_selected.png │ │ ├── ic_comment.png │ │ ├── ic_drawer_about_normal.png │ │ ├── ic_drawer_about_selected.png │ │ ├── ic_drawer_buckets_normal.png │ │ ├── ic_drawer_buckets_selected.png │ │ ├── ic_drawer_dl_normal.png │ │ ├── ic_drawer_dl_selected.png │ │ ├── ic_drawer_dribbble_normal.png │ │ ├── ic_drawer_dribbble_selected.png │ │ ├── ic_drawer_favorite_normal.png │ │ ├── ic_drawer_favorite_selected.png │ │ ├── ic_drawer_following_normal.png │ │ ├── ic_drawer_following_selected.png │ │ ├── ic_drawer_projects_normal.png │ │ ├── ic_drawer_projects_selected.png │ │ ├── ic_drawer_settings_normal.png │ │ ├── ic_drawer_settings_selected.png │ │ ├── ic_drawer_shots__normal.png │ │ ├── ic_drawer_shots_selected.png │ │ ├── ic_drawer_team_normal.png │ │ ├── ic_drawer_team_selected.png │ │ ├── ic_home_normal.png │ │ ├── ic_home_selected.png │ │ ├── ic_overflow.png │ │ ├── ic_search.png │ │ ├── ic_shot_buckets.png │ │ ├── ic_shot_likes_12dp.png │ │ ├── ic_shot_project.png │ │ ├── ic_shot_views.png │ │ ├── ic_thank.png │ │ ├── iconfont_downgrey.png │ │ ├── location.png │ │ ├── twitter.png │ │ └── web.png │ │ ├── drawable-nodpi │ │ └── def_nav_drawer.jpg │ │ ├── drawable-v21 │ │ ├── ic_menu_camera.xml │ │ ├── ic_menu_gallery.xml │ │ ├── ic_menu_manage.xml │ │ ├── ic_menu_send.xml │ │ ├── ic_menu_share.xml │ │ └── ic_menu_slideshow.xml │ │ ├── drawable-xhdpi │ │ ├── dribbble_about.png │ │ ├── dribbble_p.png │ │ ├── dribbble_place.png │ │ ├── person_image_empty.png │ │ └── placeholder_drib.png │ │ ├── drawable-xxhdpi │ │ ├── bg.png │ │ ├── bg_color.png │ │ ├── blockquote.png │ │ ├── bold.png │ │ ├── bullets.png │ │ ├── h1.png │ │ ├── h2.png │ │ ├── h3.png │ │ ├── h4.png │ │ ├── h5.png │ │ ├── h6.png │ │ ├── html_edit.png │ │ ├── indent.png │ │ ├── insert_image.png │ │ ├── insert_link.png │ │ ├── italic.png │ │ ├── justify_center.png │ │ ├── justify_left.png │ │ ├── justify_right.png │ │ ├── numbers.png │ │ ├── outdent.png │ │ ├── redo.png │ │ ├── strikethrough.png │ │ ├── subscript.png │ │ ├── superscript.png │ │ ├── txt_color.png │ │ ├── underline.png │ │ └── undo.png │ │ ├── drawable │ │ ├── ic_add_white_24dp.xml │ │ ├── ic_attachment_gray_24dp.xml │ │ ├── ic_close_white_24dp.xml │ │ ├── ic_comment_gray_24dp.xml │ │ ├── ic_done_white_24dp.xml │ │ ├── ic_favorite_border_gray_24dp.xml │ │ ├── ic_favorite_border_white_24dp.xml │ │ ├── ic_favorite_gray_24dp.xml │ │ ├── ic_file_download_gray_24dp.xml │ │ ├── ic_filter_list.xml │ │ ├── ic_gif_white_24dp.xml │ │ ├── ic_redo_gray_24dp.xml │ │ ├── ic_save_white_24dp.xml │ │ ├── ic_send_blue_24dp.xml │ │ ├── ic_send_gray_24dp.xml │ │ ├── ic_send_white_24dp.xml │ │ ├── ic_share_white_24dp.xml │ │ ├── ic_sort_white_24dp.xml │ │ ├── ic_visibility_gray_24dp.xml │ │ ├── selector_blue_corners_button.xml │ │ ├── send_comment.xml │ │ ├── shape_border.xml │ │ ├── shape_download_bg.xml │ │ ├── shape_gray_line_b.xml │ │ ├── shape_gray_line_r.xml │ │ ├── shape_toast.xml │ │ ├── shape_type_bg.xml │ │ ├── side_nav_bar.xml │ │ └── spot.xml │ │ ├── layout │ │ ├── activity_about.xml │ │ ├── activity_avatar.xml │ │ ├── activity_comments.xml │ │ ├── activity_create_shot.xml │ │ ├── activity_detai_bigpic.xml │ │ ├── activity_home.xml │ │ ├── activity_list_comm.xml │ │ ├── activity_richeditor.xml │ │ ├── activity_search.xml │ │ ├── activity_settings.xml │ │ ├── activity_sheet.xml │ │ ├── activity_shot_detail.xml │ │ ├── activity_sign_dribbble.xml │ │ ├── activity_splash.xml │ │ ├── activity_userinfo.xml │ │ ├── app_bar_home.xml │ │ ├── app_bar_main.xml │ │ ├── content_main.xml │ │ ├── crop_activity_crop.xml │ │ ├── custom_toast.xml │ │ ├── dialog.xml │ │ ├── fragment_list.xml │ │ ├── fragment_shots.xml │ │ ├── item_attach.xml │ │ ├── item_comment.xml │ │ ├── item_cook.xml │ │ ├── item_home_list.xml │ │ ├── item_project.xml │ │ ├── item_rich_option.xml │ │ ├── item_shot.xml │ │ ├── item_team.xml │ │ ├── item_user.xml │ │ ├── item_user_buckets.xml │ │ ├── layout_error_view.xml │ │ ├── layout_loading_view.xml │ │ ├── layout_no_data_view.xml │ │ ├── nav_header_main.xml │ │ └── view_unauth.xml │ │ ├── menu │ │ ├── activity_home_drawer.xml │ │ ├── comment_sort.xml │ │ ├── create_shot.xml │ │ ├── crop.xml │ │ ├── detail.xml │ │ ├── filer_sort.xml │ │ ├── filter_shots.xml │ │ ├── home.xml │ │ ├── main.xml │ │ └── menu_big_photo.xml │ │ ├── mipmap-hdpi │ │ ├── dribbble_icon.png │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ ├── dribbble_icon.png │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ ├── dribbble_icon.png │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ ├── dribbble_icon.png │ │ ├── ic_launcher.png │ │ └── qq.jpeg │ │ ├── mipmap-xxxhdpi │ │ ├── dribbble_icon.png │ │ └── ic_launcher.png │ │ ├── values-v21 │ │ ├── crop_attrs.xml │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ ├── values │ │ ├── arrays.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── drawables.xml │ │ ├── load_attrs.xml │ │ ├── loading_dia_attrs.xml │ │ ├── nav_attrs.xml │ │ ├── strings.xml │ │ ├── styles.xml │ │ └── tags_attrs.xml │ │ └── xml │ │ └── searchable.xml │ └── test │ └── java │ └── com │ └── simon │ └── dribbble │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── lib └── src │ └── main │ └── res │ ├── drawable-xhdpi │ └── ucrop_ic_done.png │ └── menu │ └── ucrop_menu_activity.xml ├── screenshot ├── comment.gif ├── create.gif ├── detail_pager.gif ├── drawer_filter.gif ├── follower.gif ├── home_list.gif └── loading.gif └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | /build 6 | /captures 7 | .idea 8 | *.iml -------------------------------------------------------------------------------- /agiledevelop/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /agiledevelop/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.0" 6 | 7 | defaultConfig { 8 | minSdkVersion 14 9 | targetSdkVersion 25 10 | versionCode 1 11 | versionName "1.0" 12 | 13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 14 | 15 | } 16 | buildTypes { 17 | release { 18 | minifyEnabled false 19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 20 | } 21 | } 22 | } 23 | 24 | repositories { 25 | flatDir() { 26 | dirs 'libs' 27 | } 28 | } 29 | 30 | dependencies { 31 | compile fileTree(include: ['*.jar'], dir: 'libs') 32 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 33 | exclude group: 'com.android.support', module: 'support-annotations' 34 | }) 35 | compile 'com.android.support:appcompat-v7:25.0.1' 36 | testCompile 'junit:junit:4.12' 37 | compile 'com.android.support:recyclerview-v7:25.0.1' 38 | compile 'com.android.support:design:25.0.1' 39 | compile 'com.squareup.retrofit2:retrofit:2.1.0' 40 | compile 'com.squareup.retrofit2:converter-gson:2.1.0' 41 | compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0' 42 | compile 'com.github.bumptech.glide:glide:3.7.0' 43 | compile 'com.readystatesoftware.systembartint:systembartint:1.0.4' 44 | compile 'com.squareup.okhttp3:okhttp:3.5.0' 45 | compile 'io.reactivex:rxjava:1.2.6' 46 | compile 'io.reactivex:rxandroid:1.2.1' 47 | } 48 | -------------------------------------------------------------------------------- /agiledevelop/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:\AndroidStudiosdk/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 | -------------------------------------------------------------------------------- /agiledevelop/src/androidTest/java/com/simon/agiledevelop/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.simon.agiledevelop.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /agiledevelop/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/HttpInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop; 2 | 3 | 4 | import java.io.IOException; 5 | import java.util.Map; 6 | import java.util.Set; 7 | 8 | import okhttp3.Headers; 9 | import okhttp3.Interceptor; 10 | import okhttp3.Request; 11 | import okhttp3.Response; 12 | 13 | public class HttpInterceptor implements Interceptor { 14 | private static String TAG = HttpInterceptor.class.getSimpleName(); 15 | private Headers mHeaders; 16 | private Map mMapHeaders; 17 | 18 | @Override 19 | public Response intercept(Chain chain) throws IOException { 20 | //封装headers 21 | Request request; 22 | 23 | Request.Builder builder = chain.request().newBuilder(); 24 | if (mHeaders != null) { 25 | Set set = mHeaders.names(); 26 | for (String name : set) { 27 | builder.addHeader(name, mHeaders.get(name)); 28 | } 29 | } else if (mMapHeaders != null) { 30 | for (String name : mMapHeaders.keySet()) { 31 | builder.addHeader(name, mMapHeaders.get(name)); 32 | } 33 | } 34 | request = builder 35 | .addHeader("Content-Type", "application/json") 36 | .addHeader("Content-Type", "application/json;charset=UTF-8") 37 | .build(); 38 | Response response = chain.proceed(request); 39 | 40 | return response; 41 | } 42 | 43 | public Headers getHeaders() { 44 | return mHeaders; 45 | } 46 | 47 | public void setHeaders(Headers headers) { 48 | this.mHeaders = headers; 49 | } 50 | 51 | public void setMapHeaders(Map mapHeaders) { 52 | this.mMapHeaders = mapHeaders; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/ResultSubscriber.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop; 2 | 3 | 4 | import rx.Subscriber; 5 | 6 | public abstract class ResultSubscriber extends Subscriber { 7 | /** 8 | * 自定义订阅,参数用来区分网络接口,以用来在不同接口操作过程中,处理不同的逻辑 9 | */ 10 | public ResultSubscriber() { 11 | 12 | } 13 | 14 | @Override 15 | public void onCompleted() { 16 | onEndRequest(); 17 | } 18 | 19 | @Override 20 | public void onError(Throwable e) { 21 | try { 22 | if (e != null) { 23 | onFailed(e); 24 | e.printStackTrace(); 25 | } 26 | } catch (Throwable t) { 27 | t.printStackTrace(); 28 | } 29 | 30 | } 31 | 32 | @Override 33 | public void onNext(T t) { 34 | onResult(t); 35 | } 36 | 37 | /** 38 | * 网络请求开始 39 | */ 40 | public abstract void onStartRequest(); 41 | 42 | /** 43 | * 网络请求结束 44 | */ 45 | public abstract void onEndRequest(); 46 | 47 | /** 48 | * 网络请求错误 49 | */ 50 | public abstract void onFailed(Throwable e); 51 | 52 | /** 53 | * 处理请求结果 54 | */ 55 | public abstract void onResult(T t); 56 | } 57 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/mvpframe/BasePresenter.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.mvpframe; 2 | 3 | import android.support.annotation.Nullable; 4 | 5 | import java.lang.ref.WeakReference; 6 | 7 | /** 8 | * describe: 9 | * 10 | * @author Apeplan 11 | * @date 2016/12/27 12 | * @email hanzx1024@gmail.com 13 | */ 14 | 15 | public class BasePresenter implements Presenter { 16 | 17 | private WeakReference viewRef; 18 | 19 | @Override 20 | public void attachView(V view) { 21 | viewRef = new WeakReference(view); 22 | } 23 | 24 | /** 25 | * Get the attached view. You should always call {@link #isViewAttached()} to check if the view 26 | * is 27 | * attached to avoid NullPointerExceptions. 28 | * 29 | * @return null, if view is not attached, otherwise the concrete view instance 30 | */ 31 | @Nullable 32 | protected V getView() { 33 | return viewRef == null ? null : viewRef.get(); 34 | } 35 | 36 | /** 37 | * Checks if a view is attached to this presenter. You should always call this method before 38 | * calling {@link #getView()} to get the view instance. 39 | */ 40 | protected boolean isViewAttached() { 41 | return viewRef != null && viewRef.get() != null; 42 | } 43 | 44 | @Override 45 | public void detachView(boolean retainInstance) { 46 | if (viewRef != null) { 47 | viewRef.clear(); 48 | viewRef = null; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/mvpframe/MvpModel.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.mvpframe; 2 | 3 | /** 4 | * describe: 5 | * 6 | * @author Apeplan 7 | * @date 2016/12/27 8 | * @email hanzx1024@gmail.com 9 | */ 10 | 11 | public interface MvpModel { 12 | } 13 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/mvpframe/MvpView.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.mvpframe; 2 | 3 | /** 4 | * describe: All View must extends 5 | * 6 | * @author Simon Han 7 | * @date 2016.10.20 8 | * @email hanzx1024@gmail.com 9 | */ 10 | public interface MvpView { 11 | /** 12 | * 显示加载进度框 13 | * 14 | * @param action 可以区分不同类型请求 15 | * @param msg 提示信息 16 | */ 17 | void showLoading(int action, String msg); 18 | 19 | /** 20 | * 请求成功,但是没有数据 21 | * 22 | * @param msg 空页面的提示信息 23 | */ 24 | void onEmpty(String msg); 25 | 26 | /** 27 | * 请求失败 28 | * 29 | * @param action 可以区分不同类型的失败 30 | * @param msg 失败信息 31 | */ 32 | void onFailed(int action, String msg); 33 | 34 | 35 | /** 36 | * 请求执行完成,不管成功与否,都会调用这个方法 37 | * 38 | * @param action 39 | */ 40 | void onCompleted(int action); 41 | 42 | /** 43 | * 将 View 中持有的 Presenter 赋值 44 | * 45 | * @param presenter 46 | */ 47 | void setPresenter(T presenter); 48 | 49 | } 50 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/mvpframe/Presenter.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.mvpframe; 2 | 3 | /** 4 | * describe: 5 | * 6 | * @author Apeplan 7 | * @date 2016/12/27 8 | * @email hanzx1024@gmail.com 9 | */ 10 | 11 | public interface Presenter { 12 | /** 13 | * Set or attach the view to this presenter 14 | */ 15 | void attachView(V view); 16 | 17 | /** 18 | * Will be called if the view has been destroyed. Typically this method will be invoked from 19 | * Activity.detachView() or Fragment.onDestroyView() 20 | */ 21 | void detachView(boolean retainInstance); 22 | } 23 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/mvpframe/RxManager.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.mvpframe; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import rx.Observable; 7 | import rx.Subscription; 8 | import rx.android.schedulers.AndroidSchedulers; 9 | import rx.functions.Action1; 10 | import rx.subscriptions.CompositeSubscription; 11 | 12 | /** 13 | * 用于管理RxBus的事件和Rxjava相关代码的生命周期处理 14 | */ 15 | 16 | public class RxManager { 17 | 18 | public RxBus mRxBus = RxBus.$(); 19 | private Map> mObservables = new HashMap<>();// 管理观察源 20 | private CompositeSubscription mCompositeSubscription = new CompositeSubscription();// 管理订阅者者 21 | 22 | 23 | public void on(String eventName, Action1 action1) { 24 | Observable mObservable = mRxBus.register(eventName); 25 | mObservables.put(eventName, mObservable); 26 | mCompositeSubscription.add(mObservable.observeOn(AndroidSchedulers.mainThread()) 27 | .subscribe(action1)); 28 | // .subscribe(action1, (e) -> e.printStackTrace())); 29 | } 30 | 31 | public void add(Subscription m) { 32 | mCompositeSubscription.add(m); 33 | } 34 | 35 | public void clear() { 36 | mCompositeSubscription.unsubscribe();// 取消订阅 37 | for (Map.Entry> entry : mObservables.entrySet()) 38 | mRxBus.unregister(entry.getKey(), entry.getValue());// 移除观察 39 | } 40 | 41 | public void post(Object tag, Object content) { 42 | mRxBus.post(tag, content); 43 | } 44 | } -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/progress/ProgressListener.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.progress; 2 | 3 | /** 4 | * describe: 5 | * 6 | * @author Apeplan 7 | * @date 2017/1/12 8 | * @email hanzx1024@gmail.com 9 | */ 10 | 11 | public interface ProgressListener { 12 | void update(long bytesRead, long contentLength, boolean done); 13 | } 14 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/recycler/animation/AlphaInAnimation.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.recycler.animation; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.view.View; 6 | 7 | /** 8 | * describe: Alpha anim for RecyclerView item 9 | * 10 | * @author Simon Han 11 | * @date 2015.09.20 12 | * @email hanzx1024@gmail.com 13 | */ 14 | 15 | public class AlphaInAnimation implements BaseAnimation { 16 | private static final float DEFAULT_ALPHA_FROM = 0.2f; 17 | private final float mFrom; 18 | 19 | public AlphaInAnimation() { 20 | this(DEFAULT_ALPHA_FROM); 21 | } 22 | 23 | public AlphaInAnimation(float from) { 24 | mFrom = from; 25 | } 26 | 27 | @Override 28 | public Animator[] getAnimators(View view) { 29 | return new Animator[]{ObjectAnimator.ofFloat(view, "alpha", mFrom, 1.0f)}; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/recycler/animation/BaseAnimation.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.recycler.animation; 2 | 3 | import android.animation.Animator; 4 | import android.view.View; 5 | 6 | /** 7 | * describe: Base anim for RecyclerView item 8 | * 9 | * @author Simon Han 10 | * @date 2015.09.20 11 | * @email hanzx1024@gmail.com 12 | */ 13 | 14 | public interface BaseAnimation { 15 | Animator[] getAnimators(View view); 16 | } 17 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/recycler/animation/ScaleInAnimation.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.recycler.animation; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.view.View; 6 | 7 | /** 8 | * describe: Scale anim for RecyclerView item 9 | * 10 | * @author Simon Han 11 | * @date 2015.09.20 12 | * @email hanzx1024@gmail.com 13 | */ 14 | 15 | public class ScaleInAnimation implements BaseAnimation { 16 | private static final float DEF_SCALE_FROM = 0.5f; 17 | private final float mFrom; 18 | 19 | public ScaleInAnimation() { 20 | this(DEF_SCALE_FROM); 21 | } 22 | 23 | public ScaleInAnimation(float from) { 24 | mFrom = from; 25 | } 26 | 27 | @Override 28 | public Animator[] getAnimators(View view) { 29 | return new Animator[]{ 30 | ObjectAnimator.ofFloat(view, "scaleX", mFrom, 1.0f), 31 | ObjectAnimator.ofFloat(view, "scaleY", mFrom, 1.0f) 32 | }; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/recycler/animation/SlideInBottomAnimation.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.recycler.animation; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.view.View; 6 | 7 | /** 8 | * describe: Slide in bottom anim for RecyclerView item 9 | * 10 | * @author Simon Han 11 | * @date 2015.09.20 12 | * @email hanzx1024@gmail.com 13 | */ 14 | 15 | public class SlideInBottomAnimation implements BaseAnimation { 16 | @Override 17 | public Animator[] getAnimators(View view) { 18 | return new Animator[]{ObjectAnimator.ofFloat(view, "translationY", view.getMeasuredHeight() 19 | , 0)}; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/recycler/animation/SlideInLeftAnimation.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.recycler.animation; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.view.View; 6 | 7 | /** 8 | * describe: Slide in left anim for RecyclerView item 9 | * 10 | * @author Simon Han 11 | * @date 2015.09.20 12 | * @email hanzx1024@gmail.com 13 | */ 14 | 15 | public class SlideInLeftAnimation implements BaseAnimation { 16 | @Override 17 | public Animator[] getAnimators(View view) { 18 | return new Animator[]{ObjectAnimator.ofFloat(view, "translationX", -view.getRootView() 19 | .getWidth(), 0)}; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/recycler/animation/SlideInRightAnimation.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.recycler.animation; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ObjectAnimator; 5 | import android.view.View; 6 | 7 | /** 8 | * describe: Slide in right anim for RecyclerView item 9 | * 10 | * @author Simon Han 11 | * @date 2015.09.20 12 | * @email hanzx1024@gmail.com 13 | */ 14 | 15 | public class SlideInRightAnimation implements BaseAnimation { 16 | @Override 17 | public Animator[] getAnimators(View view) { 18 | return new Animator[]{ObjectAnimator.ofFloat(view, "translationX", view.getRootView() 19 | .getWidth(), 0)}; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/recycler/entity/IExpandable.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.recycler.entity; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * describe: implement the interface if the item is expandable 7 | * Created by luoxw on 2016/8/8. 8 | * 9 | * @author Simon Han 10 | * @date 2015.09.18 11 | * @email hanzx1024@gmail.com 12 | */ 13 | 14 | public interface IExpandable { 15 | boolean isExpanded(); 16 | 17 | void setExpanded(boolean expanded); 18 | 19 | List getSubItems(); 20 | 21 | /** 22 | * Get the level of this item. The level start from 0. 23 | * If you don't care about the level, just return a negative. 24 | */ 25 | int getLevel(); 26 | } 27 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/recycler/entity/MultiItemEntity.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.recycler.entity; 2 | 3 | /** 4 | * describe: 5 | * 6 | * @author Simon Han 7 | * @date 2015.09.18 8 | * @email hanzx1024@gmail.com 9 | */ 10 | 11 | public interface MultiItemEntity { 12 | 13 | int getItemType(); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/recycler/entity/SectionEntity.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.recycler.entity; 2 | 3 | /** 4 | * describe: 5 | * 6 | * @author Simon Han 7 | * @date 2015.09.18 8 | * @email hanzx1024@gmail.com 9 | * @param 10 | */ 11 | 12 | public abstract class SectionEntity { 13 | public boolean isHeader; 14 | public T t; 15 | public String header; 16 | 17 | public SectionEntity(boolean isHeader, String header) { 18 | this.isHeader = isHeader; 19 | this.header = header; 20 | this.t = null; 21 | } 22 | 23 | public SectionEntity(T t) { 24 | this.isHeader = false; 25 | this.header = null; 26 | this.t = t; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/recycler/listeners/OnItemClickListener.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.recycler.listeners; 2 | 3 | import android.support.v7.widget.RecyclerView; 4 | import android.view.View; 5 | 6 | import com.simon.agiledevelop.recycler.adapter.RecycledAdapter; 7 | 8 | /** 9 | * describe: item click listener for RecyclerView 10 | * 11 | * @author Simon Han 12 | * @date 2015.09.17 13 | * @email hanzx1024@gmail.com 14 | */ 15 | 16 | public abstract class OnItemClickListener extends SimpleClickListener { 17 | 18 | @Override 19 | protected void onItemLongClick(RecycledAdapter adapter, RecyclerView recyclerView, View view, int 20 | position) { 21 | 22 | } 23 | 24 | @Override 25 | protected void onItemChildLongClick(RecycledAdapter adapter, RecyclerView recyclerView, View 26 | view, int position) { 27 | 28 | } 29 | 30 | @Override 31 | protected void onItemChildClick(RecycledAdapter adapter, RecyclerView recyclerView, View view, 32 | int position) { 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/state/loading/Animatable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Qiujuer 3 | * WebSite http://www.qiujuer.net 4 | * Created 08/07/2015 5 | * Changed 08/07/2015 6 | * Version 3.0.0 7 | * Author Qiujuer 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | package com.simon.agiledevelop.state.loading; 22 | 23 | /** 24 | * describe: Interface that drawables supporting animations should implement 25 | * 26 | * @author Simon Han 27 | * @date 2016.10.19 28 | * @email hanzx1024@gmail.com 29 | */ 30 | 31 | public interface Animatable extends android.graphics.drawable.Animatable { 32 | /** 33 | * This is drawable animation frame duration 34 | */ 35 | public static final int FRAME_DURATION = 16; 36 | 37 | /** 38 | * This is drawable animation duration 39 | */ 40 | public static final int ANIMATION_DURATION = 250; 41 | } 42 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/state/network/NetChangeObserver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com] 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.simon.agiledevelop.state.network; 18 | 19 | import com.simon.agiledevelop.utils.NetHelper; 20 | 21 | /** 22 | * describe: Observer for NewWork 23 | * 24 | * @author Simon Han 25 | * @date 2015.08.27 26 | * @email hanzx1024@gmail.com 27 | */ 28 | public class NetChangeObserver { 29 | 30 | /** 31 | * when network connected callback 32 | */ 33 | public void onNetConnected(NetHelper.NetType type) { 34 | 35 | } 36 | 37 | /** 38 | * when network disconnected callback 39 | */ 40 | public void onNetDisConnect() { 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/state/network/NetWorkListener.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.state.network; 2 | 3 | import com.simon.agiledevelop.utils.NetHelper; 4 | 5 | /** 6 | * describe: Listener for NetWork 7 | * 8 | * @author Simon Han 9 | * @date 2015.08.27 10 | * @email hanzx1024@gmail.com 11 | */ 12 | 13 | public interface NetWorkListener { 14 | void onNetWorkConnected(NetHelper.NetType type); 15 | 16 | void onNetWorkDisConnect(); 17 | } 18 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/utils/App.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.utils; 2 | 3 | import android.app.Application; 4 | 5 | import com.simon.agiledevelop.log.LLog; 6 | 7 | /** 8 | * describe: Return global application 9 | * 10 | * @author Simon Han 11 | * @date 2016.10.20 12 | * @email hanzx1024@gmail.com 13 | */ 14 | public class App { 15 | public static final Application INSTANCE; 16 | 17 | static { 18 | Application app = null; 19 | try { 20 | app = (Application) Class.forName("android.app.AppGlobals").getMethod 21 | ("getInitialApplication").invoke(null); 22 | if (app == null) 23 | throw new IllegalStateException("Static initialization of Applications must be on" + 24 | " main thread."); 25 | } catch (final Exception e) { 26 | LLog.e("Failed to get current application from AppGlobals." + e.getMessage()); 27 | try { 28 | app = (Application) Class.forName("android.app.ActivityThread").getMethod 29 | ("currentApplication").invoke(null); 30 | } catch (final Exception ex) { 31 | LLog.e("Failed to get current application from ActivityThread." + e.getMessage()); 32 | } 33 | } finally { 34 | INSTANCE = app; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/utils/CloseHelper.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.utils; 2 | 3 | import java.io.Closeable; 4 | import java.io.IOException; 5 | 6 | /** 7 | * describe: Help class for close IO 8 | * 9 | * @author Simon Han 10 | * @date 2015.05.20 11 | * @email hanzx1024@gmail.com 12 | */ 13 | public class CloseHelper { 14 | 15 | private CloseHelper() { 16 | throw new UnsupportedOperationException("u can't instantiate me..."); 17 | } 18 | 19 | /** 20 | * 关闭IO 21 | * 22 | * @param closeables closeable 23 | */ 24 | public static void closeIO(Closeable... closeables) { 25 | if (closeables == null) return; 26 | try { 27 | for (Closeable closeable : closeables) { 28 | if (closeable != null) { 29 | closeable.close(); 30 | } 31 | } 32 | } catch (IOException e) { 33 | e.printStackTrace(); 34 | } 35 | } 36 | 37 | /** 38 | * 安静关闭IO 39 | * 40 | * @param closeables closeable 41 | */ 42 | public static void closeIOQuietly(Closeable... closeables) { 43 | if (closeables == null) return; 44 | try { 45 | for (Closeable closeable : closeables) { 46 | if (closeable != null) { 47 | closeable.close(); 48 | } 49 | } 50 | } catch (IOException e) { 51 | e.printStackTrace(); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/utils/schedulers/AndroidSchedulerTransformer.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.utils.schedulers; 2 | 3 | import rx.Observable; 4 | 5 | /** 6 | * describe: 7 | * 8 | * @author Apeplan 9 | * @date 2016/12/27 10 | * @email hanzx1024@gmail.com 11 | */ 12 | 13 | public class AndroidSchedulerTransformer implements Observable.Transformer { 14 | @Override 15 | public Observable call(Observable tObservable) { 16 | return tObservable.subscribeOn(SchedulerProvider.getInstance().io()) 17 | .observeOn(SchedulerProvider.getInstance().ui()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/utils/schedulers/BaseSchedulerProvider.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.utils.schedulers; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import rx.Scheduler; 6 | 7 | /** 8 | * describe: Allow providing different types of {@link Scheduler}s 9 | * 10 | * @author Simon Han 11 | * @date 2016.10.25 12 | * @email hanzx1024@gmail.com 13 | */ 14 | 15 | public interface BaseSchedulerProvider { 16 | @NonNull 17 | Scheduler computation(); 18 | 19 | @NonNull 20 | Scheduler io(); 21 | 22 | @NonNull 23 | Scheduler ui(); 24 | } 25 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/utils/schedulers/ImmediateSchedulerProvider.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.utils.schedulers; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import rx.Scheduler; 6 | import rx.schedulers.Schedulers; 7 | 8 | /** 9 | * describe: Implementation of the {@link BaseSchedulerProvider} making all {@link Scheduler}s 10 | * immediate 11 | * 12 | * @author Simon Han 13 | * @date 2016.10.20 14 | * @email hanzx1024@gmail.com 15 | */ 16 | 17 | public class ImmediateSchedulerProvider implements BaseSchedulerProvider { 18 | @NonNull 19 | @Override 20 | public Scheduler computation() { 21 | return Schedulers.immediate(); 22 | } 23 | 24 | @NonNull 25 | @Override 26 | public Scheduler io() { 27 | return Schedulers.immediate(); 28 | } 29 | 30 | @NonNull 31 | @Override 32 | public Scheduler ui() { 33 | return Schedulers.immediate(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /agiledevelop/src/main/java/com/simon/agiledevelop/utils/schedulers/SchedulerProvider.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop.utils.schedulers; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import rx.Scheduler; 6 | import rx.android.schedulers.AndroidSchedulers; 7 | import rx.schedulers.Schedulers; 8 | 9 | 10 | /** 11 | * describe: Provides different types of schedulers 12 | * 13 | * @author Simon Han 14 | * @date 2016.10.20 15 | * @email hanzx1024@gmail.com 16 | */ 17 | 18 | public class SchedulerProvider implements BaseSchedulerProvider { 19 | 20 | private static SchedulerProvider INSTANCE; 21 | 22 | /** 23 | * Prevent direct instantiation 24 | */ 25 | private SchedulerProvider() { 26 | 27 | } 28 | 29 | public static SchedulerProvider getInstance() { 30 | if (INSTANCE == null) { 31 | synchronized (SchedulerProvider.class) { 32 | if (INSTANCE == null) { 33 | INSTANCE = new SchedulerProvider(); 34 | } 35 | } 36 | } 37 | return INSTANCE; 38 | } 39 | 40 | @NonNull 41 | @Override 42 | public Scheduler computation() { 43 | return Schedulers.computation(); 44 | } 45 | 46 | @NonNull 47 | @Override 48 | public Scheduler io() { 49 | return Schedulers.io(); 50 | } 51 | 52 | @NonNull 53 | @Override 54 | public Scheduler ui() { 55 | return AndroidSchedulers.mainThread(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/drawable-xhdpi/head_portrait_def.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/agiledevelop/src/main/res/drawable-xhdpi/head_portrait_def.png -------------------------------------------------------------------------------- /agiledevelop/src/main/res/drawable-xhdpi/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/agiledevelop/src/main/res/drawable-xhdpi/placeholder.png -------------------------------------------------------------------------------- /agiledevelop/src/main/res/drawable-xhdpi/rotate_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/agiledevelop/src/main/res/drawable-xhdpi/rotate_arrow.png -------------------------------------------------------------------------------- /agiledevelop/src/main/res/drawable-xhdpi/sample_footer_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/agiledevelop/src/main/res/drawable-xhdpi/sample_footer_loading.png -------------------------------------------------------------------------------- /agiledevelop/src/main/res/drawable-xhdpi/state_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/agiledevelop/src/main/res/drawable-xhdpi/state_empty.png -------------------------------------------------------------------------------- /agiledevelop/src/main/res/drawable-xhdpi/state_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/agiledevelop/src/main/res/drawable-xhdpi/state_error.png -------------------------------------------------------------------------------- /agiledevelop/src/main/res/drawable-xhdpi/state_net_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/agiledevelop/src/main/res/drawable-xhdpi/state_net_error.png -------------------------------------------------------------------------------- /agiledevelop/src/main/res/drawable-xhdpi/state_nonet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/agiledevelop/src/main/res/drawable-xhdpi/state_nonet.png -------------------------------------------------------------------------------- /agiledevelop/src/main/res/drawable/sample_footer_loading_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/layout/banner_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/layout/banner_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 19 | 20 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/layout/cube_ptr_simple_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/layout/def_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 26 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/layout/view_empty.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 24 | 25 | 34 | 35 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/layout/view_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 24 | 25 | 34 | 35 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/layout/view_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 18 | 19 | 28 | 29 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/values/attrs_avatar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/values/attrs_badge.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/values/attrs_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/values/attrs_circleimv.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/values/attrs_cube_ptr.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 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/values/attrs_stateview.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #303F9F 4 | #FF9800 5 | #E0E0E0 6 | #00BCD4 7 | #9C27B0 8 | #2196F3 9 | #E91E63 10 | #e0e0e0 11 | 12 | 13 | @color/cyan_500 14 | @color/purple_500 15 | @color/blue_500 16 | @color/orange_500 17 | @color/pink_500 18 | 19 | 20 | #D50000 21 | 22 | 23 | #1E000000 24 | #33019285 25 | 26 | #33000000 27 | 28 | #ECECEC 29 | #019285 30 | #FFFFFF 31 | #aaaaaa 32 | 33 | #CD252B 34 | #414141 35 | 36 | #33475f 37 | #727272 38 | #9E9E9E 39 | 40 | 41 | #FFF 42 | #20000000 43 | 44 | #FF0000 45 | #000000 46 | 47 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/values/load_attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AgileDevelop 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 | 已经复制 %s 31 | 32 | 正在加载中... 33 | 加载失败,请点我重试 34 | 35 | com.simon.agiledevelop.widget.behavior.BottomBehavior 36 | com.simon.agiledevelop.widget.behavior.TitleBehavior 37 | 38 | -------------------------------------------------------------------------------- /agiledevelop/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /agiledevelop/src/test/java/com/simon/agiledevelop/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.simon.agiledevelop; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | *.iml 3 | -------------------------------------------------------------------------------- /app/drib.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/drib.jks -------------------------------------------------------------------------------- /app/src/androidTest/java/com/simon/dribbble/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.simon.dribbble", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/assets/editor.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/assets/fonts/Pacifico.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/assets/fonts/Pacifico.ttf -------------------------------------------------------------------------------- /app/src/main/assets/fonts/agency.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/assets/fonts/agency.ttf -------------------------------------------------------------------------------- /app/src/main/assets/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2015 Wasabeef 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 | @charset "UTF-8"; 18 | 19 | 20 | html { 21 | height: 100%; 22 | } 23 | 24 | body { 25 | overflow: scroll; 26 | display: table; 27 | table-layout: fixed; 28 | width: 100%; 29 | min-height:100%; 30 | } 31 | 32 | #editor { 33 | display: table-cell; 34 | 35 | -webkit-user-select: auto !important; 36 | -webkit-user-modify: read-write !important; 37 | 38 | outline: 0px solid transparent; 39 | background-repeat: no-repeat; 40 | background-position: center; 41 | background-size: cover; 42 | } 43 | 44 | #editor[placeholder]:empty:not(:focus):before { 45 | content: attr(placeholder); 46 | opacity: .5; 47 | }} 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/crop/Log.java: -------------------------------------------------------------------------------- 1 | package com.simon.crop; 2 | 3 | class Log { 4 | 5 | private static final String TAG = "android-crop"; 6 | 7 | public static void e(String msg) { 8 | android.util.Log.e(TAG, msg); 9 | } 10 | 11 | public static void e(String msg, Throwable e) { 12 | android.util.Log.e(TAG, msg, e); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/GlobalConstant.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble; 2 | 3 | /** 4 | * Created by: Simon 5 | * Email: simon.han0220@gmail.com 6 | * Created on: 2016/8/24 15:57 7 | */ 8 | 9 | public class GlobalConstant { 10 | 11 | public static String profile_url = "https://d13yacurqjgara.cloudfront" + 12 | ".net/users/1057621/avatars/normal/b3f8d939da8e2babcb830ee7f3c8cbd4.png?1470285942"; 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/data/GsonResponseBodyConverter.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.data; 2 | 3 | import com.google.gson.Gson; 4 | 5 | import java.io.IOException; 6 | import java.lang.reflect.Type; 7 | 8 | import okhttp3.ResponseBody; 9 | import retrofit2.Converter; 10 | 11 | /** 12 | * describe: 13 | * 14 | * @author Apeplan 15 | * @date 2017/1/12 16 | * @email hanzx1024@gmail.com 17 | */ 18 | 19 | public class GsonResponseBodyConverter implements Converter { 20 | private final Gson mGson; 21 | private final Type mType; 22 | 23 | public GsonResponseBodyConverter(Gson gson, Type type) { 24 | mGson = gson; 25 | mType = type; 26 | } 27 | 28 | @Override 29 | public T convert(ResponseBody value) throws IOException { 30 | String response = value.string(); 31 | /*//httpResult 只解析result字段 32 | HttpResult httpResult = gson.fromJson(response, HttpResult.class); 33 | // 34 | if (httpResult.getCount() == 0) { 35 | throw new ApiException(100); 36 | } 37 | return gson.fromJson(response, type);*/ 38 | 39 | 40 | return null; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/data/model/AttachmentEntity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.data.model; 2 | 3 | /** 4 | * Created by: Simon 5 | * Email: simon.han0220@gmail.com 6 | * Created on: 2016/9/14 16:13 7 | */ 8 | 9 | public class AttachmentEntity { 10 | 11 | private long id; 12 | private String url; 13 | private String thumbnail_url; 14 | private long size; 15 | private String content_type; 16 | private int views_count; 17 | private String created_at; 18 | 19 | public long getId() { 20 | return id; 21 | } 22 | 23 | public void setId(long id) { 24 | this.id = id; 25 | } 26 | 27 | public String getUrl() { 28 | return url; 29 | } 30 | 31 | public void setUrl(String url) { 32 | this.url = url; 33 | } 34 | 35 | public String getThumbnail_url() { 36 | return thumbnail_url; 37 | } 38 | 39 | public void setThumbnail_url(String thumbnail_url) { 40 | this.thumbnail_url = thumbnail_url; 41 | } 42 | 43 | public long getSize() { 44 | return size; 45 | } 46 | 47 | public void setSize(long size) { 48 | this.size = size; 49 | } 50 | 51 | public String getContent_type() { 52 | return content_type; 53 | } 54 | 55 | public void setContent_type(String content_type) { 56 | this.content_type = content_type; 57 | } 58 | 59 | public int getViews_count() { 60 | return views_count; 61 | } 62 | 63 | public void setViews_count(int views_count) { 64 | this.views_count = views_count; 65 | } 66 | 67 | public String getCreated_at() { 68 | return created_at; 69 | } 70 | 71 | public void setCreated_at(String created_at) { 72 | this.created_at = created_at; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/data/model/BucketEntity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.data.model; 2 | 3 | /** 4 | * Created by: Simon 5 | * Email: simon.han0220@gmail.com 6 | * Created on: 2016/9/2 14:19 7 | */ 8 | 9 | public class BucketEntity { 10 | 11 | private int id; 12 | private String name; 13 | private String description; 14 | private int shots_count; 15 | private String created_at; 16 | private String updated_at; 17 | 18 | private User user; 19 | 20 | public int getId() { 21 | return id; 22 | } 23 | 24 | public void setId(int id) { 25 | this.id = id; 26 | } 27 | 28 | public String getName() { 29 | return name; 30 | } 31 | 32 | public void setName(String name) { 33 | this.name = name; 34 | } 35 | 36 | public String getDescription() { 37 | return description; 38 | } 39 | 40 | public void setDescription(String description) { 41 | this.description = description; 42 | } 43 | 44 | public int getShots_count() { 45 | return shots_count; 46 | } 47 | 48 | public void setShots_count(int shots_count) { 49 | this.shots_count = shots_count; 50 | } 51 | 52 | public String getCreated_at() { 53 | return created_at; 54 | } 55 | 56 | public void setCreated_at(String created_at) { 57 | this.created_at = created_at; 58 | } 59 | 60 | public String getUpdated_at() { 61 | return updated_at; 62 | } 63 | 64 | public void setUpdated_at(String updated_at) { 65 | this.updated_at = updated_at; 66 | } 67 | 68 | public User getUser() { 69 | return user; 70 | } 71 | 72 | public void setUser(User user) { 73 | this.user = user; 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/data/model/CommentEntity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.data.model; 2 | 3 | /** 4 | * Shot 评论 5 | *

6 | * Created by: Simon 7 | * Email: simon.han0220@gmail.com 8 | * Created on: 2016/9/1 10:43 9 | */ 10 | 11 | public class CommentEntity { 12 | 13 | private int id; 14 | private String body; 15 | private int likes_count; 16 | private String likes_url; 17 | private String created_at; 18 | private String updated_at; 19 | 20 | private User user; 21 | 22 | public int getId() { 23 | return id; 24 | } 25 | 26 | public void setId(int id) { 27 | this.id = id; 28 | } 29 | 30 | public String getBody() { 31 | return body; 32 | } 33 | 34 | public void setBody(String body) { 35 | this.body = body; 36 | } 37 | 38 | public int getLikes_count() { 39 | return likes_count; 40 | } 41 | 42 | public void setLikes_count(int likes_count) { 43 | this.likes_count = likes_count; 44 | } 45 | 46 | public String getLikes_url() { 47 | return likes_url; 48 | } 49 | 50 | public void setLikes_url(String likes_url) { 51 | this.likes_url = likes_url; 52 | } 53 | 54 | public String getCreated_at() { 55 | return created_at; 56 | } 57 | 58 | public void setCreated_at(String created_at) { 59 | this.created_at = created_at; 60 | } 61 | 62 | public String getUpdated_at() { 63 | return updated_at; 64 | } 65 | 66 | public void setUpdated_at(String updated_at) { 67 | this.updated_at = updated_at; 68 | } 69 | 70 | public User getUser() { 71 | return user; 72 | } 73 | 74 | public void setUser(User user) { 75 | this.user = user; 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/data/model/CommonEntity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.data.model; 2 | 3 | /** 4 | * Created by: Simon 5 | * Email: simon.han0220@gmail.com 6 | * Created on: 2016/9/12 15:43 7 | */ 8 | 9 | public class CommonEntity { 10 | private long id; 11 | private String created_at; 12 | 13 | public long getId() { 14 | return id; 15 | } 16 | 17 | public void setId(long id) { 18 | this.id = id; 19 | } 20 | 21 | public String getCreated_at() { 22 | return created_at; 23 | } 24 | 25 | public void setCreated_at(String created_at) { 26 | this.created_at = created_at; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/data/model/FollowersEntity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.data.model; 2 | 3 | /** 4 | * Created by: Simon 5 | * Email: simon.han0220@gmail.com 6 | * Created on: 2016/9/12 15:41 7 | */ 8 | 9 | public class FollowersEntity { 10 | 11 | private long id; 12 | private String created_at; 13 | 14 | private User follower; 15 | 16 | public long getId() { 17 | return id; 18 | } 19 | 20 | public void setId(long id) { 21 | this.id = id; 22 | } 23 | 24 | public String getCreated_at() { 25 | return created_at; 26 | } 27 | 28 | public void setCreated_at(String created_at) { 29 | this.created_at = created_at; 30 | } 31 | 32 | public User getFollower() { 33 | return follower; 34 | } 35 | 36 | public void setFollower(User follower) { 37 | this.follower = follower; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/data/model/ImagesEntity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.data.model; 2 | 3 | public class ImagesEntity { 4 | private String hidpi; 5 | private String normal; 6 | private String teaser; 7 | 8 | public void setHidpi(String hidpi) { 9 | this.hidpi = hidpi; 10 | } 11 | 12 | public void setNormal(String normal) { 13 | this.normal = normal; 14 | } 15 | 16 | public void setTeaser(String teaser) { 17 | this.teaser = teaser; 18 | } 19 | 20 | public String getHidpi() { 21 | return hidpi; 22 | } 23 | 24 | public String getNormal() { 25 | return normal; 26 | } 27 | 28 | public String getTeaser() { 29 | return teaser; 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/data/model/LikeEntity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.data.model; 2 | 3 | /** 4 | * Created by: Simon 5 | * Email: simon.han0220@gmail.com 6 | * Created on: 2016/9/6 15:11 7 | */ 8 | 9 | public class LikeEntity { 10 | 11 | private long id; 12 | private String created_at; 13 | 14 | private User user; 15 | 16 | public long getId() { 17 | return id; 18 | } 19 | 20 | public void setId(long id) { 21 | this.id = id; 22 | } 23 | 24 | public String getCreated_at() { 25 | return created_at; 26 | } 27 | 28 | public void setCreated_at(String created_at) { 29 | this.created_at = created_at; 30 | } 31 | 32 | public User getUser() { 33 | return user; 34 | } 35 | 36 | public void setUser(User user) { 37 | this.user = user; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/data/model/LinksEntity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.data.model; 2 | 3 | import android.os.Parcel; 4 | import android.os.Parcelable; 5 | 6 | public class LinksEntity implements Parcelable { 7 | private String web; 8 | private String twitter; 9 | 10 | protected LinksEntity(Parcel in) { 11 | web = in.readString(); 12 | twitter = in.readString(); 13 | } 14 | 15 | public static final Creator CREATOR = new Creator() { 16 | @Override 17 | public LinksEntity createFromParcel(Parcel in) { 18 | return new LinksEntity(in); 19 | } 20 | 21 | @Override 22 | public LinksEntity[] newArray(int size) { 23 | return new LinksEntity[size]; 24 | } 25 | }; 26 | 27 | public void setWeb(String web) { 28 | this.web = web; 29 | } 30 | 31 | public void setTwitter(String twitter) { 32 | this.twitter = twitter; 33 | } 34 | 35 | public String getWeb() { 36 | return web; 37 | } 38 | 39 | public String getTwitter() { 40 | return twitter; 41 | } 42 | 43 | @Override 44 | public int describeContents() { 45 | return 0; 46 | } 47 | 48 | @Override 49 | public void writeToParcel(Parcel dest, int flags) { 50 | dest.writeString(web); 51 | dest.writeString(twitter); 52 | } 53 | } -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/data/model/ProjectEntity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.data.model; 2 | 3 | /** 4 | * Created by: Simon 5 | * Email: simon.han0220@gmail.com 6 | * Created on: 2016/9/12 15:29 7 | */ 8 | 9 | public class ProjectEntity { 10 | 11 | private long id; 12 | private String name; 13 | private String description; 14 | private int shots_count; 15 | private String created_at; 16 | private String updated_at; 17 | 18 | public long getId() { 19 | return id; 20 | } 21 | 22 | public void setId(long id) { 23 | this.id = id; 24 | } 25 | 26 | public String getName() { 27 | return name; 28 | } 29 | 30 | public void setName(String name) { 31 | this.name = name; 32 | } 33 | 34 | public String getDescription() { 35 | return description; 36 | } 37 | 38 | public void setDescription(String description) { 39 | this.description = description; 40 | } 41 | 42 | public int getShots_count() { 43 | return shots_count; 44 | } 45 | 46 | public void setShots_count(int shots_count) { 47 | this.shots_count = shots_count; 48 | } 49 | 50 | public String getCreated_at() { 51 | return created_at; 52 | } 53 | 54 | public void setCreated_at(String created_at) { 55 | this.created_at = created_at; 56 | } 57 | 58 | public String getUpdated_at() { 59 | return updated_at; 60 | } 61 | 62 | public void setUpdated_at(String updated_at) { 63 | this.updated_at = updated_at; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/data/model/TokenEntity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.data.model; 2 | 3 | import android.os.Parcel; 4 | import android.os.Parcelable; 5 | 6 | /** 7 | * Created by: Simon 8 | * Email: simon.han0220@gmail.com 9 | * Created on: 2016/8/3 13:42 10 | */ 11 | public class TokenEntity implements Parcelable { 12 | 13 | public String access_token; 14 | public String token_type; 15 | public String scope; 16 | 17 | protected TokenEntity(Parcel in) { 18 | this.access_token = in.readString(); 19 | this.token_type = in.readString(); 20 | this.scope = in.readString(); 21 | } 22 | 23 | public static final Creator CREATOR = new Creator() { 24 | @Override 25 | public TokenEntity createFromParcel(Parcel in) { 26 | return new TokenEntity(in); 27 | } 28 | 29 | @Override 30 | public TokenEntity[] newArray(int size) { 31 | return new TokenEntity[size]; 32 | } 33 | }; 34 | 35 | @Override 36 | public int describeContents() { 37 | return 0; 38 | } 39 | 40 | @Override 41 | public void writeToParcel(Parcel dest, int flags) { 42 | dest.writeString(this.access_token); 43 | dest.writeString(this.token_type); 44 | dest.writeString(this.scope); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/data/model/UserLikeEntity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.data.model; 2 | 3 | /** 4 | * Created by: Simon 5 | * Email: simon.han0220@gmail.com 6 | * Created on: 2016/9/12 15:38 7 | */ 8 | 9 | public class UserLikeEntity { 10 | 11 | private long id; 12 | private String created_at; 13 | 14 | private ShotEntity shot; 15 | 16 | public long getId() { 17 | return id; 18 | } 19 | 20 | public void setId(long id) { 21 | this.id = id; 22 | } 23 | 24 | public String getCreated_at() { 25 | return created_at; 26 | } 27 | 28 | public void setCreated_at(String created_at) { 29 | this.created_at = created_at; 30 | } 31 | 32 | public ShotEntity getShot() { 33 | return shot; 34 | } 35 | 36 | public void setShot(ShotEntity shot) { 37 | this.shot = shot; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/listener/TextWatcherImpl.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.listener; 2 | 3 | import android.text.Editable; 4 | import android.text.TextWatcher; 5 | 6 | /** 7 | * Created by: Simon 8 | * Email: simon.han0220@gmail.com 9 | * Created on: 2015/9/11 18:20 10 | */ 11 | 12 | public abstract class TextWatcherImpl implements TextWatcher { 13 | 14 | @Override 15 | public void beforeTextChanged(CharSequence s, int start, int count, int after) { 16 | 17 | } 18 | 19 | @Override 20 | public void onTextChanged(CharSequence s, int start, int before, int count) { 21 | 22 | } 23 | 24 | @Override 25 | public void afterTextChanged(Editable s) { 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/AboutActivity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.widget.Toolbar; 5 | 6 | import com.simon.agiledevelop.mvpframe.BaseActivity; 7 | import com.simon.agiledevelop.mvpframe.Presenter; 8 | import com.simon.agiledevelop.state.StateView; 9 | import com.simon.dribbble.R; 10 | 11 | public class AboutActivity extends BaseActivity { 12 | 13 | @Override 14 | protected int getLayoutId() { 15 | return R.layout.activity_about; 16 | } 17 | 18 | @Override 19 | protected Presenter getPresenter() { 20 | return null; 21 | } 22 | 23 | @Override 24 | protected StateView getLoadingView() { 25 | return null; 26 | } 27 | 28 | @Override 29 | protected void initView(Bundle savedInstanceState) { 30 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); 31 | setCommonBackToolBack(toolbar, "关于"); 32 | } 33 | 34 | @Override 35 | protected void initEventAndData() { 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/CommListContract.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui; 2 | 3 | import com.simon.agiledevelop.mvpframe.MvpView; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Created by: Simon 9 | * Email: simon.han0220@gmail.com 10 | * Created on: 2016/9/13 10:28 11 | */ 12 | 13 | public interface CommListContract { 14 | 15 | interface View extends MvpView { 16 | void showList(List lists); 17 | 18 | void refreshComments(List lists); 19 | 20 | void moreComments(List lists); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/CommListPresenter.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui; 2 | 3 | import com.simon.agiledevelop.mvpframe.RxPresenter; 4 | import com.simon.agiledevelop.mvpframe.MvpView; 5 | 6 | /** 7 | * describe: 8 | * 9 | * @author Apeplan 10 | * @date 2017/1/9 11 | * @email hanzx1024@gmail.com 12 | */ 13 | 14 | public abstract class CommListPresenter extends RxPresenter { 15 | public abstract void loadList(int action, long id, String type, int page); 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/baselist/BaseListContract.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.baselist; 2 | 3 | import com.simon.agiledevelop.mvpframe.RxPresenter; 4 | import com.simon.agiledevelop.mvpframe.MvpView; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by: Simon 10 | * Email: simon.han0220@gmail.com 11 | * Created on: 2016/9/13 10:28 12 | */ 13 | 14 | public interface BaseListContract { 15 | 16 | interface View extends MvpView { 17 | void showList(List lists); 18 | 19 | void refreshComments(List lists); 20 | 21 | void moreComments(List lists); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/main/AvatarActivity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.main; 2 | 3 | import android.graphics.Bitmap; 4 | import android.graphics.BitmapFactory; 5 | import android.os.Bundle; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.view.View; 8 | import android.widget.ImageView; 9 | 10 | import com.simon.agiledevelop.widget.AvatarImageView; 11 | import com.simon.agiledevelop.widget.AvatarLayout; 12 | import com.simon.dribbble.R; 13 | 14 | public class AvatarActivity extends AppCompatActivity implements AvatarLayout.OnClipBitmapListener { 15 | 16 | 17 | private ImageView mImageView; 18 | AvatarLayout rectOrCircleLayout; 19 | @Override 20 | protected void onCreate(Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | setContentView(R.layout.activity_avatar); 23 | this.rectOrCircleLayout = (AvatarLayout) findViewById(R.id.id_ClipView); 24 | rectOrCircleLayout.setmType(AvatarImageView.TYPE.RECT); 25 | rectOrCircleLayout.setImgDrawable(BitmapFactory.decodeResource(getResources(),R.mipmap.qq)); 26 | rectOrCircleLayout.setOnClipBitmapListener(this); 27 | this.mImageView = (ImageView) findViewById(R.id.imv_clip); 28 | } 29 | //回调方法,得到截图 30 | @Override 31 | public void onClipBitmap() { 32 | Bitmap m = rectOrCircleLayout.clipBitmap(); 33 | if(m!=null){ 34 | mImageView.setImageBitmap(m); 35 | mImageView.setVisibility(View.VISIBLE); 36 | rectOrCircleLayout.setVisibility(View.INVISIBLE); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/main/HomeFmAdapter.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.main; 2 | 3 | import android.support.v4.app.Fragment; 4 | import android.support.v4.app.FragmentManager; 5 | import android.support.v4.app.FragmentStatePagerAdapter; 6 | import android.support.v4.view.PagerAdapter; 7 | import android.view.ViewGroup; 8 | 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | 12 | /** 13 | * Created by: Simon 14 | * Email: simon.han0220@gmail.com 15 | * Created on: 2016/8/31 12:18 16 | */ 17 | 18 | public class HomeFmAdapter extends FragmentStatePagerAdapter { 19 | 20 | private List mFragments; 21 | 22 | public HomeFmAdapter(FragmentManager fm) { 23 | super(fm); 24 | mFragments = new ArrayList<>(); 25 | } 26 | 27 | public void addListViews(List fragmentList, boolean clear) { 28 | if (clear) { 29 | mFragments.clear(); 30 | } 31 | 32 | if (fragmentList != null && fragmentList.size() > 0) { 33 | for (int i = 0; i < fragmentList.size(); i++) { 34 | mFragments.add(fragmentList.get(i)); 35 | } 36 | } 37 | notifyDataSetChanged(); 38 | } 39 | 40 | @Override 41 | public Fragment getItem(int position) { 42 | return mFragments.get(position); 43 | } 44 | 45 | @Override 46 | public int getCount() { 47 | return mFragments == null ? 0 : mFragments.size(); 48 | } 49 | 50 | @Override 51 | public Object instantiateItem(ViewGroup container, int position) { 52 | Fragment f = (Fragment) super.instantiateItem(container, position); 53 | return f; 54 | } 55 | 56 | @Override 57 | public int getItemPosition(Object object) { 58 | return PagerAdapter.POSITION_NONE; 59 | } 60 | 61 | @Override 62 | public void destroyItem(ViewGroup container, int position, Object object) { 63 | super.destroyItem(container, position, object); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/projects/ProjectAdapter.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.projects; 2 | 3 | import android.support.v7.widget.RecyclerView; 4 | 5 | import com.simon.agiledevelop.recycler.RecycledViewHolder; 6 | import com.simon.agiledevelop.recycler.adapter.RecycledAdapter; 7 | import com.simon.dribbble.R; 8 | import com.simon.dribbble.data.model.ProjectEntity; 9 | 10 | /** 11 | * Created by: Simon 12 | * Email: simon.han0220@gmail.com 13 | * Created on: 2016/9/12 18:41 14 | */ 15 | 16 | public class ProjectAdapter extends RecycledAdapter { 17 | 18 | private RecyclerView.RecycledViewPool mPool = new RecyclerView.RecycledViewPool(); 19 | 20 | public ProjectAdapter() { 21 | super(R.layout.item_project); 22 | } 23 | 24 | @Override 25 | protected void convert(RecycledViewHolder helper, ProjectEntity item) { 26 | if (null != item) { 27 | helper.setText(R.id.tv_project_na, item.getName()); 28 | helper.setText(R.id.tv_project_count, item.getShots_count() + " 作品"); 29 | helper.setText(R.id.tv_project_desc, item.getDescription()); 30 | } 31 | } 32 | 33 | public RecyclerView.RecycledViewPool getPool() { 34 | return mPool; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/projects/ProjectsFragment.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.projects; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | 6 | import com.simon.dribbble.data.Api; 7 | import com.simon.dribbble.ui.CommListFragment; 8 | import com.simon.dribbble.ui.CommListPresenter; 9 | 10 | /** 11 | * Created by: Simon 12 | * Email: simon.han0220@gmail.com 13 | * Created on: 2016/8/31 11:41 14 | */ 15 | 16 | public class ProjectsFragment extends CommListFragment { 17 | 18 | private int mPageNo = 1; 19 | 20 | public static ProjectsFragment newInstance() { 21 | ProjectsFragment fragment = new ProjectsFragment(); 22 | Bundle args = new Bundle(); 23 | fragment.setArguments(args); 24 | return fragment; 25 | } 26 | 27 | @Override 28 | protected ProjectPresenter getPresenter() { 29 | return new ProjectPresenter(this); 30 | } 31 | 32 | 33 | @Override 34 | protected void initEventAndData() { 35 | super.initEventAndData(); 36 | mPresenter.loadList(Api.EVENT_BEGIN, 0, "", mPageNo); 37 | } 38 | 39 | protected void itemClick(View view, int position) { 40 | 41 | } 42 | 43 | @Override 44 | public void setPresenter(CommListPresenter presenter) { 45 | 46 | } 47 | 48 | @Override 49 | protected ProjectAdapter getListAdapter() { 50 | return new ProjectAdapter(); 51 | } 52 | 53 | @Override 54 | public void refreshData() { 55 | mPageNo = 1; 56 | mPresenter.loadList(Api.EVENT_REFRESH, 0, "", mPageNo); 57 | } 58 | 59 | @Override 60 | public void moreData() { 61 | mPageNo++; 62 | mPresenter.loadList(Api.EVENT_MORE, 0, "", mPageNo); 63 | } 64 | 65 | @Override 66 | protected void retry(int action) { 67 | super.retry(action); 68 | mPresenter.loadList(action, 0, "", mPageNo); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/shots/AttachAdapter.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.shots; 2 | 3 | import android.widget.ImageView; 4 | 5 | import com.simon.agiledevelop.recycler.RecycledViewHolder; 6 | import com.simon.agiledevelop.recycler.adapter.RecycledAdapter; 7 | import com.simon.agiledevelop.utils.ImgLoadHelper; 8 | import com.simon.dribbble.R; 9 | import com.simon.dribbble.data.model.AttachmentEntity; 10 | import com.simon.dribbble.util.StringUtil; 11 | 12 | /** 13 | * Created by: Simon 14 | * Email: simon.han0220@gmail.com 15 | * Created on: 2016/9/14 16:25 16 | */ 17 | 18 | public class AttachAdapter extends RecycledAdapter { 19 | 20 | public AttachAdapter() { 21 | super(R.layout.item_attach); 22 | } 23 | 24 | @Override 25 | protected void convert(RecycledViewHolder helper, AttachmentEntity item) { 26 | if (null != item) { 27 | String url = item.getUrl(); 28 | int views_count = item.getViews_count(); 29 | long size = item.getSize(); 30 | 31 | ImgLoadHelper.image(url, (ImageView) helper.getView(R.id.imv_attach_pic)); 32 | 33 | helper.setText(R.id.tv_views_count, views_count + ""); 34 | 35 | String fileSize = StringUtil.formatFileSize(size, true); 36 | helper.setText(R.id.tv_size, fileSize); 37 | 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/shots/CommentContract.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.shots; 2 | 3 | import com.simon.agiledevelop.mvpframe.RxPresenter; 4 | import com.simon.agiledevelop.mvpframe.MvpView; 5 | import com.simon.dribbble.data.model.CommentEntity; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by: Simon 11 | * Email: simon.han0220@gmail.com 12 | * Created on: 2016/9/1 16:53 13 | */ 14 | 15 | public interface CommentContract { 16 | 17 | interface View extends MvpView { 18 | void showComments(List comments); 19 | 20 | void refreshComments(List comments); 21 | 22 | void moreComments(List comments); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/shots/CreateContract.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.shots; 2 | 3 | import com.simon.agiledevelop.mvpframe.Presenter; 4 | import com.simon.agiledevelop.mvpframe.MvpView; 5 | 6 | /** 7 | * Created by: Simon 8 | * Email: simon.han0220@gmail.com 9 | * Created on: 2016/9/6 17:45 10 | */ 11 | 12 | public interface CreateContract { 13 | 14 | interface View extends MvpView { 15 | void onSuccess(); 16 | } 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/shots/CreatePresenter.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.shots; 2 | 3 | import com.simon.agiledevelop.mvpframe.RxPresenter; 4 | 5 | /** 6 | * Created by: Simon 7 | * Email: simon.han0220@gmail.com 8 | * Created on: 2016/9/6 17:53 9 | */ 10 | 11 | public class CreatePresenter extends RxPresenter { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/shots/SearchContract.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.shots; 2 | 3 | import com.simon.agiledevelop.mvpframe.RxPresenter; 4 | import com.simon.agiledevelop.mvpframe.MvpView; 5 | import com.simon.dribbble.data.model.ShotEntity; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by: Simon 11 | * Email: simon.han0220@gmail.com 12 | * Created on: 2016/9/12 11:24 13 | */ 14 | 15 | public interface SearchContract { 16 | 17 | interface View extends MvpView { 18 | void showSearch(List shots); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/shots/SheetActivity.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.shots; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | 6 | import com.simon.dribbble.R; 7 | 8 | public class SheetActivity extends AppCompatActivity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_sheet); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/shots/ShotDetailContract.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.shots; 2 | 3 | import com.simon.agiledevelop.mvpframe.MvpView; 4 | import com.simon.dribbble.data.model.ShotEntity; 5 | 6 | /** 7 | * Created by: Simon 8 | * Email: simon.han0220@gmail.com 9 | * Created on: 2016/8/31 17:45 10 | */ 11 | 12 | public interface ShotDetailContract { 13 | 14 | interface View extends MvpView { 15 | void showShot(ShotEntity shotsEntity); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/shots/ShotsContract.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.shots; 2 | 3 | import com.simon.agiledevelop.mvpframe.MvpView; 4 | import com.simon.dribbble.data.model.ShotEntity; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by: Simon 10 | * Email: simon.han0220@gmail.com 11 | * Created on: 2016/8/29 16:17 12 | */ 13 | 14 | public interface ShotsContract { 15 | 16 | interface View extends MvpView { 17 | 18 | void renderShotsList(List shotsList); 19 | 20 | void renderMoreShotsList(List shotsList); 21 | 22 | void renderRefrshShotsList(List shotsList); 23 | 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/team/TeamFragment.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.team; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | 6 | import com.simon.dribbble.data.Api; 7 | import com.simon.dribbble.ui.CommListFragment; 8 | import com.simon.dribbble.ui.CommListPresenter; 9 | 10 | /** 11 | * Created by: Simon 12 | * Email: simon.han0220@gmail.com 13 | * Created on: 2016/8/31 12:29 14 | */ 15 | 16 | public class TeamFragment extends CommListFragment { 17 | private int mPageNo = 1; 18 | 19 | public static TeamFragment newInstance() { 20 | TeamFragment fragment = new TeamFragment(); 21 | Bundle args = new Bundle(); 22 | fragment.setArguments(args); 23 | return fragment; 24 | } 25 | 26 | protected TeamPresenter getPresenter() { 27 | return new TeamPresenter(this); 28 | } 29 | 30 | @Override 31 | protected void initEventAndData() { 32 | super.initEventAndData(); 33 | mPresenter.loadList(Api.EVENT_BEGIN, 0, "", mPageNo); 34 | } 35 | 36 | protected void itemClick(View view, int position) { 37 | 38 | } 39 | 40 | @Override 41 | public void setPresenter(CommListPresenter presenter) { 42 | 43 | } 44 | 45 | @Override 46 | protected TeamAdapter getListAdapter() { 47 | return new TeamAdapter(); 48 | } 49 | 50 | @Override 51 | public void refreshData() { 52 | mPageNo = 1; 53 | mPresenter.loadList(Api.EVENT_REFRESH, 0, "", mPageNo); 54 | } 55 | 56 | @Override 57 | public void moreData() { 58 | mPageNo++; 59 | mPresenter.loadList(Api.EVENT_MORE, 0, "", mPageNo); 60 | } 61 | 62 | @Override 63 | protected void retry(int action) { 64 | super.retry(action); 65 | mPresenter.loadList(action, 0, "", mPageNo); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/user/FollowersFragment.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.user; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | 6 | import com.simon.dribbble.data.Api; 7 | import com.simon.dribbble.ui.CommListFragment; 8 | import com.simon.dribbble.ui.CommListPresenter; 9 | 10 | /** 11 | * Created by Simon Han on 2016/9/11. 12 | */ 13 | 14 | public class FollowersFragment extends CommListFragment { 15 | 16 | private int mPageNo = 1; 17 | 18 | public static FollowersFragment newInstance() { 19 | FollowersFragment fragment = new FollowersFragment(); 20 | Bundle args = new Bundle(); 21 | fragment.setArguments(args); 22 | return fragment; 23 | } 24 | 25 | @Override 26 | protected FollowersPresenter getPresenter() { 27 | return new FollowersPresenter(this); 28 | } 29 | 30 | @Override 31 | protected void initEventAndData() { 32 | super.initEventAndData(); 33 | mPresenter.loadList(Api.EVENT_BEGIN, 0, "", mPageNo); 34 | } 35 | 36 | protected void itemClick(View view, int position) { 37 | 38 | } 39 | 40 | @Override 41 | public void setPresenter(CommListPresenter presenter) { 42 | 43 | } 44 | 45 | 46 | @Override 47 | public void refreshData() { 48 | mPageNo = 1; 49 | mPresenter.loadList(Api.EVENT_REFRESH, 0, "", mPageNo); 50 | } 51 | 52 | @Override 53 | protected FollowersAdapter getListAdapter() { 54 | return new FollowersAdapter(); 55 | } 56 | 57 | @Override 58 | protected boolean isLoadMoreEnabled() { 59 | return false; 60 | } 61 | 62 | @Override 63 | protected void retry(int action) { 64 | super.retry(action); 65 | mPresenter.loadList(action, 0, "", mPageNo); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/user/SignInContract.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.user; 2 | 3 | import com.simon.agiledevelop.mvpframe.RxPresenter; 4 | import com.simon.agiledevelop.mvpframe.MvpView; 5 | 6 | /** 7 | * Created by Simon Han on 2016/8/20. 8 | */ 9 | 10 | public interface SignInContract { 11 | 12 | interface View extends MvpView { 13 | /** 14 | * 登录成功 15 | */ 16 | void signSuccess(); 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/user/SignPresenter.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.user; 2 | 3 | import com.simon.agiledevelop.mvpframe.RxPresenter; 4 | import com.simon.agiledevelop.ResultSubscriber; 5 | import com.simon.agiledevelop.log.LLog; 6 | import com.simon.dribbble.data.DribbbleDataManger; 7 | import com.simon.dribbble.data.model.User; 8 | import com.simon.dribbble.util.DribbblePrefs; 9 | 10 | import rx.Observable; 11 | 12 | /** 13 | * Created by Simon Han on 2016/8/20. 14 | */ 15 | 16 | public class SignPresenter extends RxPresenter { 17 | 18 | 19 | public SignPresenter(SignInContract.View view) { 20 | attachView(view); 21 | view.setPresenter(this); 22 | } 23 | 24 | public void getUserToken(final String token) { 25 | Observable tokenAndUser = DribbbleDataManger.getInstance().getTokenAndUser(token); 26 | subscribe(tokenAndUser, new ResultSubscriber() { 27 | @Override 28 | public void onStartRequest() { 29 | 30 | } 31 | 32 | @Override 33 | public void onEndRequest() { 34 | LLog.d("onCompleted: 请求用户信息执行完成"); 35 | getView().onCompleted(0); 36 | } 37 | 38 | @Override 39 | public void onFailed(Throwable e) { 40 | getView().onFailed(0, e.getMessage()); 41 | LLog.d("onError: 请求用户信息 " + e.getMessage()); 42 | } 43 | 44 | @Override 45 | public void onResult(User user) { 46 | if (null != user) { 47 | DribbblePrefs.getInstance().setLoggedInUser(user); 48 | getView().signSuccess(); 49 | } else { 50 | getView().onFailed(0, ""); 51 | } 52 | } 53 | }); 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/user/UserInfoContract.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.user; 2 | 3 | import com.simon.agiledevelop.mvpframe.RxPresenter; 4 | import com.simon.agiledevelop.mvpframe.MvpView; 5 | import com.simon.dribbble.data.model.User; 6 | 7 | /** 8 | * Created by Simon Han on 2016/9/17. 9 | */ 10 | 11 | public interface UserInfoContract { 12 | 13 | interface View extends MvpView { 14 | void showUserInfo(User user); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/user/UserInfoPresenter.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.user; 2 | 3 | import com.simon.agiledevelop.mvpframe.RxPresenter; 4 | import com.simon.agiledevelop.ResultSubscriber; 5 | import com.simon.agiledevelop.log.LLog; 6 | import com.simon.agiledevelop.utils.App; 7 | import com.simon.agiledevelop.utils.NetHelper; 8 | import com.simon.agiledevelop.utils.ResHelper; 9 | import com.simon.dribbble.R; 10 | import com.simon.dribbble.data.DribbbleDataManger; 11 | import com.simon.dribbble.data.model.User; 12 | 13 | import rx.Observable; 14 | 15 | /** 16 | * Created by Simon Han on 2016/9/17. 17 | */ 18 | 19 | public class UserInfoPresenter extends RxPresenter { 20 | 21 | public UserInfoPresenter(UserInfoContract.View view) { 22 | attachView(view); 23 | view.setPresenter(this); 24 | } 25 | 26 | public void loadUserInfo(final int action, long userId) { 27 | 28 | if (!NetHelper.isNetworkConnected(App.INSTANCE)) { 29 | getView().onFailed(action, ResHelper.getStrByResid(R.string.network_exception)); 30 | return; 31 | } 32 | 33 | Observable usersInfo = DribbbleDataManger.getInstance().getUsersInfo(userId); 34 | subscribe(usersInfo, new ResultSubscriber() { 35 | @Override 36 | public void onStartRequest() { 37 | getView().showLoading(action, ""); 38 | } 39 | 40 | @Override 41 | public void onEndRequest() { 42 | LLog.d("onCompleted: 用户信息请求完成"); 43 | getView().onCompleted(action); 44 | } 45 | 46 | @Override 47 | public void onFailed(Throwable e) { 48 | getView().onFailed(action, e.getMessage()); 49 | } 50 | 51 | @Override 52 | public void onResult(User user) { 53 | getView().showUserInfo(user); 54 | } 55 | }); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/user/UserShotsContract.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.user; 2 | 3 | import com.simon.agiledevelop.mvpframe.Presenter; 4 | import com.simon.agiledevelop.mvpframe.MvpView; 5 | import com.simon.dribbble.data.model.ShotEntity; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by: Simon 11 | * Email: simon.han0220@gmail.com 12 | * Created on: 2016/9/12 18:10 13 | */ 14 | 15 | public interface UserShotsContract { 16 | 17 | interface View extends MvpView { 18 | void showShots(List shots); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/ui/user/UserShotsFragment.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.ui.user; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | 6 | import com.simon.dribbble.data.Api; 7 | import com.simon.dribbble.ui.CommListFragment; 8 | import com.simon.dribbble.ui.CommListPresenter; 9 | import com.simon.dribbble.ui.shots.ShotsAdapter; 10 | 11 | /** 12 | * Created by: Simon 13 | * Email: simon.han0220@gmail.com 14 | * Created on: 2016/9/12 18:10 15 | */ 16 | 17 | public class UserShotsFragment extends CommListFragment { 18 | private int mPage = 1; 19 | 20 | public static UserShotsFragment newInstance() { 21 | UserShotsFragment fragment = new UserShotsFragment(); 22 | Bundle args = new Bundle(); 23 | fragment.setArguments(args); 24 | return fragment; 25 | } 26 | 27 | @Override 28 | protected UserShotsPresenter getPresenter() { 29 | return new UserShotsPresenter(this); 30 | } 31 | 32 | @Override 33 | protected void initEventAndData() { 34 | super.initEventAndData(); 35 | mPresenter.loadList(Api.EVENT_BEGIN, 0, "", mPage); 36 | } 37 | 38 | 39 | protected void itemClick(View view, int position) { 40 | 41 | } 42 | 43 | @Override 44 | public void setPresenter(CommListPresenter presenter) { 45 | 46 | } 47 | 48 | @Override 49 | public void refreshData() { 50 | mPage = 1; 51 | mPresenter.loadList(Api.EVENT_REFRESH, 0, "", mPage); 52 | } 53 | 54 | @Override 55 | public void moreData() { 56 | mPage++; 57 | mPresenter.loadList(Api.EVENT_MORE, 0, "", mPage); 58 | } 59 | 60 | @Override 61 | protected ShotsAdapter getListAdapter() { 62 | return new ShotsAdapter(); 63 | } 64 | 65 | @Override 66 | protected void retry(int action) { 67 | super.retry(action); 68 | mPresenter.loadList(action, 0, "", mPage); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/util/ParcelUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Google Inc. 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.simon.dribbble.util; 18 | 19 | import android.os.Parcel; 20 | 21 | import java.util.HashMap; 22 | import java.util.Map; 23 | 24 | /** 25 | * Utility methods for working with Parcels. 26 | */ 27 | public class ParcelUtils { 28 | 29 | private ParcelUtils() { } 30 | 31 | public static void writeStringMap(Map map, Parcel parcel) { 32 | if (map != null && map.size() > 0) { 33 | parcel.writeInt(map.size()); 34 | for (Map.Entry entry : map.entrySet()) { 35 | parcel.writeString(entry.getKey()); 36 | parcel.writeString(entry.getValue()); 37 | } 38 | } else { 39 | parcel.writeInt(0); 40 | } 41 | } 42 | 43 | public static Map readStringMap(Parcel parcel) { 44 | Map map = null; 45 | int size = parcel.readInt(); 46 | if (size > 0) { 47 | map = new HashMap(size); 48 | for (int i = 0; i < size; i++) { 49 | String key = parcel.readString(); 50 | String value = parcel.readString(); 51 | map.put(key, value); 52 | } 53 | } 54 | return map; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/util/TimeZoneUtil.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.util; 2 | 3 | import java.util.Date; 4 | import java.util.TimeZone; 5 | 6 | /** 7 | * 时区帮助类 8 | *

9 | * Created by: Simon 10 | * Email: simon.han0220@gmail.com 11 | * Created on: 2016/2/16 10:13 12 | */ 13 | public class TimeZoneUtil { 14 | 15 | /** 16 | * 判断用户的设备时区是否为东八区(中国) 2014年7月31日 17 | * 18 | * @return 19 | */ 20 | public static boolean isInEasternEightZones() { 21 | boolean defaultVaule = true; 22 | if (TimeZone.getDefault() == TimeZone.getTimeZone("GMT+08")) 23 | defaultVaule = true; 24 | else 25 | defaultVaule = false; 26 | return defaultVaule; 27 | } 28 | 29 | /** 30 | * 根据不同时区,转换时间 2014年7月31日 31 | * 32 | * @param date 33 | * @param oldZone 34 | * @param newZone 35 | * @return 36 | */ 37 | public static Date transformTime(Date date, TimeZone oldZone, TimeZone newZone) { 38 | Date finalDate = null; 39 | if (date != null) { 40 | int timeOffset = oldZone.getOffset(date.getTime()) 41 | - newZone.getOffset(date.getTime()); 42 | finalDate = new Date(date.getTime() - timeOffset); 43 | } 44 | return finalDate; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/util/UIUtils.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.util; 2 | 3 | import android.app.Activity; 4 | import android.os.Build; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | 8 | import java.util.Collection; 9 | 10 | /** 11 | * Created by: Simon 12 | * Email: simon.han0220@gmail.com 13 | * Created on: 2016/8/31 13:01 14 | */ 15 | 16 | public class UIUtils { 17 | 18 | private static final int FLAG_IMMERSIVE = View.SYSTEM_UI_FLAG_IMMERSIVE // 与SYSTEM_UI_FLAG_HIDE_NAVIGATION组合使用,没有设置的话在隐藏导航栏后将没有交互 19 | | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // 隐藏虚拟按键(导航栏) 20 | | View.SYSTEM_UI_FLAG_FULLSCREEN; // Activity全屏显示,且状态栏被隐藏覆盖掉 21 | 22 | public static void exit(Activity activity) { 23 | if (Build.VERSION.SDK_INT >= 19) { 24 | addFlags(activity.getWindow().getDecorView(), FLAG_IMMERSIVE); 25 | } 26 | } 27 | 28 | public static void addFlags(View decorView, int flags) { 29 | decorView.setSystemUiVisibility(decorView.getSystemUiVisibility() | flags); 30 | } 31 | 32 | public static void enter(Activity activity) { 33 | if (Build.VERSION.SDK_INT >= 19) { 34 | clearFlags(activity.getWindow().getDecorView(), FLAG_IMMERSIVE); 35 | } 36 | } 37 | 38 | public static void clearFlags(View view, int flags) { 39 | view.setSystemUiVisibility(view.getSystemUiVisibility() & ~flags); 40 | // & ~flags 清除view.getSystemUiVisibility()中的flags 41 | } 42 | 43 | public static View getRootView(Activity context) { 44 | return ((ViewGroup) context.findViewById(android.R.id.content)).getChildAt(0); 45 | } 46 | 47 | /** 48 | * 判断集合是否为空 49 | * 50 | * @param collection 51 | * @return 52 | */ 53 | public static boolean isEmpty(Collection collection) { 54 | return (collection == null || collection.isEmpty()); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/widget/CircleTransform.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.widget; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | import android.graphics.BitmapShader; 6 | import android.graphics.Canvas; 7 | import android.graphics.Paint; 8 | 9 | import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; 10 | import com.bumptech.glide.load.resource.bitmap.BitmapTransformation; 11 | 12 | /** 13 | * Glide 设置圆形图片 14 | */ 15 | public class CircleTransform extends BitmapTransformation { 16 | public CircleTransform(Context context) { 17 | super(context); 18 | } 19 | 20 | @Override 21 | protected Bitmap transform(BitmapPool pool, Bitmap toTransform, 22 | int outWidth, int outHeight) { 23 | return circleCrop(pool, toTransform); 24 | } 25 | 26 | private static Bitmap circleCrop(BitmapPool pool, Bitmap source) { 27 | if (source == null) 28 | return null; 29 | 30 | int size = Math.min(source.getWidth(), source.getHeight()); 31 | int x = (source.getWidth() - size) / 2; 32 | int y = (source.getHeight() - size) / 2; 33 | 34 | // TODO this could be acquired from the pool too 35 | Bitmap squared = Bitmap.createBitmap(source, x, y, size, size); 36 | 37 | Bitmap result = pool.get(size, size, Bitmap.Config.ARGB_8888); 38 | if (result == null) { 39 | result = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888); 40 | } 41 | 42 | Canvas canvas = new Canvas(result); 43 | Paint paint = new Paint(); 44 | paint.setShader(new BitmapShader(squared, 45 | BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP)); 46 | paint.setAntiAlias(true); 47 | float r = size / 2f; 48 | canvas.drawCircle(r, r, r, paint); 49 | return result; 50 | } 51 | 52 | @Override 53 | public String getId() { 54 | return getClass().getName(); 55 | } 56 | } -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/widget/loadingdia/AnimatedView.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.widget.loadingdia; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | 6 | /** 7 | * Created by: Simon 8 | * Email: simon.han0220@gmail.com 9 | * Created on: 2016/9/9 9:20 10 | */ 11 | 12 | class AnimatedView extends View { 13 | 14 | private int target; 15 | 16 | public AnimatedView(Context context) { 17 | super(context); 18 | } 19 | 20 | public float getXFactor() { 21 | return getX() / target; 22 | } 23 | 24 | public void setXFactor(float xFactor) { 25 | setX(target * xFactor); 26 | } 27 | 28 | public void setTarget(int target) { 29 | this.target = target; 30 | } 31 | 32 | public int getTarget() { 33 | return target; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/widget/loadingdia/AnimatorPlayer.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.widget.loadingdia; 2 | 3 | import android.animation.Animator; 4 | import android.animation.AnimatorListenerAdapter; 5 | import android.animation.AnimatorSet; 6 | 7 | /** 8 | * Created by: Simon 9 | * Email: simon.han0220@gmail.com 10 | * Created on: 2016/9/9 9:21 11 | */ 12 | 13 | class AnimatorPlayer extends AnimatorListenerAdapter { 14 | 15 | private boolean interrupted = false; 16 | private Animator[] animators; 17 | 18 | public AnimatorPlayer(Animator[] animators) { 19 | this.animators = animators; 20 | } 21 | 22 | @Override 23 | public void onAnimationEnd(Animator animation) { 24 | if (!interrupted) animate(); 25 | } 26 | 27 | public void play() { 28 | animate(); 29 | } 30 | 31 | public void stop() { 32 | interrupted = true; 33 | } 34 | 35 | private void animate() { 36 | AnimatorSet set = new AnimatorSet(); 37 | set.playTogether(animators); 38 | set.addListener(this); 39 | set.start(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/widget/loadingdia/HesitateInterpolator.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.widget.loadingdia; 2 | 3 | import android.view.animation.Interpolator; 4 | 5 | /** 6 | * Created by: Simon 7 | * Email: simon.han0220@gmail.com 8 | * Created on: 2016/9/9 9:35 9 | */ 10 | 11 | class HesitateInterpolator implements Interpolator { 12 | 13 | private static double POW = 1.0/2.0; 14 | 15 | @Override 16 | public float getInterpolation(float input) { 17 | return input < 0.5 18 | ? (float) Math.pow(input * 2, POW) * 0.5f 19 | : (float) Math.pow((1 - input) * 2, POW) * -0.5f + 1; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/widget/loadingdia/ProgressLayout.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.widget.loadingdia; 2 | 3 | import android.annotation.TargetApi; 4 | import android.content.Context; 5 | import android.content.res.TypedArray; 6 | import android.os.Build; 7 | import android.util.AttributeSet; 8 | import android.widget.FrameLayout; 9 | 10 | import com.simon.dribbble.R; 11 | 12 | /** 13 | * Created by: Simon 14 | * Email: simon.han0220@gmail.com 15 | * Created on: 2016/9/9 9:28 16 | */ 17 | 18 | public class ProgressLayout extends FrameLayout { 19 | 20 | private static final int DEFAULT_COUNT = 5; 21 | private int spotsCount; 22 | 23 | public ProgressLayout(Context context) { 24 | this(context, null); 25 | } 26 | 27 | public ProgressLayout(Context context, AttributeSet attrs) { 28 | this(context, attrs, 0); 29 | } 30 | 31 | public ProgressLayout(Context context, AttributeSet attrs, int defStyleAttr) { 32 | super(context, attrs, defStyleAttr); 33 | init(attrs, defStyleAttr, 0); 34 | } 35 | 36 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 37 | public ProgressLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { 38 | super(context, attrs, defStyleAttr, defStyleRes); 39 | init(attrs, defStyleAttr, defStyleRes); 40 | } 41 | 42 | private void init(AttributeSet attrs, int defStyleAttr, int defStyleRes) { 43 | TypedArray a = getContext().getTheme().obtainStyledAttributes( 44 | attrs, 45 | R.styleable.Loading_Dialog, 46 | defStyleAttr, defStyleRes); 47 | 48 | spotsCount = a.getInt(R.styleable.Loading_Dialog_DialogSpotColor, DEFAULT_COUNT); 49 | a.recycle(); 50 | } 51 | 52 | public int getSpotsCount() { 53 | return spotsCount; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/widget/navigationbar/behavior/BehaviorBottomBar.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.widget.navigationbar.behavior; 2 | 3 | import android.content.Context; 4 | import android.support.design.widget.AppBarLayout; 5 | import android.support.design.widget.CoordinatorLayout; 6 | import android.util.AttributeSet; 7 | import android.view.View; 8 | 9 | public class BehaviorBottomBar extends CoordinatorLayout.Behavior { 10 | 11 | public BehaviorBottomBar(Context context, AttributeSet attrs) { 12 | super(context, attrs); 13 | } 14 | 15 | //确定所提供的子视图是否有另一个特定的同级视图作为布局从属。 16 | @Override 17 | public boolean layoutDependsOn(CoordinatorLayout parent, View child, View dependency) { 18 | //这个方法是说明这个子控件是依赖AppBarLayout的 19 | return dependency instanceof AppBarLayout; 20 | } 21 | 22 | //用于响应从属布局的变化 23 | @Override 24 | public boolean onDependentViewChanged(CoordinatorLayout parent, View child, View dependency) { 25 | 26 | float translationY = Math.abs(dependency.getTop());//获取更随布局的顶部位置 27 | 28 | child.setTranslationY(translationY); 29 | return true; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/widget/statelayout/FadeScaleViewAnimProvider.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.widget.statelayout; 2 | 3 | import android.animation.Animator; 4 | import android.animation.AnimatorListenerAdapter; 5 | import android.support.annotation.NonNull; 6 | import android.view.View; 7 | 8 | /** 9 | * Created by lufficc on 2016/8/26. 10 | */ 11 | 12 | public class FadeScaleViewAnimProvider implements ViewAnimProvider { 13 | @Override 14 | public void onHideAndShow(final View willHide, final @NonNull View willShow) { 15 | if (willHide != null) { 16 | willHide.animate() 17 | .alpha(0) 18 | .scaleX(0.1f) 19 | .scaleY(0.1f) 20 | .setDuration(300) 21 | .setListener(new AnimatorListenerAdapter() { 22 | @Override 23 | public void onAnimationEnd(Animator animation) { 24 | willHide.setVisibility(View.GONE); 25 | } 26 | 27 | @Override 28 | public void onAnimationCancel(Animator animation) { 29 | willHide.setVisibility(View.GONE); 30 | } 31 | }); 32 | } 33 | 34 | willShow.animate() 35 | .alpha(1) 36 | .scaleX(1f) 37 | .scaleY(1f) 38 | .setDuration(300) 39 | .setListener(new AnimatorListenerAdapter() { 40 | @Override 41 | public void onAnimationEnd(Animator animation) { 42 | willShow.setVisibility(View.VISIBLE); 43 | } 44 | 45 | @Override 46 | public void onAnimationCancel(Animator animation) { 47 | willShow.setVisibility(View.VISIBLE); 48 | } 49 | }); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/widget/statelayout/FadeViewAnimProvider.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.widget.statelayout; 2 | 3 | import android.animation.Animator; 4 | import android.animation.AnimatorListenerAdapter; 5 | import android.support.annotation.NonNull; 6 | import android.view.View; 7 | 8 | /** 9 | * Created by lufficc on 2016/8/26. 10 | */ 11 | 12 | public class FadeViewAnimProvider implements ViewAnimProvider{ 13 | @Override 14 | public void onHideAndShow(final View willHide,final @NonNull View willShow) { 15 | if(willHide != null ) 16 | { 17 | willHide.animate() 18 | .alpha(0) 19 | .setDuration(300) 20 | .setListener(new AnimatorListenerAdapter() { 21 | @Override 22 | public void onAnimationEnd(Animator animation) { 23 | willHide.setVisibility(View.GONE); 24 | } 25 | 26 | @Override 27 | public void onAnimationCancel(Animator animation) { 28 | willHide.setVisibility(View.GONE); 29 | } 30 | }); 31 | } 32 | 33 | 34 | willShow.animate() 35 | .alpha(1) 36 | .setDuration(300) 37 | .setListener(new AnimatorListenerAdapter() { 38 | @Override 39 | public void onAnimationEnd(Animator animation) { 40 | willShow.setVisibility(View.VISIBLE); 41 | } 42 | 43 | @Override 44 | public void onAnimationCancel(Animator animation) { 45 | willShow.setVisibility(View.VISIBLE); 46 | } 47 | }); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/simon/dribbble/widget/statelayout/ViewAnimProvider.java: -------------------------------------------------------------------------------- 1 | package com.simon.dribbble.widget.statelayout; 2 | 3 | import android.support.annotation.NonNull; 4 | import android.support.annotation.Nullable; 5 | import android.view.View; 6 | 7 | /** 8 | * Created by lufficc on 2016/8/26. 9 | */ 10 | 11 | public interface ViewAnimProvider { 12 | void onHideAndShow(@Nullable View willHide, @NonNull View willShow); 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_bottom_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_bottom_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fade.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/abc_spinner.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/abc_spinner.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_action_create.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_center_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_center_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_center_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_center_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_comment.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_about_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_about_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_about_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_about_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_buckets_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_buckets_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_buckets_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_buckets_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_dl_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_dl_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_dl_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_dl_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_dribbble_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_dribbble_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_dribbble_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_dribbble_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_favorite_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_favorite_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_favorite_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_favorite_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_following_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_following_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_following_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_following_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_projects_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_projects_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_projects_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_projects_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_settings_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_settings_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_settings_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_settings_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_shots__normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_shots__normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_shots_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_shots_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_team_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_team_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_team_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_drawer_team_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_home_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_home_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_home_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_home_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_overflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_overflow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_shot_buckets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_shot_buckets.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_shot_likes_12dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_shot_likes_12dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_shot_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_shot_project.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_shot_views.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_shot_views.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_thank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/ic_thank.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/iconfont_downgrey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/iconfont_downgrey.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/location.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/twitter.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-hdpi/web.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/def_nav_drawer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-nodpi/def_nav_drawer.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_camera.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_gallery.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_manage.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_send.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_share.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_slideshow.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/dribbble_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xhdpi/dribbble_about.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/dribbble_p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xhdpi/dribbble_p.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/dribbble_place.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xhdpi/dribbble_place.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/person_image_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xhdpi/person_image_empty.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/placeholder_drib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xhdpi/placeholder_drib.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/bg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/bg_color.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/blockquote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/blockquote.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/bold.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bullets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/bullets.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/h1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/h1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/h2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/h2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/h3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/h3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/h4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/h4.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/h5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/h5.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/h6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/h6.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/html_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/html_edit.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/indent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/indent.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/insert_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/insert_image.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/insert_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/insert_link.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/italic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/italic.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/justify_center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/justify_center.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/justify_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/justify_left.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/justify_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/justify_right.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/numbers.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/outdent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/outdent.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/redo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/strikethrough.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/strikethrough.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/subscript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/subscript.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/superscript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/superscript.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/txt_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/txt_color.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/underline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/underline.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apeplan/Dribbble/f6b3d3a995cdce2fbd366bf5eb7d25e1bcd38d43/app/src/main/res/drawable-xxhdpi/undo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_attachment_gray_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_close_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_comment_gray_24dp.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_done_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_favorite_border_gray_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_favorite_border_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_favorite_gray_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_file_download_gray_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_filter_list.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_gif_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_redo_gray_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_save_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_send_blue_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_send_gray_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_send_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_share_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_sort_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_visibility_gray_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_blue_corners_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/send_comment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_border.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_download_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_gray_line_b.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_gray_line_r.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_toast.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_type_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/spot.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_avatar.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_detai_bigpic.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 16 | 17 | 20 | 21 | 29 | 30 | 36 | 37 | 38 | 39 | 40 | 48 | 49 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 17 | 18 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_richeditor.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 20 | 21 | 22 | 23 | 28 | 29 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_sheet.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_sign_dribbble.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 13 | 20 | 21 | 25 | 26 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 23 | 24 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/app_bar_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 22 | 23 | 24 | 25 | 26 | 27 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_toast.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 19 | 20 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 20 | 21 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_shots.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 14 | 15 | 19 | 20 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_home_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_rich_option.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_error_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 |