├── diycode-app ├── .gitignore ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── gcssloop │ │ │ │ └── diycode │ │ │ │ ├── hackpatch │ │ │ │ └── README.md │ │ │ │ ├── test │ │ │ │ ├── Footer.java │ │ │ │ ├── Header.java │ │ │ │ ├── Content.java │ │ │ │ ├── HeaderProvider.java │ │ │ │ └── ContentProvider.java │ │ │ │ ├── fragment │ │ │ │ └── bean │ │ │ │ │ ├── Footer.java │ │ │ │ │ └── SitesItem.java │ │ │ │ ├── activity │ │ │ │ └── NodeListActivity.java │ │ │ │ └── utils │ │ │ │ └── ImageUtils.java │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── ic_logo.png │ │ │ │ ├── about_sloop.png │ │ │ │ ├── bg_login_click.png │ │ │ │ ├── bg_login_nomal.png │ │ │ │ ├── ic_like_check.png │ │ │ │ ├── ic_like_default.png │ │ │ │ ├── nav_menu_about.png │ │ │ │ ├── nav_menu_post.png │ │ │ │ ├── nav_menu_collect.png │ │ │ │ ├── nav_menu_comment.png │ │ │ │ ├── nav_menu_setting.png │ │ │ │ ├── ic_collection_check.png │ │ │ │ ├── ic_collection_default.png │ │ │ │ ├── horizontal_line.xml │ │ │ │ ├── side_nav_bar.xml │ │ │ │ ├── topic_node_name_bg.xml │ │ │ │ ├── topic_reply_bg.xml │ │ │ │ ├── topic_reply_btn_click.xml │ │ │ │ ├── topic_reply_btn_normal.xml │ │ │ │ ├── topic_reply_btn_bg.xml │ │ │ │ ├── bg_longin_btn.xml │ │ │ │ └── ic_menu_search.xml │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── share.png │ │ │ │ ├── ic_launcher.png │ │ │ │ └── notification.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── fab_up.png │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── splash.png │ │ │ │ ├── ic_share_black_24dp.png │ │ │ │ └── ic_arrow_back_black_24dp.png │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-ldpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_arrow_back.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── logo_actionbar.png │ │ │ ├── values-v21 │ │ │ │ ├── ids.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_share_black_24dp.png │ │ │ │ └── ic_arrow_back_black_24dp.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_share_black_24dp.png │ │ │ │ └── ic_arrow_back_black_24dp.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_share_black_24dp.png │ │ │ │ └── ic_arrow_back_black_24dp.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── ic_share_black_24dp.png │ │ │ │ └── ic_arrow_back_black_24dp.png │ │ │ ├── menu │ │ │ │ ├── activity_web.xml │ │ │ │ ├── topic_content.xml │ │ │ │ └── main.xml │ │ │ ├── values │ │ │ │ ├── drawables.xml │ │ │ │ ├── attrs_CircleImageView.xml │ │ │ │ ├── dnimes-topic.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── colors.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── layout │ │ │ │ ├── item_image.xml │ │ │ │ ├── activity_node_list.xml │ │ │ │ ├── item_footer.xml │ │ │ │ ├── item_test.xml │ │ │ │ ├── content_main.xml │ │ │ │ ├── activity_fragment.xml │ │ │ │ └── item_sites.xml │ │ │ └── drawable-v21 │ │ │ │ └── ic_menu_share.xml │ │ └── assets │ │ │ └── html │ │ │ ├── js │ │ │ └── preview.js │ │ │ └── preview.html │ └── test │ │ └── java │ │ └── com │ │ └── gcssloop │ │ └── diycode │ │ └── ExampleUnitTest.java └── proguard-rules.pro ├── diycode-sdk ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── drawable-hdpi │ │ │ └── leak_canary_icon.png │ │ ├── drawable-ldpi │ │ │ └── leak_canary_icon.png │ │ ├── drawable-mdpi │ │ │ └── leak_canary_icon.png │ │ ├── drawable-xhdpi │ │ │ └── leak_canary_icon.png │ │ ├── drawable-xxhdpi │ │ │ └── leak_canary_icon.png │ │ ├── drawable-xxxhdpi │ │ │ └── leak_canary_icon.png │ │ └── values │ │ │ └── strings.xml │ │ ├── java │ │ └── com │ │ │ └── gcssloop │ │ │ └── diycode_sdk │ │ │ ├── api │ │ │ ├── README.md │ │ │ ├── sites │ │ │ │ ├── api │ │ │ │ │ ├── SitesAPI.java │ │ │ │ │ └── SitesService.java │ │ │ │ └── event │ │ │ │ │ └── GetSitesEvent.java │ │ │ ├── base │ │ │ │ └── bean │ │ │ │ │ ├── Error.java │ │ │ │ │ ├── State.java │ │ │ │ │ ├── Node.java │ │ │ │ │ └── Abilities.java │ │ │ ├── notifications │ │ │ │ ├── bean │ │ │ │ │ └── Count.java │ │ │ │ └── event │ │ │ │ │ ├── DeleteNotificationEvent.java │ │ │ │ │ ├── DeleteAllNotificationEvent.java │ │ │ │ │ └── MarkNotificationAsReadEvent.java │ │ │ ├── photo │ │ │ │ ├── bean │ │ │ │ │ └── Photo.java │ │ │ │ ├── api │ │ │ │ │ ├── PhotoService.java │ │ │ │ │ └── PhotoAPI.java │ │ │ │ └── event │ │ │ │ │ └── UploadPhotoEvent.java │ │ │ ├── test │ │ │ │ ├── api │ │ │ │ │ ├── TestService.java │ │ │ │ │ └── TestAPI.java │ │ │ │ └── Event │ │ │ │ │ └── HelloEvent.java │ │ │ ├── user │ │ │ │ └── event │ │ │ │ │ ├── GetMeEvent.java │ │ │ │ │ ├── GetUserEvent.java │ │ │ │ │ ├── GetUserReplyTopicListEvent.java │ │ │ │ │ ├── GetUserCreateTopicListEvent.java │ │ │ │ │ ├── GetUserCollectionTopicListEvent.java │ │ │ │ │ ├── BlockUserEvent.java │ │ │ │ │ ├── FollowUserEvent.java │ │ │ │ │ ├── UnBlockUserEvent.java │ │ │ │ │ ├── UnFollowUserEvent.java │ │ │ │ │ ├── GetUsersListEvent.java │ │ │ │ │ └── GetUserBlockedListEvent.java │ │ │ ├── login │ │ │ │ └── event │ │ │ │ │ ├── DeleteDevicesEvent.java │ │ │ │ │ ├── UpdateDevicesEvent.java │ │ │ │ │ ├── LogoutEvent.java │ │ │ │ │ ├── RefreshTokenEvent.java │ │ │ │ │ └── LoginEvent.java │ │ │ ├── likes │ │ │ │ ├── api │ │ │ │ │ └── LikesAPI.java │ │ │ │ └── event │ │ │ │ │ ├── LikeEvent.java │ │ │ │ │ └── UnLikeEvent.java │ │ │ ├── news │ │ │ │ └── event │ │ │ │ │ ├── CreateNewsEvent.java │ │ │ │ │ ├── DeleteNewsReplyEvent.java │ │ │ │ │ ├── GetNewsReplyEvent.java │ │ │ │ │ ├── GetNewsListEvent.java │ │ │ │ │ ├── UpdateNewsReplyEvent.java │ │ │ │ │ ├── CreateNewsReplyEvent.java │ │ │ │ │ └── GetNewsNodesListEvent.java │ │ │ ├── topic │ │ │ │ └── event │ │ │ │ │ ├── BanTopicEvent.java │ │ │ │ │ ├── WatchTopicEvent.java │ │ │ │ │ ├── DeleteTopicEvent.java │ │ │ │ │ ├── UnWatchTopicEvent.java │ │ │ │ │ ├── CollectionTopicEvent.java │ │ │ │ │ ├── DeleteTopicReplyEvent.java │ │ │ │ │ ├── UnCollectionTopicEvent.java │ │ │ │ │ ├── GetTopicEvent.java │ │ │ │ │ ├── GetTopicReplyEvent.java │ │ │ │ │ ├── CreateTopicEvent.java │ │ │ │ │ ├── UpdateTopicEvent.java │ │ │ │ │ ├── GetTopicsListEvent.java │ │ │ │ │ ├── CreateTopicReplyEvent.java │ │ │ │ │ └── UpdateTopicReplyEvent.java │ │ │ └── project │ │ │ │ └── event │ │ │ │ └── DeleteProjectReplyEvent.java │ │ │ └── utils │ │ │ ├── Constant.java │ │ │ ├── UUIDGenerator.java │ │ │ └── CacheUtil.java │ │ └── AndroidManifest.xml └── proguard-rules.pro ├── expectanim ├── .gitignore ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── github │ └── florent37 │ └── expectanim │ ├── listener │ ├── AnimationEndListener.java │ └── AnimationStartListener.java │ └── core │ ├── alpha │ ├── AlphaAnimExpectation.java │ └── AlphaAnimExpectationValue.java │ ├── custom │ └── CustomAnimExpectation.java │ ├── anim3d │ └── CameraDistanceExpectation.java │ ├── rotation │ ├── RotationExpectation.java │ └── RotationExpectationOriginal.java │ ├── AnimExpectation.java │ ├── position │ ├── PositionAnimExpectationTopOfParent.java │ ├── PositionAnimExpectationLeftOfParent.java │ ├── PositionAnimExpectationOriginal.java │ ├── PositionAnimExpectationAlignTop.java │ ├── PositionAnimExpectationBelowOf.java │ ├── PositionAnimExpectationRightOf.java │ ├── PositionAnimExpectationAlignLeft.java │ ├── PositionAnimExpectationLeftOf.java │ ├── PositionAnimExpectationAboveOf.java │ ├── PositionAnimExpectationAlignRight.java │ └── PositionAnimExpectationAlignBottom.java │ └── scale │ ├── ScaleAnimExpectationOriginalScale.java │ ├── ScaleAnimExpectationSameScaleAs.java │ └── ScaleAnimExpectationViewDependant.java ├── recyclerview ├── .gitignore ├── README.md ├── proguard-rules.pro └── src │ └── main │ ├── res │ └── values │ │ └── strings.xml │ ├── AndroidManifest.xml │ └── java │ └── com │ └── gcssloop │ └── recyclerview │ └── adapter │ └── multitype │ └── TypePool.java ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── blog └── README.md ├── .gitignore ├── settings.gradle ├── gradle.properties └── task-list.md /diycode-app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /diycode-sdk/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /expectanim/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /recyclerview/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /diycode-app/src/main/java/com/gcssloop/diycode/hackpatch/README.md: -------------------------------------------------------------------------------- 1 | # 补丁 2 | 3 | 修复 InputMethodManager 引起的内存泄漏 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/ic_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable/ic_logo.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/mipmap-xhdpi/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/mipmap-xhdpi/share.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/about_sloop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable/about_sloop.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/mipmap-xxhdpi/fab_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/mipmap-xxhdpi/fab_up.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable-xxhdpi/splash.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/bg_login_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable/bg_login_click.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/bg_login_nomal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable/bg_login_nomal.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/ic_like_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable/ic_like_check.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/ic_like_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable/ic_like_default.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/nav_menu_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable/nav_menu_about.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/nav_menu_post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable/nav_menu_post.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/mipmap-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/mipmap-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/nav_menu_collect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable/nav_menu_collect.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/nav_menu_comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable/nav_menu_comment.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/nav_menu_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable/nav_menu_setting.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/mipmap-mdpi/ic_arrow_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/mipmap-mdpi/ic_arrow_back.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/mipmap-xhdpi/notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/mipmap-xhdpi/notification.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/ic_collection_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable/ic_collection_check.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/mipmap-xxxhdpi/logo_actionbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/mipmap-xxxhdpi/logo_actionbar.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/values-v21/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/ic_collection_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable/ic_collection_default.png -------------------------------------------------------------------------------- /diycode-sdk/src/main/res/drawable-hdpi/leak_canary_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-sdk/src/main/res/drawable-hdpi/leak_canary_icon.png -------------------------------------------------------------------------------- /diycode-sdk/src/main/res/drawable-ldpi/leak_canary_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-sdk/src/main/res/drawable-ldpi/leak_canary_icon.png -------------------------------------------------------------------------------- /diycode-sdk/src/main/res/drawable-mdpi/leak_canary_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-sdk/src/main/res/drawable-mdpi/leak_canary_icon.png -------------------------------------------------------------------------------- /diycode-sdk/src/main/res/drawable-xhdpi/leak_canary_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-sdk/src/main/res/drawable-xhdpi/leak_canary_icon.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable-hdpi/ic_share_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable-hdpi/ic_share_black_24dp.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable-mdpi/ic_share_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable-mdpi/ic_share_black_24dp.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable-xhdpi/ic_share_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable-xhdpi/ic_share_black_24dp.png -------------------------------------------------------------------------------- /diycode-sdk/src/main/res/drawable-xxhdpi/leak_canary_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-sdk/src/main/res/drawable-xxhdpi/leak_canary_icon.png -------------------------------------------------------------------------------- /diycode-sdk/src/main/res/drawable-xxxhdpi/leak_canary_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-sdk/src/main/res/drawable-xxxhdpi/leak_canary_icon.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable-xxhdpi/ic_share_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable-xxhdpi/ic_share_black_24dp.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable-xxxhdpi/ic_share_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable-xxxhdpi/ic_share_black_24dp.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable-hdpi/ic_arrow_back_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable-hdpi/ic_arrow_back_black_24dp.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable-mdpi/ic_arrow_back_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable-mdpi/ic_arrow_back_black_24dp.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable-xhdpi/ic_arrow_back_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable-xhdpi/ic_arrow_back_black_24dp.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable-xxhdpi/ic_arrow_back_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable-xxhdpi/ic_arrow_back_black_24dp.png -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable-xxxhdpi/ic_arrow_back_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GcsSloop/diycode/HEAD/diycode-app/src/main/res/drawable-xxxhdpi/ic_arrow_back_black_24dp.png -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/README.md: -------------------------------------------------------------------------------- 1 | # 对外接口 2 | 3 | - [x] base 4 | - [x] login 5 | - [x] test 6 | - [x] user 7 | - [x] topic 8 | - [x] news 9 | - [x] sites 10 | - [x] project 11 | - [x] photo 12 | - [x] notification -------------------------------------------------------------------------------- /blog/README.md: -------------------------------------------------------------------------------- 1 | # Diycode 开发过程中的一些记录 2 | 3 | * [01 - 整体架构](journal-01.md) 4 | * [02 - 缓存 WebView 中的图片](journal-02.md) 5 | * [03 - 点击网页图片查看大图](journal-03.md) 6 | * [04 - API 的封装哲学](journal-04.md) 7 | * [05 - 使用抽象类节省 1000 行代码](journal-05.md) 8 | 9 | 10 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat May 06 00:31:18 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /recyclerview/README.md: -------------------------------------------------------------------------------- 1 | # RecyclerView 工具包 2 | 3 | 1. SingleTypeAdapter (单数据类型适配器) 4 | 2. MultiTypeAdapter (多数据类型适配器) 5 | 3. HeaderFooterAdapter (可以包含头部和尾部的适配器) 6 | 7 | 其中 MultiTypeAdapter 实现参考了 drakeet 的 [MultiType](https://github.com/drakeet/MultiType) ,其中性能上可能要稍差一点,但使用起来更加方便。 8 | 9 | HeaderFooterAdapter 可以随时添加/删除头部和尾部,不影响其中数据。 10 | 11 | 如果需要处理的单个条目内容复杂繁多时,不推荐使用。 -------------------------------------------------------------------------------- /diycode-app/src/main/assets/html/js/preview.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | marked.setOptions({ 3 | langPrefix: '' 4 | }); 5 | preview = function setMarkdown(md_text){ 6 | if(md_text == "") return false; 7 | md_text = md_text.replace(/\\n/g, "\n"); 8 | var md_html = marked(md_text); 9 | $('#preview').html(md_html); 10 | $('pre code').each(function(i, block) { 11 | hljs.highlightBlock(block); 12 | }); 13 | }; 14 | }); -------------------------------------------------------------------------------- /diycode-app/src/main/res/menu/activity_web.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /diycode-app/src/main/assets/html/preview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # Intellij 36 | *.iml 37 | .idea/workspace.xml 38 | 39 | # Keystore files 40 | *.jks 41 | 42 | # idea 43 | .idea/ 44 | -------------------------------------------------------------------------------- /diycode-app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/GcsSloop/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /diycode-sdk/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/GcsSloop/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /recyclerview/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/GcsSloop/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /expectanim/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/florentchampigny/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | include ':diycode-app', ':diycode-sdk', ':expectanim', ':recyclerview' 24 | -------------------------------------------------------------------------------- /diycode-app/src/main/java/com/gcssloop/diycode/test/Footer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-04-08 15:03:56 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode.test; 24 | 25 | public class Footer { 26 | } 27 | -------------------------------------------------------------------------------- /diycode-app/src/main/java/com/gcssloop/diycode/test/Header.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-04-08 15:03:48 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode.test; 24 | 25 | public class Header { 26 | } 27 | -------------------------------------------------------------------------------- /recyclerview/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | RecyclerView 25 | 26 | -------------------------------------------------------------------------------- /diycode-app/src/main/java/com/gcssloop/diycode/fragment/bean/Footer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-04-09 21:22:33 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode.fragment.bean; 24 | 25 | public class Footer { 26 | } 27 | -------------------------------------------------------------------------------- /diycode-app/src/main/java/com/gcssloop/diycode/test/Content.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-04-08 15:13:43 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode.test; 24 | 25 | public class Content { 26 | public String text; 27 | } 28 | -------------------------------------------------------------------------------- /expectanim/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | diycode-sdk 25 | DiycodeLeaks 26 | 27 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/values/drawables.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | @android:drawable/ic_menu_share 25 | 26 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/horizontal_line.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/utils/Constant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.utils; 24 | 25 | public class Constant { 26 | // 网络相关 27 | public static final String BASE_URL = "https://diycode.cc/api/v3/"; 28 | public static final String OAUTH_URL = "https://www.diycode.cc/oauth/token"; 29 | } 30 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/values/attrs_CircleImageView.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/sites/api/SitesAPI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.sites.api; 24 | 25 | import com.gcssloop.diycode_sdk.api.sites.event.GetSitesEvent; 26 | 27 | public interface SitesAPI { 28 | 29 | /** 30 | * 获取 酷站 列表 31 | * @see GetSitesEvent 32 | */ 33 | String getSites(); 34 | } 35 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/listener/AnimationEndListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.listener; 24 | 25 | import com.github.florent37.expectanim.ExpectAnim; 26 | 27 | /** 28 | * Created by florentchampigny on 21/02/2017. 29 | */ 30 | 31 | public interface AnimationEndListener { 32 | void onAnimationEnd(ExpectAnim expectAnim); 33 | } 34 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/listener/AnimationStartListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.listener; 24 | 25 | import com.github.florent37.expectanim.ExpectAnim; 26 | 27 | /** 28 | * Created by florentchampigny on 21/02/2017. 29 | */ 30 | 31 | public interface AnimationStartListener { 32 | void onAnimationStart(ExpectAnim expectAnim); 33 | } 34 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 25 | 31 | -------------------------------------------------------------------------------- /recyclerview/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 25 | 26 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 30 | 31 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/menu/topic_content.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 26 | 31 | 32 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/base/bean/Error.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 17:10:23 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.base.bean; 24 | 25 | public class Error { 26 | /** 27 | * error : Access Token 无效 28 | */ 29 | 30 | private String error; 31 | 32 | public String getError() { 33 | return error; 34 | } 35 | 36 | public void setError(String error) { 37 | this.error = error; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 27 | 64dp 28 | 29 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/notifications/bean/Count.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.notifications.bean; 24 | 25 | import java.io.Serializable; 26 | 27 | public class Count implements Serializable { 28 | 29 | private int count; // 数值 30 | 31 | public int getCount() { 32 | return count; 33 | } 34 | 35 | public void setCount(int count) { 36 | this.count = count; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/layout/item_image.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 31 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/values/dnimes-topic.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 16dp 26 | 20dp 27 | 28 | 24dp 29 | 12sp 30 | 36dp 31 | 16dp 32 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/sites/api/SitesService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.sites.api; 24 | 25 | import com.gcssloop.diycode_sdk.api.sites.bean.Sites; 26 | 27 | import java.util.List; 28 | 29 | import retrofit2.Call; 30 | import retrofit2.http.GET; 31 | 32 | interface SitesService { 33 | 34 | /** 35 | * 获取 酷站 列表 36 | * @return 列表 37 | */ 38 | @GET("sites.json") 39 | Call> getSites(); 40 | } 41 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/alpha/AlphaAnimExpectation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.alpha; 24 | 25 | import android.view.View; 26 | 27 | import com.github.florent37.expectanim.core.AnimExpectation; 28 | 29 | /** 30 | * Created by florentchampigny on 17/02/2017. 31 | */ 32 | 33 | public abstract class AlphaAnimExpectation extends AnimExpectation{ 34 | public abstract Float getCalculatedAlpha(View viewToMove); 35 | } 36 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/base/bean/State.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.base.bean; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * 判断操作状态是否成功 29 | */ 30 | public class State implements Serializable { 31 | /** 32 | * ok : 1 33 | */ 34 | 35 | private int ok; 36 | 37 | public int getOk() { 38 | return ok; 39 | } 40 | 41 | public void setOk(int ok) { 42 | this.ok = ok; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/topic_node_name_bg.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 25 | 26 | 29 | 34 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/topic_reply_bg.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 25 | 26 | 29 | 34 | -------------------------------------------------------------------------------- /diycode-app/src/main/java/com/gcssloop/diycode/fragment/bean/SitesItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-04-09 21:22:43 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode.fragment.bean; 24 | 25 | import java.io.Serializable; 26 | 27 | public class SitesItem implements Serializable { 28 | private String name; 29 | 30 | public SitesItem(String name) { 31 | this.name = name; 32 | } 33 | 34 | public String getName() { 35 | return name; 36 | } 37 | 38 | public void setName(String name) { 39 | this.name = name; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/topic_reply_btn_click.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 25 | 26 | 29 | 34 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/topic_reply_btn_normal.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 25 | 26 | 29 | 34 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/custom/CustomAnimExpectation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.custom; 24 | 25 | import android.animation.Animator; 26 | import android.view.View; 27 | 28 | import com.github.florent37.expectanim.core.AnimExpectation; 29 | 30 | /** 31 | * Created by florentchampigny on 21/02/2017. 32 | */ 33 | 34 | public abstract class CustomAnimExpectation extends AnimExpectation { 35 | public abstract Animator getAnimator(View viewToMove); 36 | } 37 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/photo/bean/Photo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 02:18:04 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.photo.bean; 24 | 25 | public class Photo { 26 | /** 27 | * image_url : https://diycode.b0.upaiyun.com/photo/2017/980ab912bb99173feb0966e23e88515c.jpeg 28 | */ 29 | 30 | private String image_url; 31 | 32 | public String getImage_url() { 33 | return image_url; 34 | } 35 | 36 | public void setImage_url(String image_url) { 37 | this.image_url = image_url; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /diycode-app/src/test/java/com/gcssloop/diycode/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode; 24 | 25 | import org.junit.Test; 26 | 27 | import static org.junit.Assert.*; 28 | 29 | /** 30 | * Example local unit test, which will execute on the development machine (host). 31 | * 32 | * @see Testing documentation 33 | */ 34 | public class ExampleUnitTest { 35 | @Test 36 | public void addition_isCorrect() throws Exception { 37 | assertEquals(4, 2 + 2); 38 | } 39 | } -------------------------------------------------------------------------------- /diycode-app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 16dp 26 | 160dp 27 | 28 | 16dp 29 | 16dp 30 | 16dp 31 | 32 | 33 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/anim3d/CameraDistanceExpectation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.anim3d; 24 | 25 | import android.support.annotation.Nullable; 26 | import android.view.View; 27 | 28 | import com.github.florent37.expectanim.core.AnimExpectation; 29 | 30 | /** 31 | * Created by Christian Ringshofer on 17/02/2017. 32 | */ 33 | public abstract class CameraDistanceExpectation extends AnimExpectation { 34 | 35 | @Nullable 36 | public abstract Float getCalculatedCameraDistance(View viewToMove); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/topic_reply_btn_bg.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/photo/api/PhotoService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.photo.api; 24 | 25 | import com.gcssloop.diycode_sdk.api.photo.bean.Photo; 26 | 27 | import java.io.File; 28 | 29 | import retrofit2.Call; 30 | import retrofit2.http.Field; 31 | import retrofit2.http.POST; 32 | 33 | interface PhotoService { 34 | 35 | /** 36 | * 上传图片,请使用 Multipart 的方式提交图片文件 37 | * 38 | * @param img_file 图片文件 39 | * @return 图片地址 40 | */ 41 | @POST("photos.json") 42 | Call uploadPhoto(@Field("file") File img_file); 43 | } 44 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 26 | 31 | 36 | 37 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/alpha/AlphaAnimExpectationValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.alpha; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | public class AlphaAnimExpectationValue extends AlphaAnimExpectation { 31 | 32 | private final float alpha; 33 | 34 | public AlphaAnimExpectationValue(float alpha) { 35 | this.alpha = alpha; 36 | } 37 | 38 | @Override 39 | public Float getCalculatedAlpha(View viewToMove) { 40 | return alpha; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /diycode-app/src/main/java/com/gcssloop/diycode/activity/NodeListActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-04-11 22:11:29 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode.activity; 24 | 25 | import android.view.View; 26 | 27 | import com.gcssloop.diycode.R; 28 | import com.gcssloop.diycode.base.app.BaseActivity; 29 | import com.gcssloop.diycode.base.app.ViewHolder; 30 | 31 | /** 32 | * 节点列表,用于定制首页内容 33 | */ 34 | public class NodeListActivity extends BaseActivity { 35 | 36 | @Override protected int getLayoutId() { 37 | return R.layout.activity_fragment; 38 | } 39 | 40 | @Override protected void initViews(ViewHolder holder, View root) { 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/bg_longin_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable/ic_menu_search.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 28 | 31 | 32 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/photo/api/PhotoAPI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.photo.api; 24 | 25 | import android.support.annotation.NonNull; 26 | 27 | import com.gcssloop.diycode_sdk.api.photo.event.UploadPhotoEvent; 28 | 29 | import java.io.File; 30 | 31 | public interface PhotoAPI { 32 | 33 | //--- photo ------------------------------------------------------------------------------------ 34 | 35 | /** 36 | * 上传图片,请使用 Multipart 的方式提交图片文件 37 | * 38 | * @param img_file 图片文件 39 | * @see UploadPhotoEvent 40 | */ 41 | String uploadPhoto(@NonNull File img_file); 42 | } 43 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/test/api/TestService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.test.api; 24 | 25 | import com.gcssloop.diycode_sdk.api.test.bean.Hello; 26 | 27 | import retrofit2.Call; 28 | import retrofit2.http.GET; 29 | import retrofit2.http.Query; 30 | 31 | interface TestService { 32 | 33 | //--- 测试接口 ------------------------------------------------------------------------------- 34 | 35 | /** 36 | * 测试 token 是否正常 37 | * 38 | * @param limit 极限值 39 | * @return Hello 实体类 40 | */ 41 | @GET("hello.json") 42 | Call hello(@Query("limit") Integer limit); 43 | } 44 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/test/api/TestAPI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.test.api; 24 | 25 | import android.support.annotation.Nullable; 26 | 27 | import com.gcssloop.diycode_sdk.api.test.Event.HelloEvent; 28 | 29 | public interface TestAPI { 30 | 31 | //--- 测试接口 -------------------------------------------------------------------------------- 32 | 33 | /** 34 | * 简单的 API 测试接口,需要登录验证,便于快速测试 OAuth 以及其他 API 的基本格式是否正确。 35 | * 使用 HelloEvent 接收结果。 36 | * 37 | * @param limit 数量极限,值范围[0..100] 38 | * @see HelloEvent 39 | */ 40 | String hello(@Nullable Integer limit); 41 | } 42 | -------------------------------------------------------------------------------- /diycode-app/src/main/java/com/gcssloop/diycode/utils/ImageUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-04-09 21:31:26 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode.utils; 24 | 25 | import android.content.Context; 26 | import android.widget.ImageView; 27 | 28 | import com.bumptech.glide.Glide; 29 | import com.bumptech.glide.load.engine.DiskCacheStrategy; 30 | 31 | public class ImageUtils { 32 | public static void loadImage(Context context, String url, ImageView imageView) { 33 | String url2 = url; 34 | if (url.contains("diycode")) 35 | url2 = url.replace("large_avatar", "avatar"); 36 | Glide.with(context).load(url2).diskCacheStrategy(DiskCacheStrategy.SOURCE).into(imageView); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/base/bean/Node.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.base.bean; 24 | 25 | import java.io.Serializable; 26 | 27 | public class Node implements Serializable{ 28 | 29 | /** 30 | * id : 1 31 | * name : Android 32 | */ 33 | 34 | private int id; 35 | private String name; 36 | 37 | public int getId() { 38 | return id; 39 | } 40 | 41 | public void setId(int id) { 42 | this.id = id; 43 | } 44 | 45 | public String getName() { 46 | return name; 47 | } 48 | 49 | public void setName(String name) { 50 | this.name = name; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | #FFFFFF 26 | #FFFFFF 27 | #DB3937 28 | #DB3937 29 | #cc6f6e 30 | #C8C8CE 31 | #999999 32 | #4d4d4d 33 | #000000 34 | #ffffff 35 | #F0F0F0 36 | 37 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/user/event/GetMeEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.user.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.user.bean.UserDetail; 30 | 31 | public class GetMeEvent extends BaseEvent { 32 | public GetMeEvent(@Nullable String uuid) { 33 | super(uuid); 34 | } 35 | 36 | public GetMeEvent(@Nullable String uuid, @NonNull Integer code, @Nullable UserDetail userDetail) { 37 | super(uuid, code, userDetail); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /recyclerview/src/main/java/com/gcssloop/recyclerview/adapter/multitype/TypePool.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-04-08 16:14:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * WeiBo: http://weibo.com/GcsSloop 20 | * WebSite: http://www.gcssloop.com 21 | */ 22 | 23 | package com.gcssloop.recyclerview.adapter.multitype; 24 | 25 | import android.support.annotation.NonNull; 26 | 27 | import java.util.List; 28 | 29 | /** 30 | * 类型池 31 | */ 32 | public interface TypePool { 33 | 34 | public void register(@NonNull Class clazz, @NonNull BaseViewProvider provider); 35 | 36 | public int indexOf(@NonNull final Class clazz); 37 | 38 | public List getProviders(); 39 | 40 | public BaseViewProvider getProviderByIndex(int index); 41 | 42 | public T getProviderByClass(@NonNull final Class clazz); 43 | } 44 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/login/event/DeleteDevicesEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.login.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class DeleteDevicesEvent extends BaseEvent { 32 | public DeleteDevicesEvent(@Nullable String uuid) { 33 | super(uuid); 34 | } 35 | 36 | public DeleteDevicesEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 37 | super(uuid, code, state); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/login/event/UpdateDevicesEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.login.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class UpdateDevicesEvent extends BaseEvent { 32 | public UpdateDevicesEvent(@Nullable String uuid) { 33 | super(uuid); 34 | } 35 | 36 | public UpdateDevicesEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 37 | super(uuid, code, state); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/user/event/GetUserEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.user.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.user.bean.UserDetail; 30 | 31 | public class GetUserEvent extends BaseEvent { 32 | public GetUserEvent(@Nullable String uuid) { 33 | super(uuid); 34 | } 35 | 36 | public GetUserEvent(@Nullable String uuid, @NonNull Integer code, @Nullable UserDetail userDetail) { 37 | super(uuid, code, userDetail); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/rotation/RotationExpectation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.rotation; 24 | 25 | import android.view.View; 26 | 27 | import com.github.florent37.expectanim.core.AnimExpectation; 28 | import com.github.florent37.expectanim.core.alpha.AlphaAnimExpectation; 29 | 30 | /** 31 | * Created by florentchampigny on 18/02/2017. 32 | */ 33 | public abstract class RotationExpectation extends AnimExpectation { 34 | 35 | public abstract Float getCalculatedRotation(View viewToMove); 36 | public abstract Float getCalculatedRotationX(View viewToMove); 37 | public abstract Float getCalculatedRotationY(View viewToMove); 38 | } 39 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/base/bean/Abilities.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.base.bean; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * 权限控制 29 | */ 30 | public class Abilities implements Serializable { 31 | private boolean update; 32 | 33 | private boolean destroy; 34 | 35 | public void setUpdate(boolean update) { 36 | this.update = update; 37 | } 38 | 39 | public boolean getUpdate() { 40 | return this.update; 41 | } 42 | 43 | public void setDestroy(boolean destroy) { 44 | this.destroy = destroy; 45 | } 46 | 47 | public boolean getDestroy() { 48 | return this.destroy; 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/rotation/RotationExpectationOriginal.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.rotation; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | public class RotationExpectationOriginal extends RotationExpectation { 31 | 32 | @Override 33 | public Float getCalculatedRotation(View viewToMove) { 34 | return 0f; 35 | } 36 | 37 | @Override 38 | public Float getCalculatedRotationX(View viewToMove) { 39 | return 0f; 40 | } 41 | 42 | @Override 43 | public Float getCalculatedRotationY(View viewToMove) { 44 | return 0f; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/utils/UUIDGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.utils; 24 | 25 | import java.util.UUID; 26 | 27 | /** 28 | * UUID 生成器 29 | */ 30 | public class UUIDGenerator { 31 | private UUIDGenerator() { 32 | } 33 | 34 | public static String getUUID() { 35 | return UUID.randomUUID().toString(); 36 | } 37 | 38 | //获得指定数量的UUID 39 | public static String[] getUUID(int number) { 40 | if (number < 1) { 41 | return null; 42 | } 43 | String[] ss = new String[number]; 44 | for (int i = 0; i < number; i++) { 45 | ss[i] = getUUID(); 46 | } 47 | return ss; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/AnimExpectation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core; 24 | 25 | import android.view.View; 26 | 27 | import com.github.florent37.expectanim.ViewCalculator; 28 | 29 | import java.util.ArrayList; 30 | import java.util.List; 31 | 32 | /** 33 | * Created by florentchampigny on 17/02/2017. 34 | */ 35 | 36 | public abstract class AnimExpectation { 37 | 38 | protected ViewCalculator viewCalculator; 39 | 40 | public void setViewCalculator(ViewCalculator viewCalculator) { 41 | this.viewCalculator = viewCalculator; 42 | } 43 | 44 | public List getViewsDependencies(){ 45 | return new ArrayList<>(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/position/PositionAnimExpectationTopOfParent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.position; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | 31 | public class PositionAnimExpectationTopOfParent extends PositionAnimExpectation { 32 | 33 | public PositionAnimExpectationTopOfParent() { 34 | setForPositionY(true); 35 | } 36 | 37 | @Override 38 | public Float getCalculatedValueX(View viewToMove) { 39 | return null; 40 | } 41 | 42 | @Override 43 | public Float getCalculatedValueY(View viewToMove) { 44 | return getMargin(viewToMove); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/position/PositionAnimExpectationLeftOfParent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.position; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | 31 | public class PositionAnimExpectationLeftOfParent extends PositionAnimExpectation { 32 | 33 | public PositionAnimExpectationLeftOfParent() { 34 | setForPositionX(true); 35 | } 36 | 37 | @Override 38 | public Float getCalculatedValueX(View viewToMove) { 39 | return getMargin(viewToMove); 40 | } 41 | 42 | @Override 43 | public Float getCalculatedValueY(View viewToMove) { 44 | return null; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/layout/activity_node_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/layout/item_footer.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 31 | 32 | 39 | 40 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/layout/item_test.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 31 | 32 | 39 | 40 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/position/PositionAnimExpectationOriginal.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.position; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | 31 | public class PositionAnimExpectationOriginal extends PositionAnimExpectation { 32 | 33 | public PositionAnimExpectationOriginal() { 34 | setForTranslationX(true); 35 | setForTranslationY(true); 36 | } 37 | 38 | @Override 39 | public Float getCalculatedValueX(View viewToMove) { 40 | return 0f; 41 | } 42 | 43 | @Override 44 | public Float getCalculatedValueY(View viewToMove) { 45 | return 0f; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/scale/ScaleAnimExpectationOriginalScale.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.scale; 24 | 25 | import android.support.annotation.Nullable; 26 | import android.view.View; 27 | 28 | /** 29 | * Created by florentchampigny on 17/02/2017. 30 | */ 31 | public class ScaleAnimExpectationOriginalScale extends ScaleAnimExpectation { 32 | 33 | public ScaleAnimExpectationOriginalScale() { 34 | super(null, null); 35 | } 36 | 37 | @Override 38 | public Float getCalculatedValueScaleX(View viewToMove) { 39 | return 1f; 40 | } 41 | 42 | @Override 43 | public Float getCalculatedValueScaleY(View viewToMove) { 44 | return 1f; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/drawable-v21/ic_menu_share.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 25 | 27 | 28 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/login/event/LogoutEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-22 14:26:22 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.login.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | 30 | public class LogoutEvent extends BaseEvent { 31 | /** 32 | * @param uuid 唯一识别码 33 | */ 34 | public LogoutEvent(@Nullable String uuid) { 35 | super(uuid); 36 | } 37 | 38 | /** 39 | * @param uuid 唯一识别码 40 | * @param code 网络返回码 41 | * @param s 实体数据 42 | */ 43 | public LogoutEvent(@Nullable String uuid, @NonNull Integer code, @Nullable String s) { 44 | super(uuid, code, s); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/user/event/GetUserReplyTopicListEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:52:35 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.user.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.topic.bean.Topic; 30 | 31 | import java.util.List; 32 | 33 | public class GetUserReplyTopicListEvent extends BaseEvent> { 34 | public GetUserReplyTopicListEvent(@Nullable String uuid) { 35 | super(uuid); 36 | } 37 | 38 | public GetUserReplyTopicListEvent(@Nullable String uuid, @NonNull Integer code, @Nullable List topics) { 39 | super(uuid, code, topics); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/scale/ScaleAnimExpectationSameScaleAs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.scale; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | public class ScaleAnimExpectationSameScaleAs extends ScaleAnimExpectationViewDependant { 31 | 32 | public ScaleAnimExpectationSameScaleAs(View otherView) { 33 | super(otherView, null, null); 34 | } 35 | 36 | @Override 37 | public Float getCalculatedValueScaleX(View viewToMove) { 38 | return otherView.getScaleX(); 39 | } 40 | 41 | @Override 42 | public Float getCalculatedValueScaleY(View viewToMove) { 43 | return otherView.getScaleY(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/user/event/GetUserCreateTopicListEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.user.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.topic.bean.Topic; 30 | 31 | import java.util.List; 32 | 33 | public class GetUserCreateTopicListEvent extends BaseEvent> { 34 | public GetUserCreateTopicListEvent(@Nullable String uuid) { 35 | super(uuid); 36 | } 37 | 38 | public GetUserCreateTopicListEvent(@Nullable String uuid, @NonNull Integer code, @Nullable List topics) { 39 | super(uuid, code, topics); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/likes/api/LikesAPI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.likes.api; 24 | 25 | import android.support.annotation.NonNull; 26 | 27 | import com.gcssloop.diycode_sdk.api.likes.event.*; 28 | 29 | public interface LikesAPI { 30 | 31 | /** 32 | * 赞 33 | * 34 | * @param obj_type 值范围["topic", "reply", "news"] 35 | * @param obj_id 唯一id 36 | * @see LikeEvent 37 | */ 38 | String like(@NonNull String obj_type, @NonNull Integer obj_id); 39 | 40 | 41 | /** 42 | * 取消之前的赞 43 | * 44 | * @param obj_type 值范围["topic", "reply", "news"] 45 | * @param obj_id 唯一id 46 | * @see UnLikeEvent 47 | */ 48 | String unLike(@NonNull String obj_type, @NonNull Integer obj_id); 49 | } 50 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/user/event/GetUserCollectionTopicListEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:52:08 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.user.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.topic.bean.Topic; 30 | 31 | import java.util.List; 32 | 33 | public class GetUserCollectionTopicListEvent extends BaseEvent> { 34 | public GetUserCollectionTopicListEvent(@Nullable String uuid) { 35 | super(uuid); 36 | } 37 | 38 | public GetUserCollectionTopicListEvent(@Nullable String uuid, @NonNull Integer code, @Nullable List topics) { 39 | super(uuid, code, topics); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017 GcsSloop 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 | # Last modified 2017-03-08 01:01:18 17 | # 18 | # GitHub: https://github.com/GcsSloop 19 | # Website: http://www.gcssloop.com 20 | # Weibo: http://weibo.com/GcsSloop 21 | # 22 | 23 | # Project-wide Gradle settings. 24 | 25 | # IDE (e.g. Android Studio) users: 26 | # Gradle settings configured through the IDE *will override* 27 | # any settings specified in this file. 28 | 29 | # For more details on how to configure your build environment visit 30 | # http://www.gradle.org/docs/current/userguide/build_environment.html 31 | 32 | # Specifies the JVM arguments used for the daemon process. 33 | # The setting is particularly useful for tweaking memory settings. 34 | org.gradle.jvmargs=-Xmx1536m 35 | 36 | # When configured, Gradle will run in incubating parallel mode. 37 | # This option should only be used with decoupled projects. More details, visit 38 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 39 | # org.gradle.parallel=true 40 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/likes/event/LikeEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.likes.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class LikeEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public LikeEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public LikeEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/position/PositionAnimExpectationAlignTop.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.position; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | 31 | public class PositionAnimExpectationAlignTop extends PositionAnimationViewDependant { 32 | 33 | public PositionAnimExpectationAlignTop(View otherView) { 34 | super(otherView); 35 | 36 | setForPositionY(true); 37 | } 38 | 39 | @Override 40 | public Float getCalculatedValueX(View viewToMove) { 41 | return null; 42 | } 43 | 44 | @Override 45 | public Float getCalculatedValueY(View viewToMove) { 46 | return viewCalculator.finalPositionTopOfView(otherView) + getMargin(viewToMove); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/position/PositionAnimExpectationBelowOf.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.position; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | 31 | public class PositionAnimExpectationBelowOf extends PositionAnimationViewDependant { 32 | 33 | public PositionAnimExpectationBelowOf(View otherView) { 34 | super(otherView); 35 | 36 | setForPositionY(true); 37 | } 38 | 39 | @Override 40 | public Float getCalculatedValueX(View viewToMove) { 41 | return null; 42 | } 43 | 44 | @Override 45 | public Float getCalculatedValueY(View viewToMove) { 46 | return viewCalculator.finalPositionBottomOfView(otherView) + getMargin(viewToMove); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/position/PositionAnimExpectationRightOf.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.position; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | 31 | public class PositionAnimExpectationRightOf extends PositionAnimationViewDependant { 32 | 33 | public PositionAnimExpectationRightOf(View otherView) { 34 | super(otherView); 35 | 36 | setForPositionX(true); 37 | } 38 | 39 | @Override 40 | public Float getCalculatedValueX(View viewToMove) { 41 | return viewCalculator.finalPositionRightOfView(otherView) + getMargin(viewToMove); 42 | } 43 | 44 | @Override 45 | public Float getCalculatedValueY(View viewToMove) { 46 | return null; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 34 | 35 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/likes/event/UnLikeEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.likes.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class UnLikeEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public UnLikeEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public UnLikeEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/test/Event/HelloEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.test.Event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.test.bean.Hello; 30 | 31 | public class HelloEvent extends BaseEvent { 32 | 33 | /** 34 | * @param uuid 唯一识别码 35 | */ 36 | public HelloEvent(@Nullable String uuid) { 37 | super(uuid); 38 | } 39 | 40 | /** 41 | * @param uuid 唯一识别码 42 | * @param code 网络返回码 43 | * @param hello 实体数据 44 | */ 45 | public HelloEvent(@Nullable String uuid, @NonNull Integer code, @Nullable Hello hello) { 46 | super(uuid, code, hello); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/position/PositionAnimExpectationAlignLeft.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.position; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | 31 | public class PositionAnimExpectationAlignLeft extends PositionAnimationViewDependant { 32 | 33 | public PositionAnimExpectationAlignLeft(View otherView) { 34 | super(otherView); 35 | 36 | setForPositionX(true); 37 | } 38 | 39 | @Override 40 | public Float getCalculatedValueX(View viewToMove) { 41 | return viewCalculator.finalPositionLeftOfView(otherView) + getMargin(viewToMove) ; 42 | } 43 | 44 | @Override 45 | public Float getCalculatedValueY(View viewToMove) { 46 | return null; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/news/event/CreateNewsEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 23:56:43 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.news.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.news.bean.New; 30 | 31 | public class CreateNewsEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public CreateNewsEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param aNew 实体数据 43 | */ 44 | public CreateNewsEvent(@Nullable String uuid, @NonNull Integer code, @Nullable New aNew) { 45 | super(uuid, code, aNew); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/BanTopicEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class BanTopicEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public BanTopicEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public BanTopicEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/user/event/BlockUserEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:47:02 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.user.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class BlockUserEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public BlockUserEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public BlockUserEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /task-list.md: -------------------------------------------------------------------------------- 1 | # 任务列表 2 | 3 | ## 已知 bug 4 | 5 | - [x] 加载数据时 UI 卡顿 6 | - [ ] ​ 7 | 8 | ## 待完成任务 9 | 10 | - [ ] 优化启动速度 11 | - [ ] 评论区链接 12 | - [ ] 代码结构调整,减少UI线程任务数量 13 | - [ ] 创建 topic 14 | - [ ] 删除自己的 topic 15 | - [ ] 删除自己的评论 16 | - [ ] 评论区回复 17 | - [ ] 分享 news 18 | - [ ] 上传图片 19 | - [ ] 首页可定制信息流 20 | - [ ] 可设置默认缓存时间 21 | - [ ] 沉浸式状态栏兼容 22 | - [ ] 修复部分机型的 OOM 异常 23 | - [ ] 调整数据加载位置,降低 IO 耗时 24 | - [ ] 添加状态显示,出错后可以重新加载 25 | - [ ] 保存大图和在浏览器查看图片 26 | 27 | ## SDK 开发 28 | 29 | ### API 相关 30 | 31 | - [x] 结构确定 32 | - [x] 创建实体类 33 | - [x] 定义 API 34 | - [x] 定义面向上层应用接口 35 | - [x] 创建实现类 36 | - [x] 抽取集类 37 | - [x] 创建聚合类 38 | - [x] 结构优化调整 39 | 40 | 41 | ### 用户认证(token) 42 | 43 | - [x] 登录获取 token 44 | - [x] token 存取与删除 45 | - [x] 为请求自动附加 token 信息 46 | - [x] 过期自动刷新 token 47 | 48 | ### 相关工具类 49 | 50 | - [x] log 工具 51 | - [x] 缓存工具 52 | - [x] UUID生成工具 53 | 54 | 55 | 56 | 57 | ## APP 开发 58 | 59 | ### Topic 相关 60 | 61 | - [x] 查看列表 62 | - [x] 查看详情 63 | - [x] 查看回复 64 | - [x] 创建回复 65 | 66 | ### News 相关 67 | 68 | - [x] 查看列表 69 | - [x] 查看详情 70 | 71 | ### Sites 相关 72 | 73 | - [x] 查看列表 74 | - [x] 查看详情 75 | 76 | ### 用户相关 77 | 78 | - [x] 查看创建列表 79 | - [x] 查看收藏列表 80 | - [x] 查看通知 81 | 82 | ### 缓存相关 83 | 84 | - [x] 双缓存机制 85 | - [x] WebView 图片的缓存与替换 86 | - [x] topic 的完全离线查看 87 | - [x] 数据刷新 88 | - [x] 分页加载 89 | - [x] 清除缓存 90 | 91 | ### 应用相关 92 | 93 | - [x] 内置浏览器(可选) 94 | - [x] 多数据类型适配器 95 | - [x] markdown 格式文本的显示 96 | - [x] 圆形图片 97 | - [x] 使用 ViewHolder 简化 Activity 代码 98 | 99 | ### 相关工具类 100 | 101 | - [x] 时间转换工具 102 | - [x] 数据缓存工具 103 | - [x] Crash捕获工具 104 | - [x] Html 文本处理工具 105 | - [x] Url 处理工具 -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/WatchTopicEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class WatchTopicEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public WatchTopicEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public WatchTopicEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/user/event/FollowUserEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:50:03 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.user.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class FollowUserEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public FollowUserEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public FollowUserEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/position/PositionAnimExpectationLeftOf.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.position; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | 31 | public class PositionAnimExpectationLeftOf extends PositionAnimationViewDependant { 32 | 33 | public PositionAnimExpectationLeftOf(View otherView) { 34 | super(otherView); 35 | 36 | setForPositionX(true); 37 | } 38 | 39 | @Override 40 | public Float getCalculatedValueX(View viewToMove) { 41 | return viewCalculator.finalPositionLeftOfView(otherView) - getMargin(viewToMove) - viewToMove.getWidth(); 42 | } 43 | 44 | @Override 45 | public Float getCalculatedValueY(View viewToMove) { 46 | return null; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/photo/event/UploadPhotoEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 02:20:40 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.photo.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.photo.bean.Photo; 30 | 31 | public class UploadPhotoEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public UploadPhotoEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param photo 实体数据 43 | */ 44 | public UploadPhotoEvent(@Nullable String uuid, @NonNull Integer code, @Nullable Photo photo) { 45 | super(uuid, code, photo); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/user/event/UnBlockUserEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:47:26 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.user.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class UnBlockUserEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public UnBlockUserEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public UnBlockUserEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/position/PositionAnimExpectationAboveOf.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.position; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | 31 | public class PositionAnimExpectationAboveOf extends PositionAnimationViewDependant { 32 | 33 | public PositionAnimExpectationAboveOf(View otherView) { 34 | super(otherView); 35 | 36 | setForPositionY(true); 37 | } 38 | 39 | @Override 40 | public Float getCalculatedValueX(View viewToMove) { 41 | return null; 42 | } 43 | 44 | @Override 45 | public Float getCalculatedValueY(View viewToMove) { 46 | return viewCalculator.finalPositionTopOfView(otherView) - getMargin(viewToMove) - viewToMove.getHeight(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/login/event/RefreshTokenEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.login.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.login.bean.Token; 30 | 31 | public class RefreshTokenEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public RefreshTokenEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param token 实体数据 43 | */ 44 | public RefreshTokenEvent(@Nullable String uuid, @NonNull Integer code, @Nullable Token token) { 45 | super(uuid, code, token); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/DeleteTopicEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | 32 | public class DeleteTopicEvent extends BaseEvent { 33 | /** 34 | * @param uuid 唯一识别码 35 | */ 36 | public DeleteTopicEvent(@Nullable String uuid) { 37 | super(uuid); 38 | } 39 | 40 | /** 41 | * @param uuid 唯一识别码 42 | * @param code 网络返回码 43 | * @param state 实体数据 44 | */ 45 | public DeleteTopicEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 46 | super(uuid, code, state); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/UnWatchTopicEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class UnWatchTopicEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public UnWatchTopicEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public UnWatchTopicEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/user/event/UnFollowUserEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:50:26 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.user.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class UnFollowUserEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public UnFollowUserEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public UnFollowUserEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/position/PositionAnimExpectationAlignRight.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.position; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | 31 | public class PositionAnimExpectationAlignRight extends PositionAnimationViewDependant { 32 | 33 | public PositionAnimExpectationAlignRight(View otherView) { 34 | super(otherView); 35 | 36 | setForPositionX(true); 37 | } 38 | 39 | @Override 40 | public Float getCalculatedValueX(View viewToMove) { 41 | return viewCalculator.finalPositionRightOfView(otherView) - getMargin(viewToMove) - viewToMove.getWidth(); 42 | } 43 | 44 | @Override 45 | public Float getCalculatedValueY(View viewToMove) { 46 | return null; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /diycode-app/src/main/java/com/gcssloop/diycode/test/HeaderProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-04-08 15:05:32 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode.test; 24 | 25 | import android.content.Context; 26 | import android.support.annotation.NonNull; 27 | 28 | import com.gcssloop.diycode.R; 29 | import com.gcssloop.recyclerview.adapter.base.RecyclerViewHolder; 30 | import com.gcssloop.recyclerview.adapter.multitype.BaseViewProvider; 31 | 32 | public class HeaderProvider extends BaseViewProvider
{ 33 | public HeaderProvider(@NonNull Context context) { 34 | super(context, R.layout.item_test); 35 | } 36 | 37 | /** 38 | * 在绑定数据时调用,需要用户自己处理 39 | * 40 | * @param holder ViewHolder 41 | * @param bean 数据 42 | */ 43 | @Override 44 | public void onBindView(RecyclerViewHolder holder, Header bean) { 45 | holder.setText(R.id.test_text, "-- 头部 --"); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/layout/activity_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 32 | 33 | 37 | 38 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/login/event/LoginEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.login.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.login.bean.Token; 30 | 31 | /** 32 | * 登录 33 | */ 34 | public class LoginEvent extends BaseEvent { 35 | 36 | /** 37 | * @param uuid 唯一识别码 38 | */ 39 | public LoginEvent(@Nullable String uuid) { 40 | super(uuid); 41 | } 42 | 43 | /** 44 | * @param uuid 唯一识别码 45 | * @param code 网络返回码 46 | * @param token 实体数据 47 | */ 48 | public LoginEvent(@Nullable String uuid, @NonNull Integer code, @Nullable Token token) { 49 | super(uuid, code, token); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/news/event/DeleteNewsReplyEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:08:34 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.news.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class DeleteNewsReplyEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public DeleteNewsReplyEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public DeleteNewsReplyEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/CollectionTopicEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class CollectionTopicEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public CollectionTopicEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public CollectionTopicEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/position/PositionAnimExpectationAlignBottom.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.position; 24 | 25 | import android.view.View; 26 | 27 | /** 28 | * Created by florentchampigny on 17/02/2017. 29 | */ 30 | 31 | public class PositionAnimExpectationAlignBottom extends PositionAnimationViewDependant { 32 | 33 | public PositionAnimExpectationAlignBottom(View otherView) { 34 | super(otherView); 35 | 36 | setForPositionY(true); 37 | } 38 | 39 | @Override 40 | public Float getCalculatedValueX(View viewToMove) { 41 | return null; 42 | } 43 | 44 | @Override 45 | public Float getCalculatedValueY(View viewToMove) { 46 | return viewCalculator.finalPositionBottomOfView(otherView) - getMargin(viewToMove) - viewToMove.getHeight(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /diycode-app/src/main/java/com/gcssloop/diycode/test/ContentProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-04-08 15:14:34 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode.test; 24 | 25 | import android.content.Context; 26 | import android.support.annotation.NonNull; 27 | 28 | import com.gcssloop.diycode.R; 29 | import com.gcssloop.recyclerview.adapter.base.RecyclerViewHolder; 30 | import com.gcssloop.recyclerview.adapter.multitype.BaseViewProvider; 31 | 32 | public class ContentProvider extends BaseViewProvider { 33 | public ContentProvider(@NonNull Context context) { 34 | super(context, R.layout.item_test); 35 | } 36 | 37 | /** 38 | * 在绑定数据时调用,需要用户自己处理 39 | * 40 | * @param holder ViewHolder 41 | * @param bean 数据 42 | */ 43 | @Override 44 | public void onBindView(RecyclerViewHolder holder, Content bean) { 45 | holder.setText(R.id.test_text, bean.text); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/DeleteTopicReplyEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class DeleteTopicReplyEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public DeleteTopicReplyEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public DeleteTopicReplyEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/news/event/GetNewsReplyEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:07:20 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.news.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.news.bean.NewReply; 30 | 31 | public class GetNewsReplyEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public GetNewsReplyEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param newReply 实体数据 43 | */ 44 | public GetNewsReplyEvent(@Nullable String uuid, @NonNull Integer code, @Nullable NewReply newReply) { 45 | super(uuid, code, newReply); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/UnCollectionTopicEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class UnCollectionTopicEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public UnCollectionTopicEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public UnCollectionTopicEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/utils/CacheUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.utils; 24 | 25 | import android.content.Context; 26 | import android.support.annotation.NonNull; 27 | 28 | import com.gcssloop.diycode_sdk.api.login.bean.Token; 29 | 30 | /** 31 | * 缓存工具类,用于缓存各类数据 32 | */ 33 | public class CacheUtil { 34 | 35 | ACache cache; 36 | 37 | public CacheUtil(Context context) { 38 | cache = ACache.get(context); 39 | } 40 | 41 | //--- token ------------------------------------------------------------------------------------ 42 | 43 | public void saveToken(@NonNull Token token){ 44 | cache.put("token", token); 45 | } 46 | 47 | public Token getToken(){ 48 | return (Token) cache.getAsObject("token"); 49 | } 50 | 51 | public void clearToken(){ 52 | cache.remove("token"); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/news/event/GetNewsListEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 23:55:00 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.news.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.news.bean.New; 30 | 31 | import java.util.List; 32 | 33 | public class GetNewsListEvent extends BaseEvent> { 34 | /** 35 | * @param uuid 唯一识别码 36 | */ 37 | public GetNewsListEvent(@Nullable String uuid) { 38 | super(uuid); 39 | } 40 | 41 | /** 42 | * @param uuid 唯一识别码 43 | * @param code 网络返回码 44 | * @param news 实体数据 45 | */ 46 | public GetNewsListEvent(@Nullable String uuid, @NonNull Integer code, @Nullable List news) { 47 | super(uuid, code, news); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/sites/event/GetSitesEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:35:08 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.sites.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.sites.bean.Sites; 30 | 31 | import java.util.List; 32 | 33 | public class GetSitesEvent extends BaseEvent> { 34 | /** 35 | * @param uuid 唯一识别码 36 | */ 37 | public GetSitesEvent(@Nullable String uuid) { 38 | super(uuid); 39 | } 40 | 41 | /** 42 | * @param uuid 唯一识别码 43 | * @param code 网络返回码 44 | * @param sites 实体数据 45 | */ 46 | public GetSitesEvent(@Nullable String uuid, @NonNull Integer code, @Nullable List sites) { 47 | super(uuid, code, sites); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/news/event/UpdateNewsReplyEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:07:55 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.news.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.news.bean.NewReply; 30 | 31 | public class UpdateNewsReplyEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public UpdateNewsReplyEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param newReply 实体数据 43 | */ 44 | public UpdateNewsReplyEvent(@Nullable String uuid, @NonNull Integer code, @Nullable NewReply newReply) { 45 | super(uuid, code, newReply); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/project/event/DeleteProjectReplyEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 02:57:09 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.project.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class DeleteProjectReplyEvent extends BaseEvent { 32 | 33 | /** 34 | * @param uuid 唯一识别码 35 | */ 36 | public DeleteProjectReplyEvent(@Nullable String uuid) { 37 | super(uuid); 38 | } 39 | 40 | /** 41 | * @param uuid 唯一识别码 42 | * @param code 网络返回码 43 | * @param state 实体数据 44 | */ 45 | public DeleteProjectReplyEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 46 | super(uuid, code, state); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/news/event/CreateNewsReplyEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:06:36 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.news.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.news.bean.NewReply; 30 | 31 | 32 | public class CreateNewsReplyEvent extends BaseEvent { 33 | /** 34 | * @param uuid 唯一识别码 35 | */ 36 | public CreateNewsReplyEvent(@Nullable String uuid) { 37 | super(uuid); 38 | } 39 | 40 | /** 41 | * @param uuid 唯一识别码 42 | * @param code 网络返回码 43 | * @param newReply 实体数据 44 | */ 45 | public CreateNewsReplyEvent(@Nullable String uuid, @NonNull Integer code, @Nullable NewReply newReply) { 46 | super(uuid, code, newReply); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/notifications/event/DeleteNotificationEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 02:34:49 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.notifications.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class DeleteNotificationEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public DeleteNotificationEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public DeleteNotificationEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/user/event/GetUsersListEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:44:32 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.user.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.user.bean.User; 30 | 31 | import java.util.List; 32 | 33 | public class GetUsersListEvent extends BaseEvent> { 34 | /** 35 | * @param uuid 唯一识别码 36 | */ 37 | public GetUsersListEvent(@Nullable String uuid) { 38 | super(uuid); 39 | } 40 | 41 | /** 42 | * @param uuid 唯一识别码 43 | * @param code 网络返回码 44 | * @param users 实体数据 45 | */ 46 | public GetUsersListEvent(@Nullable String uuid, @NonNull Integer code, @Nullable List users) { 47 | super(uuid, code, users); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/GetTopicEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.topic.bean.TopicContent; 30 | 31 | public class GetTopicEvent extends BaseEvent { 32 | 33 | /** 34 | * @param uuid 唯一识别码 35 | */ 36 | public GetTopicEvent(@Nullable String uuid) { 37 | super(uuid); 38 | } 39 | 40 | /** 41 | * @param uuid 唯一识别码 42 | * @param code 网络返回码 43 | * @param topicContent 实体数据 44 | */ 45 | public GetTopicEvent(@Nullable String uuid, @NonNull Integer code, @Nullable TopicContent topicContent) { 46 | super(uuid, code, topicContent); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /diycode-app/src/main/res/layout/item_sites.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 31 | 32 | 43 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/notifications/event/DeleteAllNotificationEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 02:35:26 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.notifications.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class DeleteAllNotificationEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public DeleteAllNotificationEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public DeleteAllNotificationEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/GetTopicReplyEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.topic.bean.TopicReply; 30 | 31 | public class GetTopicReplyEvent extends BaseEvent { 32 | 33 | /** 34 | * @param uuid 唯一识别码 35 | */ 36 | public GetTopicReplyEvent(@Nullable String uuid) { 37 | super(uuid); 38 | } 39 | 40 | /** 41 | * @param uuid 唯一识别码 42 | * @param code 网络返回码 43 | * @param topicReply 实体数据 44 | */ 45 | public GetTopicReplyEvent(@Nullable String uuid, @NonNull Integer code, @Nullable TopicReply topicReply) { 46 | super(uuid, code, topicReply); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/news/event/GetNewsNodesListEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:09:01 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.news.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.Node; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | import java.util.List; 32 | 33 | public class GetNewsNodesListEvent extends BaseEvent> { 34 | /** 35 | * @param uuid 唯一识别码 36 | */ 37 | public GetNewsNodesListEvent(@Nullable String uuid) { 38 | super(uuid); 39 | } 40 | 41 | /** 42 | * @param uuid 唯一识别码 43 | * @param code 网络返回码 44 | * @param nodes 实体数据 45 | */ 46 | public GetNewsNodesListEvent(@Nullable String uuid, @NonNull Integer code, @Nullable List nodes) { 47 | super(uuid, code, nodes); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/notifications/event/MarkNotificationAsReadEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 02:33:31 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.notifications.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.bean.State; 29 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 30 | 31 | public class MarkNotificationAsReadEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public MarkNotificationAsReadEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param state 实体数据 43 | */ 44 | public MarkNotificationAsReadEvent(@Nullable String uuid, @NonNull Integer code, @Nullable State state) { 45 | super(uuid, code, state); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/CreateTopicEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.topic.bean.TopicContent; 30 | 31 | public class CreateTopicEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public CreateTopicEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param topicContent 实体数据 43 | */ 44 | public CreateTopicEvent(@Nullable String uuid, @NonNull Integer code, @Nullable TopicContent topicContent) { 45 | super(uuid, code, topicContent); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/UpdateTopicEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.topic.bean.TopicContent; 30 | 31 | public class UpdateTopicEvent extends BaseEvent { 32 | /** 33 | * @param uuid 唯一识别码 34 | */ 35 | public UpdateTopicEvent(@Nullable String uuid) { 36 | super(uuid); 37 | } 38 | 39 | /** 40 | * @param uuid 唯一识别码 41 | * @param code 网络返回码 42 | * @param topicContent 实体数据 43 | */ 44 | public UpdateTopicEvent(@Nullable String uuid, @NonNull Integer code, @Nullable TopicContent topicContent) { 45 | super(uuid, code, topicContent); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/GetTopicsListEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.topic.bean.Topic; 30 | 31 | import java.util.List; 32 | 33 | public class GetTopicsListEvent extends BaseEvent> { 34 | 35 | /** 36 | * @param uuid 唯一识别码 37 | */ 38 | public GetTopicsListEvent(@Nullable String uuid) { 39 | super(uuid); 40 | } 41 | 42 | /** 43 | * @param uuid 唯一识别码 44 | * @param code 网络返回码 45 | * @param topics 实体数据 46 | */ 47 | public GetTopicsListEvent(@Nullable String uuid, @NonNull Integer code, @Nullable List topics) { 48 | super(uuid, code, topics); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /expectanim/src/main/java/com/github/florent37/expectanim/core/scale/ScaleAnimExpectationViewDependant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.github.florent37.expectanim.core.scale; 24 | 25 | import android.view.View; 26 | 27 | import java.util.List; 28 | 29 | /** 30 | * Created by florentchampigny on 20/02/2017. 31 | */ 32 | public abstract class ScaleAnimExpectationViewDependant extends ScaleAnimExpectation { 33 | 34 | protected final View otherView; 35 | 36 | public ScaleAnimExpectationViewDependant(View otherView, Integer gravityHorizontal, Integer gravityVertical) { 37 | super(gravityHorizontal, gravityVertical); 38 | this.otherView = otherView; 39 | } 40 | 41 | @Override 42 | public List getViewsDependencies() { 43 | final List viewsDependencies = super.getViewsDependencies(); 44 | viewsDependencies.add(otherView); 45 | return viewsDependencies; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/CreateTopicReplyEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.topic.bean.TopicReply; 30 | 31 | public class CreateTopicReplyEvent extends BaseEvent { 32 | 33 | /** 34 | * @param uuid 唯一识别码 35 | */ 36 | public CreateTopicReplyEvent(@Nullable String uuid) { 37 | super(uuid); 38 | } 39 | 40 | /** 41 | * @param uuid 唯一识别码 42 | * @param code 网络返回码 43 | * @param topicReply 实体数据 44 | */ 45 | public CreateTopicReplyEvent(@Nullable String uuid, @NonNull Integer code, @Nullable TopicReply topicReply) { 46 | super(uuid, code, topicReply); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/topic/event/UpdateTopicReplyEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-08 01:01:18 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.topic.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.topic.bean.TopicReply; 30 | 31 | public class UpdateTopicReplyEvent extends BaseEvent { 32 | 33 | /** 34 | * @param uuid 唯一识别码 35 | */ 36 | public UpdateTopicReplyEvent(@Nullable String uuid) { 37 | super(uuid); 38 | } 39 | 40 | /** 41 | * @param uuid 唯一识别码 42 | * @param code 网络返回码 43 | * @param topicReply 实体数据 44 | */ 45 | public UpdateTopicReplyEvent(@Nullable String uuid, @NonNull Integer code, @Nullable TopicReply topicReply) { 46 | super(uuid, code, topicReply); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /diycode-sdk/src/main/java/com/gcssloop/diycode_sdk/api/user/event/GetUserBlockedListEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 GcsSloop 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 | * Last modified 2017-03-09 00:48:02 17 | * 18 | * GitHub: https://github.com/GcsSloop 19 | * Website: http://www.gcssloop.com 20 | * Weibo: http://weibo.com/GcsSloop 21 | */ 22 | 23 | package com.gcssloop.diycode_sdk.api.user.event; 24 | 25 | import android.support.annotation.NonNull; 26 | import android.support.annotation.Nullable; 27 | 28 | import com.gcssloop.diycode_sdk.api.base.event.BaseEvent; 29 | import com.gcssloop.diycode_sdk.api.user.bean.User; 30 | 31 | import java.util.List; 32 | 33 | public class GetUserBlockedListEvent extends BaseEvent> { 34 | /** 35 | * @param uuid 唯一识别码 36 | */ 37 | public GetUserBlockedListEvent(@Nullable String uuid) { 38 | super(uuid); 39 | } 40 | 41 | /** 42 | * @param uuid 唯一识别码 43 | * @param code 网络返回码 44 | * @param users 实体数据 45 | */ 46 | public GetUserBlockedListEvent(@Nullable String uuid, @NonNull Integer code, @Nullable List users) { 47 | super(uuid, code, users); 48 | } 49 | } 50 | --------------------------------------------------------------------------------