├── app ├── .gitignore ├── src │ ├── main │ │ ├── assets │ │ │ └── fonts │ │ │ │ ├── Lobster-1.4.otf │ │ │ │ ├── Futura-CondensedMedium.ttf │ │ │ │ ├── FZLanTingHeiS-L-GB-Regular.TTF │ │ │ │ └── FZLanTingHeiS-DB1-GB-Regular.TTF │ │ ├── res │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_love.png │ │ │ │ ├── ic_share.png │ │ │ │ ├── ic_comment.png │ │ │ │ ├── ic_back_arrow.png │ │ │ │ ├── ic_down_arrow.png │ │ │ │ ├── ic_create_write.png │ │ │ │ ├── ic_info_outline.png │ │ │ │ └── ic_drawer_settings.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_bg.jpg │ │ │ │ └── comment_empty.png │ │ │ ├── drawable │ │ │ │ ├── shadow_left.png │ │ │ │ ├── shadow_right.png │ │ │ │ ├── shadow_bottom.png │ │ │ │ ├── black_bg.xml │ │ │ │ ├── shape_dots_select.xml │ │ │ │ ├── shape_dots_default.xml │ │ │ │ ├── shadow_gradient.xml │ │ │ │ ├── shadow_gradient_reserve.xml │ │ │ │ └── corner_btn.xml │ │ │ ├── drawable-xhdpi │ │ │ │ ├── home_pic.png │ │ │ │ ├── account_avatar.png │ │ │ │ ├── default_splash.jpg │ │ │ │ ├── ic_action_back.png │ │ │ │ ├── ic_eye_black_error.png │ │ │ │ ├── ic_tab_strip_icon_feed_selected.png │ │ │ │ ├── ic_tab_strip_icon_follow_selected.png │ │ │ │ ├── ic_tab_strip_icon_category_selected.png │ │ │ │ └── ic_tab_strip_icon_profile_selected.png │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── ids.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── attr.xml │ │ │ ├── layout │ │ │ │ ├── fragment_short_comment.xml │ │ │ │ ├── recycle_head_layout.xml │ │ │ │ ├── fragment_sections.xml │ │ │ │ ├── layout_loading.xml │ │ │ │ ├── fragment_themes_daily.xml │ │ │ │ ├── item_themes_details_editors.xml │ │ │ │ ├── fragment_daily_list.xml │ │ │ │ ├── layout_empty_comment.xml │ │ │ │ ├── activity_editor_info.xml │ │ │ │ ├── fragment_long_comment.xml │ │ │ │ ├── item_daily_list_time.xml │ │ │ │ ├── activity_theme_daily_details.xml │ │ │ │ ├── activity_splash.xml │ │ │ │ ├── toolbar_layout.xml │ │ │ │ ├── activity_sections_details.xml │ │ │ │ ├── layout_custom_banner.xml │ │ │ │ ├── item_themes_stories.xml │ │ │ │ ├── activity_daily_comment.xml │ │ │ │ ├── item_themes_daily.xml │ │ │ │ ├── item_sections.xml │ │ │ │ ├── activity_hotbitmapgg.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── item_daily_list.xml │ │ │ │ ├── item_sections_details.xml │ │ │ │ ├── layout_themes_details_head.xml │ │ │ │ ├── item_comment.xml │ │ │ │ ├── activity_feedback.xml │ │ │ │ └── activity_about.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── values-v19 │ │ │ │ └── styles.xml │ │ │ └── values-v21 │ │ │ │ └── styles.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── hotbitmapgg │ │ │ │ └── leisureread │ │ │ │ ├── mvp │ │ │ │ ├── BasePresenter.java │ │ │ │ ├── BaseView.java │ │ │ │ ├── scope │ │ │ │ │ ├── ActivityScope.java │ │ │ │ │ └── FragmentScope.java │ │ │ │ ├── model │ │ │ │ │ ├── entity │ │ │ │ │ │ ├── DailyExtraMessageInfo.java │ │ │ │ │ │ ├── FeedBackInfo.java │ │ │ │ │ │ ├── SectionsInfo.java │ │ │ │ │ │ ├── DailyCommentInfo.java │ │ │ │ │ │ ├── DailyDetailsInfo.java │ │ │ │ │ │ └── SectionsDetailsInfo.java │ │ │ │ │ └── component │ │ │ │ │ │ └── SectionsComponent.java │ │ │ │ ├── view │ │ │ │ │ └── SectionsContract.java │ │ │ │ └── presenter │ │ │ │ │ ├── sections │ │ │ │ │ └── SectionsPresenterMoudle.java │ │ │ │ │ └── SectionsPresenter.java │ │ │ │ ├── widget │ │ │ │ ├── banner │ │ │ │ │ ├── BannerEntity.java │ │ │ │ │ └── BannerAdapter.java │ │ │ │ ├── EmptyView.java │ │ │ │ ├── recycler │ │ │ │ │ ├── listeners │ │ │ │ │ │ ├── AutoLoadOnScrollListener.java │ │ │ │ │ │ └── EndlessRecyclerOnScrollListener.java │ │ │ │ │ └── base │ │ │ │ │ │ └── AbsRecyclerViewAdapter.java │ │ │ │ ├── MultiSwipeRefreshLayout.java │ │ │ │ └── SpringScrollView.java │ │ │ │ ├── app │ │ │ │ ├── AppComponent.java │ │ │ │ ├── AppModule.java │ │ │ │ ├── AppConstant.java │ │ │ │ └── setting │ │ │ │ │ └── GlideModuleSetting.java │ │ │ │ ├── rx │ │ │ │ ├── Rxutils.java │ │ │ │ └── RxBus.java │ │ │ │ ├── utils │ │ │ │ ├── DateUtil.java │ │ │ │ ├── WeekUtil.java │ │ │ │ ├── SystemUiVisibilityUtil.java │ │ │ │ ├── DisplayUtil.java │ │ │ │ ├── LogUtil.java │ │ │ │ ├── NetWorkUtil.java │ │ │ │ ├── HtmlUtil.java │ │ │ │ └── PreferenceUtils.java │ │ │ │ ├── ui │ │ │ │ ├── activity │ │ │ │ │ ├── HotBitmapGGInfoActivity.java │ │ │ │ │ ├── base │ │ │ │ │ │ ├── BaseAppCompatActivity.java │ │ │ │ │ │ └── BaseSwipeBackActivity.java │ │ │ │ │ ├── AppAboutActivity.java │ │ │ │ │ ├── SplashActivity.java │ │ │ │ │ ├── FeedBackActivity.java │ │ │ │ │ ├── DailyCommentActivity.java │ │ │ │ │ ├── EditorInfoActivity.java │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── SectionsDetailsActivity.java │ │ │ │ ├── fragment │ │ │ │ │ ├── base │ │ │ │ │ │ └── BaseFragment.java │ │ │ │ │ ├── UserInfoFragment.java │ │ │ │ │ ├── ShortCommentFragment.java │ │ │ │ │ ├── SectionsFragment.java │ │ │ │ │ ├── LongCommentFragment.java │ │ │ │ │ └── ThemesDailyFragment.java │ │ │ │ └── adapter │ │ │ │ │ ├── ThemeDetailsEditorsAdapter.java │ │ │ │ │ ├── SectionsAdapter.java │ │ │ │ │ ├── ThemeDailyAdapter.java │ │ │ │ │ ├── ThemeDetailsStoriesAdapter.java │ │ │ │ │ ├── SectionsDetailsAdapter.java │ │ │ │ │ └── CommentAdapter.java │ │ │ │ ├── LeisureReadApp.java │ │ │ │ └── network │ │ │ │ └── api │ │ │ │ └── ApiService.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── com │ │ └── hotbitmapgg │ │ └── rxzhihu │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── LeisureRead.iml ├── README.md ├── gradle.properties └── gradlew.bat /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/assets/fonts/Lobster-1.4.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/assets/fonts/Lobster-1.4.otf -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_love.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-hdpi/ic_love.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-xxhdpi/ic_bg.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/shadow_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable/shadow_left.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/shadow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable/shadow_right.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-hdpi/ic_share.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/home_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-xhdpi/home_pic.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/shadow_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable/shadow_bottom.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-hdpi/ic_comment.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_back_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-hdpi/ic_back_arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_down_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-hdpi/ic_down_arrow.png -------------------------------------------------------------------------------- /app/src/main/assets/fonts/Futura-CondensedMedium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/assets/fonts/Futura-CondensedMedium.ttf -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_create_write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-hdpi/ic_create_write.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_info_outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-hdpi/ic_info_outline.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/account_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-xhdpi/account_avatar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/default_splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-xhdpi/default_splash.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-xhdpi/ic_action_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/comment_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-xxhdpi/comment_empty.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_drawer_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-hdpi/ic_drawer_settings.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_eye_black_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-xhdpi/ic_eye_black_error.png -------------------------------------------------------------------------------- /app/src/main/assets/fonts/FZLanTingHeiS-L-GB-Regular.TTF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/assets/fonts/FZLanTingHeiS-L-GB-Regular.TTF -------------------------------------------------------------------------------- /app/src/main/assets/fonts/FZLanTingHeiS-DB1-GB-Regular.TTF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/assets/fonts/FZLanTingHeiS-DB1-GB-Regular.TTF -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_tab_strip_icon_feed_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-xhdpi/ic_tab_strip_icon_feed_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_tab_strip_icon_follow_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-xhdpi/ic_tab_strip_icon_follow_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_tab_strip_icon_category_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-xhdpi/ic_tab_strip_icon_category_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_tab_strip_icon_profile_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HotBitmapGG/LeisureRead/HEAD/app/src/main/res/drawable-xhdpi/ic_tab_strip_icon_profile_selected.png -------------------------------------------------------------------------------- /app/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Aug 23 22:35:11 CST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/black_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/mvp/BasePresenter.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.mvp; 2 | 3 | /** 4 | * Created by hcc on 2016/12/28 13:35 5 | * 100332338@qq.com 6 | * LeisureRead 7 | * 8 | * @HotBitmapGG MVP架构->Presenter层基类 9 | */ 10 | 11 | public interface BasePresenter { 12 | 13 | void start(); 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_dots_select.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/mvp/BaseView.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.mvp; 2 | 3 | /** 4 | * Created by hcc on 2016/12/28 13:35 5 | * 100332338@qq.com 6 | * LeisureRead 7 | * 8 | * @HotBitmapGG MVP架构->View层基类 9 | */ 10 | 11 | public interface BaseView { 12 | 13 | void setPresenter(T presenter); 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_dots_default.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shadow_gradient.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_short_comment.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shadow_gradient_reserve.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/hotbitmapgg/rxzhihu/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.rxzhihu; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase 10 | { 11 | public ApplicationTest() 12 | { 13 | super(Application.class); 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/recycle_head_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/mvp/scope/ActivityScope.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.mvp.scope; 2 | 3 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 4 | 5 | import java.lang.annotation.Retention; 6 | import javax.inject.Scope; 7 | 8 | /** 9 | * A scoping annotation to permit objects whose lifetime should 10 | * conform to the life of the activity to be memorized in the 11 | * correct component. 12 | */ 13 | @Scope 14 | @Retention(RUNTIME) 15 | public @interface ActivityScope { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/mvp/scope/FragmentScope.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.mvp.scope; 2 | 3 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 4 | 5 | import java.lang.annotation.Retention; 6 | import javax.inject.Scope; 7 | 8 | /** 9 | * A scoping annotation to permit objects whose lifetime should 10 | * conform to the life of the activity to be memorized in the 11 | * correct component. 12 | */ 13 | @Scope 14 | @Retention(RUNTIME) 15 | public @interface FragmentScope { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | 56dp 7 | 4dp 8 | 256dp 9 | 206dp 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/widget/banner/BannerEntity.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.widget.banner; 2 | 3 | /** 4 | * Created by hcc on 2016/12/28 13:35 5 | * 100332338@qq.com 6 | * LeisureRead 7 | * 8 | * @HotBitmapGG Banner模型类 9 | */ 10 | public class BannerEntity { 11 | 12 | public BannerEntity(int id, String title, String img) { 13 | 14 | this.id = id; 15 | this.title = title; 16 | this.img = img; 17 | } 18 | 19 | 20 | public String title; 21 | 22 | public String img; 23 | 24 | public int id; 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/res/values-v19/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 11 | 12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/app/AppComponent.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.app; 2 | 3 | import com.hotbitmapgg.leisureread.LeisureReadApp; 4 | import dagger.Component; 5 | import javax.inject.Singleton; 6 | 7 | import android.content.Context; 8 | 9 | /** 10 | * Created by hcc on 2016/12/28 13:35 11 | * 100332338@qq.com 12 | * LeisureRead 13 | * 14 | * @HotBitmapGG AppComponent 15 | */ 16 | @Singleton 17 | @Component(modules = AppModule.class) 18 | public interface AppComponent { 19 | 20 | Context context(); 21 | 22 | void inject(LeisureReadApp mApplication); 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | LeisureRead 3 | 不急不躁,不紧不慢,就这样闲读. 4 | 分享 5 | 来自「LeisureRead」的分享: 6 | 1.0 7 | HotBitmapGG 8 | 查看我的个人主页 9 | 意见反馈 10 | 通用设置 11 | 关于App 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_sections.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/mvp/model/entity/DailyExtraMessageInfo.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.mvp.model.entity; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * Created by hcc on 2016/12/28 13:35 7 | * 100332338@qq.com 8 | * LeisureRead 9 | * 10 | * @HotBitmapGG 日报额外数据模型类 11 | */ 12 | public class DailyExtraMessageInfo { 13 | 14 | public int comments; 15 | 16 | @SerializedName("long_comments") 17 | public int longComments; 18 | 19 | public int popularity; 20 | 21 | @SerializedName("short_comments") 22 | public int shortComments; 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_themes_daily.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_themes_details_editors.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/rx/Rxutils.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.rx; 2 | 3 | import rx.Observable; 4 | import rx.android.schedulers.AndroidSchedulers; 5 | import rx.schedulers.Schedulers; 6 | 7 | /** 8 | * Created by hcc on 2017/1/3 15:12 9 | * 100332338@qq.com 10 | * LeisureRead 11 | * 12 | * @HotBitmapGG Rxjava工具类 13 | */ 14 | 15 | public class Rxutils { 16 | 17 | /** 18 | * rxjava线程切换工具类 19 | */ 20 | public static Observable.Transformer normalSchedulers() { 21 | return tObservable -> tObservable.subscribeOn(Schedulers.io()) 22 | .observeOn(AndroidSchedulers.mainThread()); 23 | } 24 | 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_daily_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures 8 | 9 | .idea/compiler.xml 10 | 11 | .idea/copyright/profiles_settings.xml 12 | 13 | .idea/encodings.xml 14 | 15 | .idea/gradle.xml 16 | 17 | .idea/misc.xml 18 | 19 | .idea/modules.xml 20 | 21 | app/app.iml 22 | 23 | .idea/runConfigurations.xml 24 | 25 | .idea/vcs.xml 26 | 27 | projectFilesBackup/.idea/workspace.xml 28 | 29 | .idea/dictionaries/hcc.xml 30 | 31 | .idea/inspectionProfiles/profiles_settings.xml 32 | 33 | .idea/inspectionProfiles/Project_Default.xml 34 | 35 | .idea/codeStyleSettings.xml 36 | 37 | .idea/codeStyleSettings.xml 38 | 39 | .idea/codeStyleSettings.xml 40 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\eclipse_32\adt-bundle-windows-x86-20140702\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/app/AppModule.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.app; 2 | 3 | import com.hotbitmapgg.leisureread.LeisureReadApp; 4 | import dagger.Module; 5 | import dagger.Provides; 6 | import javax.inject.Singleton; 7 | 8 | import android.content.Context; 9 | 10 | /** 11 | * Created by hcc on 2016/12/28 13:35 12 | * 100332338@qq.com 13 | * LeisureRead 14 | * 15 | * @HotBitmapGG AppModule 16 | */ 17 | @Module 18 | public class AppModule { 19 | 20 | private final LeisureReadApp mApplication; 21 | 22 | 23 | public AppModule(LeisureReadApp mApplication) { 24 | 25 | this.mApplication = mApplication; 26 | } 27 | 28 | 29 | @Provides 30 | @Singleton 31 | Context provideApplicationContext() { 32 | 33 | return mApplication; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/mvp/view/SectionsContract.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.mvp.view; 2 | 3 | import com.hotbitmapgg.leisureread.mvp.BasePresenter; 4 | import com.hotbitmapgg.leisureread.mvp.BaseView; 5 | import com.hotbitmapgg.leisureread.mvp.model.entity.SectionsInfo; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by hcc on 2016/12/28 13:35 11 | * 100332338@qq.com 12 | * LeisureRead 13 | * 14 | * @HotBitmapGG 15 | */ 16 | 17 | public interface SectionsContract { 18 | 19 | interface View extends BaseView { 20 | 21 | void showError(); 22 | 23 | void showData(List sectionsDetailsInfos); 24 | } 25 | 26 | interface Presenter extends BasePresenter { 27 | 28 | void loadData(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/mvp/model/component/SectionsComponent.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.mvp.model.component; 2 | 3 | import com.hotbitmapgg.leisureread.app.AppComponent; 4 | import com.hotbitmapgg.leisureread.mvp.presenter.sections.SectionsPresenterMoudle; 5 | import com.hotbitmapgg.leisureread.mvp.scope.ActivityScope; 6 | import com.hotbitmapgg.leisureread.ui.activity.MainActivity; 7 | 8 | import dagger.Component; 9 | 10 | /** 11 | * Created by hcc on 2016/12/28 13:35 12 | * 100332338@qq.com 13 | * LeisureRead 14 | * 15 | * @HotBitmapGG 16 | */ 17 | @ActivityScope 18 | @Component(dependencies = AppComponent.class, modules = { SectionsPresenterMoudle.class }) 19 | public interface SectionsComponent { 20 | 21 | void inject(MainActivity mainActivity); 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_empty_comment.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 13 | 14 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_editor_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 13 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_long_comment.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 15 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/mvp/presenter/sections/SectionsPresenterMoudle.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.mvp.presenter.sections; 2 | 3 | import com.hotbitmapgg.leisureread.mvp.view.SectionsContract; 4 | import com.hotbitmapgg.leisureread.mvp.scope.ActivityScope; 5 | 6 | import dagger.Module; 7 | import dagger.Provides; 8 | 9 | /** 10 | * Created by hcc on 2016/12/28 13:35 11 | * 100332338@qq.com 12 | * LeisureRead 13 | * 14 | * @HotBitmapGG 15 | */ 16 | 17 | @Module 18 | public class SectionsPresenterMoudle { 19 | 20 | private final SectionsContract.View mView; 21 | 22 | 23 | public SectionsPresenterMoudle(SectionsContract.View mView) { 24 | 25 | this.mView = mView; 26 | } 27 | 28 | 29 | @Provides 30 | @ActivityScope 31 | SectionsContract.View view() { 32 | 33 | return this.mView; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_daily_list_time.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_theme_daily_details.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 13 | 14 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /LeisureRead.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 闲读App 2 | 3 | 4 | 5 | 6 | 7 | ## About me 8 | 9 | [![Wercker](https://img.shields.io/badge/weibo-HotBitmapGG-blue.svg)](http://weibo.com/3223089177/profile?topnav=1&wvr=6&is_all=1) 10 | 11 | An android developer in Wuhan. 12 | 13 | If you want to make friends with me, You can focus on my weibo. 14 | 15 | 16 | ## License 17 | 18 | Copyright 2017 HotBitmapGG 19 | 20 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 21 | 22 | http://www.apache.org/licenses/LICENSE-2.0 23 | 24 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/utils/DateUtil.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.utils; 2 | 3 | import java.text.SimpleDateFormat; 4 | 5 | import android.annotation.SuppressLint; 6 | 7 | /** 8 | * Created by hcc on 2016/12/28 13:35 9 | * 100332338@qq.com 10 | * LeisureRead 11 | * 12 | * @HotBitmapGG 时间工具类 13 | */ 14 | public class DateUtil { 15 | 16 | private DateUtil() { 17 | 18 | } 19 | 20 | 21 | public static String formatDate(String date) { 22 | 23 | String dateFormat = null; 24 | try { 25 | dateFormat = date.substring(4, 6) + "月" + date.substring(6, 8) + "日"; 26 | } catch (Exception e) { 27 | e.printStackTrace(); 28 | } 29 | return dateFormat; 30 | } 31 | 32 | 33 | @SuppressLint("SimpleDateFormat") 34 | public static String getTime(long date) { 35 | SimpleDateFormat format = new SimpleDateFormat("MM-dd HH:mm:ss"); 36 | return format.format(date); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/widget/EmptyView.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.widget; 2 | 3 | import com.hotbitmapgg.rxzhihu.R; 4 | 5 | import android.content.Context; 6 | import android.util.AttributeSet; 7 | import android.view.LayoutInflater; 8 | import android.view.View; 9 | import android.widget.LinearLayout; 10 | 11 | /** 12 | * Created by hcc on 2016/12/28 13:35 13 | * 100332338@qq.com 14 | * LeisureRead 15 | * 16 | * @HotBitmapGG emptyView 17 | */ 18 | public class EmptyView extends LinearLayout { 19 | 20 | public EmptyView(Context context) { 21 | 22 | this(context, null); 23 | } 24 | 25 | 26 | public EmptyView(Context context, AttributeSet attrs) { 27 | 28 | super(context, attrs); 29 | init(); 30 | } 31 | 32 | 33 | private void init() { 34 | 35 | View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_empty_comment, null); 36 | addView(view); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/toolbar_layout.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | org.gradle.daemon=true 20 | org.gradle.jvmargs=-Xmx2048m -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/mvp/model/entity/FeedBackInfo.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.mvp.model.entity; 2 | 3 | import cn.bmob.v3.BmobObject; 4 | 5 | /** 6 | * Created by hcc on 2016/12/28 13:35 7 | * 100332338@qq.com 8 | * LeisureRead 9 | * 10 | * @HotBitmapGG 11 | */ 12 | public class FeedBackInfo extends BmobObject { 13 | 14 | private String content; 15 | 16 | 17 | public FeedBackInfo(String content) { 18 | 19 | super(); 20 | this.content = content; 21 | } 22 | 23 | 24 | public FeedBackInfo() { 25 | 26 | super(); 27 | // TODO Auto-generated constructor stub 28 | } 29 | 30 | 31 | public String getContent() { 32 | 33 | return content; 34 | } 35 | 36 | 37 | public void setContent(String content) { 38 | 39 | this.content = content; 40 | } 41 | 42 | 43 | @Override 44 | public String toString() { 45 | 46 | return "FeekBckBean [content=" + content + "]"; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | #010101 5 | #010101 6 | #FFFFFF 7 | #9E9E9E 8 | #000000 9 | #dd000000 10 | #FFFFFF 11 | #555555 12 | #AEAEAE 13 | #FEFEFE 14 | #888888 15 | #e6e6e6 16 | #D3D3D3 17 | #656565 18 | #71000000 19 | #dcdcdc 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/app/AppConstant.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.app; 2 | 3 | /** 4 | * Created by hcc on 2016/12/28 13:15 5 | * 100332338@qq.com 6 | * LeisureRead 7 | * 8 | * @HotBitmapGG 常量工具类 9 | */ 10 | 11 | public class AppConstant { 12 | 13 | public static final float SCALE_END = 1.13F; 14 | 15 | public static final int ANIMATION_DURATION = 2000; 16 | 17 | public static final String EXTRA_ID = "extra_id"; 18 | 19 | public static final String EXTRA_NAME = "extra_name"; 20 | 21 | public static final String EXTRA_TYPE = "extra_type"; 22 | 23 | public static final String EXTRA_COMMENT_ID = "comment_id"; 24 | 25 | public static final String EXTRA_COMMENT_NUM = "comment_num"; 26 | 27 | public static final String EXTRA_LONG_COMMENT_NUM = "long_comment_num"; 28 | 29 | public static final String EXTRA_SHORT_COMMENT_NUM = "short_comment_num"; 30 | 31 | public static final String EXTRA_LONG_COMMENT_ID = "long_comment_id"; 32 | 33 | public static final String EXTRA_SHORT_COMMENT_ID = "short_comment_id"; 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_sections_details.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 15 | 16 | 17 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/corner_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/ui/activity/HotBitmapGGInfoActivity.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.ui.activity; 2 | 3 | import butterknife.Bind; 4 | import com.hotbitmapgg.leisureread.ui.activity.base.BaseAppCompatActivity; 5 | import com.hotbitmapgg.rxzhihu.R; 6 | 7 | import android.os.Bundle; 8 | import android.support.v7.widget.Toolbar; 9 | 10 | /** 11 | * Created by hcc on 2016/12/28 13:35 12 | * 100332338@qq.com 13 | * LeisureRead 14 | * 15 | * @HotBitmapGG 关于我界面 16 | */ 17 | public class HotBitmapGGInfoActivity extends BaseAppCompatActivity { 18 | 19 | @Bind(R.id.toolbar) 20 | Toolbar mToolbar; 21 | 22 | 23 | @Override 24 | public int getLayoutId() { 25 | 26 | return R.layout.activity_hotbitmapgg; 27 | } 28 | 29 | 30 | @Override 31 | public void initViews(Bundle savedInstanceState) { 32 | 33 | } 34 | 35 | 36 | @Override 37 | public void initToolBar() { 38 | 39 | mToolbar.setTitleTextColor(getResources().getColor(R.color.black_90)); 40 | mToolbar.setTitle("关于我"); 41 | mToolbar.setNavigationIcon(R.drawable.ic_action_back); 42 | mToolbar.setNavigationOnClickListener(view -> onBackPressed()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/ui/activity/base/BaseAppCompatActivity.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.ui.activity.base; 2 | 3 | import butterknife.ButterKnife; 4 | import com.trello.rxlifecycle.components.support.RxAppCompatActivity; 5 | 6 | import android.os.Bundle; 7 | 8 | /** 9 | * Created by hcc on 2016/12/28 13:35 10 | * 100332338@qq.com 11 | * LeisureRead 12 | * 13 | * @HotBitmapGG BaseAppCompatActivity基类 14 | */ 15 | public abstract class BaseAppCompatActivity extends RxAppCompatActivity { 16 | 17 | @Override 18 | protected void onCreate(Bundle savedInstanceState) { 19 | 20 | super.onCreate(savedInstanceState); 21 | //设置布局内容 22 | setContentView(getLayoutId()); 23 | //初始化黄油刀控件绑定框架 24 | ButterKnife.bind(this); 25 | //初始化控件 26 | initViews(savedInstanceState); 27 | //初始化ToolBar 28 | initToolBar(); 29 | } 30 | 31 | 32 | @Override 33 | protected void onDestroy() { 34 | 35 | super.onDestroy(); 36 | ButterKnife.unbind(this); 37 | } 38 | 39 | 40 | public abstract int getLayoutId(); 41 | 42 | public abstract void initViews(Bundle savedInstanceState); 43 | 44 | public abstract void initToolBar(); 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/mvp/presenter/SectionsPresenter.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.mvp.presenter; 2 | 3 | import com.hotbitmapgg.leisureread.mvp.view.SectionsContract; 4 | import com.hotbitmapgg.leisureread.network.RetrofitHelper; 5 | import com.hotbitmapgg.leisureread.rx.Rxutils; 6 | import java.util.concurrent.TimeUnit; 7 | import javax.inject.Inject; 8 | 9 | /** 10 | * Created by hcc on 2016/12/28 13:35 11 | * 100332338@qq.com 12 | * LeisureRead 13 | * 14 | * @HotBitmapGG 15 | */ 16 | 17 | public class SectionsPresenter implements SectionsContract.Presenter { 18 | 19 | private final SectionsContract.View mView; 20 | 21 | 22 | @Inject 23 | public SectionsPresenter(SectionsContract.View mView) { 24 | 25 | this.mView = mView; 26 | mView.setPresenter(this); 27 | } 28 | 29 | 30 | @Override 31 | public void start() { 32 | 33 | loadData(); 34 | } 35 | 36 | 37 | @Override 38 | public void loadData() { 39 | 40 | RetrofitHelper.getLastZhiHuApi().getZhiHuSections() 41 | .delay(1000, TimeUnit.MILLISECONDS) 42 | .compose(Rxutils.normalSchedulers()) 43 | .subscribe(dailySections -> { 44 | mView.showData(dailySections.getData()); 45 | }, throwable -> { 46 | mView.showError(); 47 | }); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/ui/activity/base/BaseSwipeBackActivity.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.ui.activity.base; 2 | 3 | import butterknife.ButterKnife; 4 | import me.imid.swipebacklayout.lib.SwipeBackLayout; 5 | import me.imid.swipebacklayout.lib.app.SwipeBackActivity; 6 | 7 | import android.os.Bundle; 8 | 9 | /** 10 | * Created by hcc on 2016/12/28 13:35 11 | * 100332338@qq.com 12 | * LeisureRead 13 | * 14 | * @HotBitmapGG BaseSwipeBackActivity基类 15 | */ 16 | public abstract class BaseSwipeBackActivity extends SwipeBackActivity { 17 | 18 | public SwipeBackLayout mSwipeBackLayout; 19 | 20 | 21 | @Override 22 | protected void onCreate(Bundle savedInstanceState) { 23 | super.onCreate(savedInstanceState); 24 | //设置布局内容 25 | setContentView(getLayoutId()); 26 | //初始化黄油刀控件绑定框架 27 | ButterKnife.bind(this); 28 | //初始化侧滑返回layout 29 | mSwipeBackLayout = getSwipeBackLayout(); 30 | mSwipeBackLayout.setEdgeTrackingEnabled(SwipeBackLayout.EDGE_LEFT); 31 | //初始化控件 32 | initViews(savedInstanceState); 33 | } 34 | 35 | 36 | @Override 37 | protected void onDestroy() { 38 | super.onDestroy(); 39 | ButterKnife.unbind(this); 40 | } 41 | 42 | 43 | public abstract int getLayoutId(); 44 | 45 | public abstract void initViews(Bundle savedInstanceState); 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/utils/WeekUtil.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.utils; 2 | 3 | import java.util.Calendar; 4 | 5 | /** 6 | * Created by hcc on 2016/12/28 13:35 7 | * 100332338@qq.com 8 | * LeisureRead 9 | * 10 | * @HotBitmapGG 星期工具类 11 | */ 12 | public class WeekUtil { 13 | 14 | public static String getWeek(String date) { 15 | 16 | LogUtil.all(date); 17 | int year = Integer.parseInt(date.substring(0, 4)); 18 | int month = Integer.parseInt(date.substring(4, 6)); 19 | int day = Integer.parseInt(date.substring(6, 8)); 20 | Calendar calendar = Calendar.getInstance();//获得一个日历 21 | calendar.set(year, month - 1, day);//设置当前时间,月份是从0月开始计算 22 | int number = calendar.get(Calendar.DAY_OF_WEEK);//星期表示1-7,是从星期日开始, 23 | return getWeekDay(number); 24 | } 25 | 26 | 27 | private static String getWeekDay(int dayForWeek) { 28 | 29 | if (dayForWeek == 1) { 30 | return "星期日"; 31 | } else if (dayForWeek == 2) { 32 | return "星期一"; 33 | } else if (dayForWeek == 3) { 34 | return "星期二"; 35 | } else if (dayForWeek == 4) { 36 | return "星期三"; 37 | } else if (dayForWeek == 5) { 38 | return "星期四"; 39 | } else if (dayForWeek == 6) { 40 | return "星期五"; 41 | } else if (dayForWeek == 7) { 42 | return "星期六"; 43 | } else { 44 | return ""; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/mvp/model/entity/SectionsInfo.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.mvp.model.entity; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by hcc on 2016/12/28 13:35 7 | * 100332338@qq.com 8 | * LeisureRead 9 | * 10 | * @HotBitmapGG 专栏列表模型类 11 | */ 12 | public class SectionsInfo { 13 | 14 | private List data; 15 | 16 | public List getData() { return data;} 17 | 18 | 19 | public void setData(List data) { this.data = data;} 20 | 21 | 22 | public static class DataBean { 23 | /** 24 | * description : 看别人的经历,理解自己的生活 25 | * id : 1 26 | * name : 深夜惊奇 27 | * thumbnail : http://pic3.zhimg.com/91125c9aebcab1c84f58ce4f8779551e.jpg 28 | */ 29 | 30 | private String description; 31 | private int id; 32 | private String name; 33 | private String thumbnail; 34 | 35 | 36 | public String getDescription() { return description;} 37 | 38 | 39 | public void setDescription(String description) { this.description = description;} 40 | 41 | 42 | public int getId() { return id;} 43 | 44 | 45 | public void setId(int id) { this.id = id;} 46 | 47 | 48 | public String getName() { return name;} 49 | 50 | 51 | public void setName(String name) { this.name = name;} 52 | 53 | 54 | public String getThumbnail() { return thumbnail;} 55 | 56 | 57 | public void setThumbnail(String thumbnail) { this.thumbnail = thumbnail;} 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/utils/SystemUiVisibilityUtil.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.utils; 2 | 3 | import android.view.View; 4 | import android.view.Window; 5 | import android.view.WindowManager; 6 | 7 | /** 8 | * Created by hcc on 2016/12/28 13:35 9 | * 100332338@qq.com 10 | * LeisureRead 11 | * 12 | * @HotBitmapGG StatusBar隐藏显示工具类 13 | */ 14 | public class SystemUiVisibilityUtil { 15 | 16 | public static void addFlags(View view, int flags) { 17 | 18 | view.setSystemUiVisibility(view.getSystemUiVisibility() | flags); 19 | } 20 | 21 | 22 | public static void clearFlags(View view, int flags) { 23 | 24 | view.setSystemUiVisibility(view.getSystemUiVisibility() & ~flags); 25 | } 26 | 27 | 28 | public static boolean hasFlags(View view, int flags) { 29 | 30 | return (view.getSystemUiVisibility() & flags) == flags; 31 | } 32 | 33 | 34 | /** 35 | * * 显示或隐藏StatusBar 36 | * 37 | * @param enable false 显示,true 隐藏 38 | */ 39 | public static void hideStatusBar(Window window, boolean enable) { 40 | 41 | WindowManager.LayoutParams p = window.getAttributes(); 42 | if (enable) 43 | //|=:或等于,取其一 44 | { 45 | p.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN; 46 | } else 47 | //&=:与等于,取其二同时满足, ~ : 取反 48 | { 49 | p.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN); 50 | } 51 | 52 | window.setAttributes(p); 53 | window.addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/rx/RxBus.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.rx; 2 | 3 | import rx.Observable; 4 | import rx.subjects.PublishSubject; 5 | import rx.subjects.SerializedSubject; 6 | import rx.subjects.Subject; 7 | 8 | /** 9 | * Created by hcc on 2017/1/3 15:12 10 | * 100332338@qq.com 11 | * LeisureRead 12 | * 13 | * @HotBitmapGG RxBus 14 | * 15 | * Subject同时充当了Observer和Observable的角色,Subject是非线程安全的, 16 | * 要避免该问题,需要将 Subject转换为一个 SerializedSubject , 17 | * 上述RxBus类中把线程非安全的PublishSubject包装成线程安全的Subject。 18 | * PublishSubject只会把在订阅发生的时间点之后来自原始Observable的数据发射给观察者 19 | * ofType操作符只发射指定类型的数据,其内部就是filter+cast 20 | */ 21 | 22 | public class RxBus { 23 | 24 | private static volatile RxBus mInstance; 25 | 26 | private final Subject bus; 27 | 28 | 29 | private RxBus() { 30 | 31 | bus = new SerializedSubject<>(PublishSubject.create()); 32 | } 33 | 34 | 35 | public static RxBus getInstance() { 36 | 37 | RxBus rxBus = mInstance; 38 | if (mInstance == null) { 39 | synchronized (RxBus.class) { 40 | rxBus = mInstance; 41 | if (mInstance == null) { 42 | rxBus = new RxBus(); 43 | mInstance = rxBus; 44 | } 45 | } 46 | } 47 | 48 | return rxBus; 49 | } 50 | 51 | 52 | /** 53 | * 发送消息 54 | */ 55 | public void post(Object object) { 56 | 57 | bus.onNext(object); 58 | } 59 | 60 | 61 | /** 62 | * 接收消息 63 | */ 64 | public Observable toObserverable(Class eventType) { 65 | 66 | return bus.ofType(eventType); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_custom_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | 12 | 20 | 21 | 29 | 30 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/ui/fragment/base/BaseFragment.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.ui.fragment.base; 2 | 3 | import butterknife.ButterKnife; 4 | import com.trello.rxlifecycle.components.support.RxFragment; 5 | 6 | import android.os.Bundle; 7 | import android.support.annotation.Nullable; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | 12 | /** 13 | * Created by hcc on 2016/12/28 13:35 14 | * 100332338@qq.com 15 | * LeisureRead 16 | * 17 | * @HotBitmapGG BaseFragment基类 18 | */ 19 | public abstract class BaseFragment extends RxFragment { 20 | 21 | @Nullable 22 | @Override 23 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 24 | 25 | return inflater.inflate(getLayoutId(), container, false); 26 | } 27 | 28 | 29 | @Override 30 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { 31 | 32 | super.onViewCreated(view, savedInstanceState); 33 | ButterKnife.bind(this, view); 34 | } 35 | 36 | 37 | @Override 38 | public void onActivityCreated(@Nullable Bundle savedInstanceState) { 39 | 40 | initViews(); 41 | initData(); 42 | super.onActivityCreated(savedInstanceState); 43 | } 44 | 45 | 46 | @Override 47 | public void onDetach() { 48 | 49 | super.onDetach(); 50 | } 51 | 52 | 53 | public abstract int getLayoutId(); 54 | 55 | public abstract void initViews(); 56 | 57 | public abstract void initData(); 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/widget/recycler/listeners/AutoLoadOnScrollListener.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.widget.recycler.listeners; 2 | 3 | import android.support.v7.widget.LinearLayoutManager; 4 | import android.support.v7.widget.RecyclerView; 5 | 6 | /** 7 | * Created by hcc on 2016/12/28 13:35 8 | * 100332338@qq.com 9 | * LeisureRead 10 | * 11 | * @HotBitmapGG RecycleView上拉加载更多 12 | */ 13 | public abstract class AutoLoadOnScrollListener extends RecyclerView.OnScrollListener { 14 | private int previousTotal = 0; 15 | 16 | private boolean loading = false; 17 | 18 | int totalItemCount, lastVisibleItem; 19 | 20 | private int currentPage = 1; 21 | 22 | private LinearLayoutManager mLinearLayoutManager; 23 | 24 | 25 | public AutoLoadOnScrollListener(LinearLayoutManager linearLayoutManager) { 26 | this.mLinearLayoutManager = linearLayoutManager; 27 | } 28 | 29 | 30 | @Override 31 | public void onScrolled(RecyclerView recyclerView, int dx, int dy) { 32 | super.onScrolled(recyclerView, dx, dy); 33 | 34 | totalItemCount = mLinearLayoutManager.getItemCount(); 35 | lastVisibleItem = mLinearLayoutManager.findLastVisibleItemPosition(); 36 | 37 | if (!loading && (lastVisibleItem > totalItemCount - 3) && dy > 0) { 38 | currentPage++; 39 | onLoadMore(currentPage); 40 | loading = true; 41 | } 42 | } 43 | 44 | 45 | public abstract void onLoadMore(int currentPage); 46 | 47 | 48 | public boolean isLoading() { 49 | return loading; 50 | } 51 | 52 | 53 | public void setLoading(boolean loading) { 54 | this.loading = loading; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/ui/fragment/UserInfoFragment.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.ui.fragment; 2 | 3 | import butterknife.OnClick; 4 | import com.hotbitmapgg.leisureread.ui.fragment.base.BaseFragment; 5 | import com.hotbitmapgg.leisureread.ui.activity.AppAboutActivity; 6 | import com.hotbitmapgg.leisureread.ui.activity.FeedBackActivity; 7 | import com.hotbitmapgg.leisureread.ui.activity.HotBitmapGGInfoActivity; 8 | import com.hotbitmapgg.rxzhihu.R; 9 | 10 | import android.content.Intent; 11 | 12 | /** 13 | * Created by hcc on 2016/12/28 13:35 14 | * 100332338@qq.com 15 | * LeisureRead 16 | * 17 | * @HotBitmapGG 用户中心界面 18 | */ 19 | public class UserInfoFragment extends BaseFragment { 20 | 21 | public static UserInfoFragment newInstance() { 22 | 23 | return new UserInfoFragment(); 24 | } 25 | 26 | 27 | @Override 28 | public int getLayoutId() { 29 | 30 | return R.layout.fragment_user; 31 | } 32 | 33 | 34 | @Override 35 | public void initViews() { 36 | 37 | } 38 | 39 | 40 | @Override 41 | public void initData() { 42 | 43 | } 44 | 45 | 46 | @OnClick(R.id.layout_user_info) 47 | void startHotBitmapGGInfo() { 48 | 49 | startActivity(new Intent(getActivity(), HotBitmapGGInfoActivity.class)); 50 | } 51 | 52 | 53 | @OnClick(R.id.layout_feed_back) 54 | void startFeedBack() { 55 | 56 | startActivity(new Intent(getActivity(), FeedBackActivity.class)); 57 | } 58 | 59 | 60 | @OnClick(R.id.layout_setting) 61 | void startSetting() { 62 | 63 | } 64 | 65 | 66 | @OnClick(R.id.layout_about_app) 67 | void startAboutApp() { 68 | 69 | startActivity(new Intent(getActivity(), AppAboutActivity.class)); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/ui/activity/AppAboutActivity.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.ui.activity; 2 | 3 | import butterknife.Bind; 4 | import com.hotbitmapgg.leisureread.ui.activity.base.BaseAppCompatActivity; 5 | import com.hotbitmapgg.rxzhihu.R; 6 | 7 | import android.content.pm.PackageInfo; 8 | import android.content.pm.PackageManager; 9 | import android.os.Bundle; 10 | import android.support.v7.widget.Toolbar; 11 | import android.widget.TextView; 12 | 13 | /** 14 | * Created by hcc on 2016/12/28 13:35 15 | * 100332338@qq.com 16 | * LeisureRead 17 | * 18 | * @HotBitmapGG App介绍界面 19 | */ 20 | public class AppAboutActivity extends BaseAppCompatActivity { 21 | 22 | @Bind(R.id.toolbar) 23 | Toolbar mToolbar; 24 | 25 | @Bind(R.id.tv_version) 26 | TextView mVersionTv; 27 | 28 | 29 | @Override 30 | public int getLayoutId() { 31 | 32 | return R.layout.activity_about; 33 | } 34 | 35 | 36 | @Override 37 | public void initViews(Bundle savedInstanceState) { 38 | 39 | String version = getVersion(); 40 | mVersionTv.setText("版本号:" + " V" + version); 41 | } 42 | 43 | 44 | @Override 45 | public void initToolBar() { 46 | 47 | mToolbar.setTitle("关于App"); 48 | mToolbar.setNavigationIcon(R.drawable.ic_action_back); 49 | mToolbar.setNavigationOnClickListener(view -> onBackPressed()); 50 | } 51 | 52 | 53 | private String getVersion() { 54 | 55 | try { 56 | PackageInfo pi = getPackageManager().getPackageInfo(getPackageName(), 0); 57 | return pi.versionName; 58 | } catch (PackageManager.NameNotFoundException e) { 59 | e.printStackTrace(); 60 | return getString(R.string.about_version); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/app/setting/GlideModuleSetting.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.app.setting; 2 | 3 | import com.bumptech.glide.Glide; 4 | import com.bumptech.glide.GlideBuilder; 5 | import com.bumptech.glide.MemoryCategory; 6 | import com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader; 7 | import com.bumptech.glide.load.engine.cache.LruResourceCache; 8 | import com.bumptech.glide.load.model.GlideUrl; 9 | import com.bumptech.glide.module.GlideModule; 10 | import java.io.InputStream; 11 | import java.util.concurrent.TimeUnit; 12 | import okhttp3.OkHttpClient; 13 | 14 | import android.content.Context; 15 | 16 | /** 17 | * Created by hcc on 2016/12/28 13:35 18 | * 100332338@qq.com 19 | * LeisureRead 20 | * 21 | * @HotBitmapGG Glide图片加载库配置 22 | */ 23 | 24 | public class GlideModuleSetting implements GlideModule { 25 | 26 | /** 27 | * 内存缓存大小 28 | */ 29 | private static final int memorySize = 1024 * 1024 * 10; 30 | 31 | /** 32 | * 磁盘缓存大小 33 | */ 34 | private static final int diskCacheSize = 1024 * 1024 * 30; 35 | 36 | 37 | @Override 38 | public void applyOptions(Context context, GlideBuilder builder) { 39 | 40 | builder.setMemoryCache(new LruResourceCache(memorySize)); 41 | } 42 | 43 | 44 | @Override 45 | public void registerComponents(Context context, Glide glide) { 46 | 47 | //配置OkHttp 48 | OkHttpClient mOkHttpClient = new OkHttpClient() 49 | .newBuilder() 50 | .connectTimeout(15, TimeUnit.SECONDS) 51 | .readTimeout(15, TimeUnit.SECONDS) 52 | .build(); 53 | 54 | //设置Glide请求为Okhttp 55 | glide.register(GlideUrl.class, InputStream.class, 56 | new OkHttpUrlLoader.Factory(mOkHttpClient)); 57 | 58 | //设置Glide的内存缓存和BitmapPool使用最多他们初始值的最大大小的一半 59 | glide.setMemoryCategory(MemoryCategory.LOW); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/utils/DisplayUtil.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.utils; 2 | 3 | import android.content.Context; 4 | import android.util.DisplayMetrics; 5 | 6 | /** 7 | * Created by hcc on 2016/12/28 13:35 8 | * 100332338@qq.com 9 | * LeisureRead 10 | * 11 | * @HotBitmapGG 屏幕像素转换工具类 12 | */ 13 | public class DisplayUtil { 14 | 15 | public static int px2dp(Context context, float pxValue) { 16 | 17 | final float scale = context.getResources().getDisplayMetrics().density; 18 | return (int) (pxValue / scale + 0.5f); 19 | } 20 | 21 | 22 | public static int dp2px(Context context, float dipValue) { 23 | 24 | final float scale = context.getResources().getDisplayMetrics().density; 25 | return (int) (dipValue * scale + 0.5f); 26 | } 27 | 28 | 29 | public static int px2sp(Context context, float pxValue) { 30 | 31 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; 32 | return (int) (pxValue / fontScale + 0.5f); 33 | } 34 | 35 | 36 | public static int sp2px(Context context, float spValue) { 37 | 38 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; 39 | return (int) (spValue * fontScale + 0.5f); 40 | } 41 | 42 | 43 | public static int getScreenWidth(Context context) { 44 | 45 | DisplayMetrics dm = context.getResources().getDisplayMetrics(); 46 | return dm.widthPixels; 47 | } 48 | 49 | 50 | public static int getScreenHeight(Context context) { 51 | 52 | DisplayMetrics dm = context.getResources().getDisplayMetrics(); 53 | return dm.heightPixels; 54 | } 55 | 56 | 57 | public static float getDisplayDensity(Context context) { 58 | 59 | if (context == null) { 60 | return -1; 61 | } 62 | return context.getResources().getDisplayMetrics().density; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_themes_stories.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 19 | 20 | 33 | 34 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 16 | 17 | 23 | 24 | 27 | 28 | 29 | 30 | 37 | 38 | 39 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/mvp/model/entity/DailyCommentInfo.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.mvp.model.entity; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by hcc on 2016/12/28 13:35 7 | * 100332338@qq.com 8 | * LeisureRead 9 | * 10 | * @HotBitmapGG 日报评论模型类 11 | */ 12 | public class DailyCommentInfo { 13 | 14 | private List comments; 15 | 16 | 17 | public List getComments() { return comments;} 18 | 19 | 20 | public void setComments(List comments) { this.comments = comments;} 21 | 22 | 23 | public static class CommentsBean { 24 | /** 25 | * author : vivian-小扣 26 | * content : 只看过三部他的电影,《梦旅人》,《岸边之旅》,和最近的《罗曼蒂克消亡史》,每一部都很出彩。 27 | * avatar : http://pic4.zhimg.com/6c4ab083a109ff176ff563cc24972cfb_im.jpg 28 | * time : 1482911777 29 | * id : 27655915 30 | * likes : 0 31 | */ 32 | 33 | private String author; 34 | private String content; 35 | private String avatar; 36 | private int time; 37 | private int id; 38 | private int likes; 39 | 40 | 41 | public String getAuthor() { return author;} 42 | 43 | 44 | public void setAuthor(String author) { this.author = author;} 45 | 46 | 47 | public String getContent() { return content;} 48 | 49 | 50 | public void setContent(String content) { this.content = content;} 51 | 52 | 53 | public String getAvatar() { return avatar;} 54 | 55 | 56 | public void setAvatar(String avatar) { this.avatar = avatar;} 57 | 58 | 59 | public int getTime() { return time;} 60 | 61 | 62 | public void setTime(int time) { this.time = time;} 63 | 64 | 65 | public int getId() { return id;} 66 | 67 | 68 | public void setId(int id) { this.id = id;} 69 | 70 | 71 | public int getLikes() { return likes;} 72 | 73 | 74 | public void setLikes(int likes) { this.likes = likes;} 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_daily_comment.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 12 | 13 | 21 | 22 | 23 | 32 | 33 | 34 | 35 | 36 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/widget/recycler/listeners/EndlessRecyclerOnScrollListener.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.widget.recycler.listeners; 2 | 3 | import android.support.v7.widget.LinearLayoutManager; 4 | import android.support.v7.widget.RecyclerView; 5 | 6 | /** 7 | * Created by hcc on 2016/12/28 13:35 8 | * 100332338@qq.com 9 | * LeisureRead 10 | * 11 | * @HotBitmapGG RecycleView上拉加载更多滑动监听器 12 | */ 13 | public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { 14 | 15 | public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName(); 16 | 17 | private int previousTotal = 0; 18 | 19 | private boolean loading = true; 20 | 21 | int lastCompletelyVisiableItemPosition, visibleItemCount, totalItemCount; 22 | 23 | private int currentPage = 1; 24 | 25 | private LinearLayoutManager mLinearLayoutManager; 26 | 27 | 28 | public EndlessRecyclerOnScrollListener(LinearLayoutManager linearLayoutManager) { 29 | 30 | this.mLinearLayoutManager = linearLayoutManager; 31 | } 32 | 33 | 34 | @Override 35 | public void onScrolled(RecyclerView recyclerView, int dx, int dy) { 36 | 37 | super.onScrolled(recyclerView, dx, dy); 38 | 39 | visibleItemCount = recyclerView.getChildCount(); 40 | totalItemCount = mLinearLayoutManager.getItemCount(); 41 | lastCompletelyVisiableItemPosition 42 | = mLinearLayoutManager.findLastCompletelyVisibleItemPosition(); 43 | 44 | if (loading) { 45 | if (totalItemCount > previousTotal) { 46 | loading = false; 47 | previousTotal = totalItemCount; 48 | } 49 | } 50 | if (!loading 51 | && (visibleItemCount > 0) 52 | && (lastCompletelyVisiableItemPosition >= totalItemCount - 1)) { 53 | currentPage++; 54 | onLoadMore(currentPage); 55 | loading = true; 56 | } 57 | } 58 | 59 | 60 | public abstract void onLoadMore(int currentPage); 61 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/item_themes_daily.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 25 | 26 | 35 | 36 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_sections.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 16 | 17 | 18 | 27 | 28 | 29 | 38 | 39 | 40 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 17 | 18 | 19 | 24 | 25 | 26 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_hotbitmapgg.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 17 | 18 | 23 | 24 | 31 | 32 | 39 | 40 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | 20 | 21 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 41 | 42 | 43 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/ui/adapter/ThemeDetailsEditorsAdapter.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.ui.adapter; 2 | 3 | import com.bumptech.glide.Glide; 4 | import com.hotbitmapgg.leisureread.mvp.model.entity.ThemeDetailsInfo; 5 | import com.hotbitmapgg.leisureread.widget.CircleImageView; 6 | import com.hotbitmapgg.leisureread.widget.recycler.base.AbsRecyclerViewAdapter; 7 | import com.hotbitmapgg.rxzhihu.R; 8 | 9 | import android.support.v7.widget.RecyclerView; 10 | import android.view.LayoutInflater; 11 | import android.view.View; 12 | import android.view.ViewGroup; 13 | 14 | /** 15 | * Created by hcc on 2016/12/28 13:35 16 | * 100332338@qq.com 17 | * LeisureRead 18 | * 19 | * @HotBitmapGG 主题日报编辑Adapter 20 | */ 21 | public class ThemeDetailsEditorsAdapter 22 | extends AbsRecyclerViewAdapter { 23 | 24 | public ThemeDetailsEditorsAdapter(RecyclerView recyclerView) { 25 | 26 | super(recyclerView); 27 | } 28 | 29 | 30 | @Override 31 | public ClickableViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 32 | 33 | bindContext(parent.getContext()); 34 | return new ItemViewHolder(LayoutInflater.from(getContext()) 35 | .inflate(R.layout.item_themes_details_editors, parent, false)); 36 | } 37 | 38 | 39 | @Override 40 | public void onBindViewHolder(ClickableViewHolder holder, int position) { 41 | 42 | if (holder instanceof ItemViewHolder) { 43 | ItemViewHolder itemViewHolder = (ItemViewHolder) holder; 44 | ThemeDetailsInfo.EditorsBean editorsBean = mDataSources.get(position); 45 | 46 | Glide.with(getContext()) 47 | .load(editorsBean.getAvatar()) 48 | .centerCrop() 49 | .dontAnimate() 50 | .placeholder(R.drawable.account_avatar) 51 | .into(itemViewHolder.mPic); 52 | } 53 | 54 | super.onBindViewHolder(holder, position); 55 | } 56 | 57 | 58 | private class ItemViewHolder extends AbsRecyclerViewAdapter.ClickableViewHolder { 59 | 60 | CircleImageView mPic; 61 | 62 | 63 | ItemViewHolder(View itemView) { 64 | 65 | super(itemView); 66 | mPic = $(R.id.editor_pic); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_daily_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 20 | 21 | 22 | 34 | 35 | 43 | 44 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/widget/MultiSwipeRefreshLayout.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.widget; 2 | 3 | import com.hotbitmapgg.rxzhihu.R; 4 | 5 | import android.content.Context; 6 | import android.content.res.TypedArray; 7 | import android.graphics.drawable.Drawable; 8 | import android.support.v4.widget.SwipeRefreshLayout; 9 | import android.util.AttributeSet; 10 | 11 | /** 12 | * Created by hcc on 2016/12/28 13:35 13 | * 100332338@qq.com 14 | * LeisureRead 15 | * 16 | * @HotBitmapGG 可以设置多个子View的SwipeRefreshLayout 17 | */ 18 | public class MultiSwipeRefreshLayout extends SwipeRefreshLayout { 19 | 20 | private CanChildScrollUpCallback mCanChildScrollUpCallback; 21 | 22 | private Drawable mForegroundDrawable; 23 | 24 | 25 | public MultiSwipeRefreshLayout(Context context) { 26 | 27 | this(context, null); 28 | } 29 | 30 | 31 | public MultiSwipeRefreshLayout(Context context, AttributeSet attrs) { 32 | 33 | super(context, attrs); 34 | final TypedArray a = context.obtainStyledAttributes(attrs, 35 | R.styleable.MultiSwipeRefreshLayout, 0, 0); 36 | 37 | mForegroundDrawable = a.getDrawable( 38 | R.styleable.MultiSwipeRefreshLayout_foreground); 39 | if (mForegroundDrawable != null) { 40 | mForegroundDrawable.setCallback(this); 41 | setWillNotDraw(false); 42 | } 43 | a.recycle(); 44 | } 45 | 46 | 47 | @Override 48 | protected void onSizeChanged(int w, int h, int oldw, int oldh) { 49 | 50 | super.onSizeChanged(w, h, oldw, oldh); 51 | if (mForegroundDrawable != null) { 52 | mForegroundDrawable.setBounds(0, 0, w, h); 53 | } 54 | } 55 | 56 | 57 | public void setCanChildScrollUpCallback(CanChildScrollUpCallback canChildScrollUpCallback) { 58 | 59 | mCanChildScrollUpCallback = canChildScrollUpCallback; 60 | } 61 | 62 | 63 | public interface CanChildScrollUpCallback { 64 | 65 | boolean canSwipeRefreshChildScrollUp(); 66 | } 67 | 68 | 69 | @Override 70 | public boolean canChildScrollUp() { 71 | 72 | if (mCanChildScrollUpCallback != null) { 73 | return mCanChildScrollUpCallback.canSwipeRefreshChildScrollUp(); 74 | } 75 | return super.canChildScrollUp(); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_sections_details.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 19 | 20 | 33 | 34 | 42 | 43 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_themes_details_head.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 17 | 22 | 23 | 31 | 32 | 33 | 34 | 37 | 38 | 48 | 49 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/widget/banner/BannerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.widget.banner; 2 | 3 | import java.util.List; 4 | 5 | import android.support.v4.view.PagerAdapter; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.view.ViewParent; 9 | import android.widget.ImageView; 10 | 11 | /** 12 | * Created by hcc on 2016/12/28 13:35 13 | * 100332338@qq.com 14 | * LeisureRead 15 | * 16 | * @HotBitmapGG Banner适配器 17 | */ 18 | public class BannerAdapter extends PagerAdapter { 19 | 20 | private List mList; 21 | 22 | private int pos; 23 | 24 | private ViewPagerOnItemClickListener mViewPagerOnItemClickListener; 25 | 26 | 27 | void setmViewPagerOnItemClickListener(ViewPagerOnItemClickListener mViewPagerOnItemClickListener) { 28 | 29 | this.mViewPagerOnItemClickListener = mViewPagerOnItemClickListener; 30 | } 31 | 32 | 33 | BannerAdapter(List list) { 34 | 35 | this.mList = list; 36 | } 37 | 38 | 39 | @Override 40 | public int getCount() { 41 | 42 | return Integer.MAX_VALUE; 43 | } 44 | 45 | 46 | @Override 47 | public boolean isViewFromObject(View arg0, Object arg1) { 48 | 49 | return arg0 == arg1; 50 | } 51 | 52 | 53 | @Override 54 | public Object instantiateItem(ViewGroup container, int position) { 55 | 56 | //对ViewPager页号求模取出View列表中要显示的项 57 | position %= mList.size(); 58 | if (position < 0) { 59 | position = mList.size() + position; 60 | } 61 | ImageView v = mList.get(position); 62 | pos = position; 63 | v.setScaleType(ImageView.ScaleType.CENTER); 64 | //如果View已经在之前添加到了一个父组件,则必须先remove,否则会抛出IllegalStateException。 65 | ViewParent vp = v.getParent(); 66 | if (vp != null) { 67 | ViewGroup parent = (ViewGroup) vp; 68 | parent.removeView(v); 69 | } 70 | v.setOnClickListener(v1 -> { 71 | 72 | if (mViewPagerOnItemClickListener != null) { 73 | mViewPagerOnItemClickListener.onItemClick(); 74 | } 75 | }); 76 | 77 | container.addView(v); 78 | return v; 79 | } 80 | 81 | 82 | @Override 83 | public void destroyItem(ViewGroup container, int position, Object object) { 84 | 85 | } 86 | 87 | 88 | interface ViewPagerOnItemClickListener { 89 | 90 | void onItemClick(); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/utils/LogUtil.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.utils; 2 | 3 | import android.util.Log; 4 | 5 | /** 6 | * Created by hcc on 2016/12/28 13:35 7 | * 100332338@qq.com 8 | * LeisureRead 9 | * 10 | * @HotBitmapGG 日志打印工具类 11 | */ 12 | public class LogUtil { 13 | 14 | private static final String TAG = "LogUtil"; 15 | 16 | private static boolean isShow = true; 17 | 18 | 19 | public static boolean isShow() { 20 | return isShow; 21 | } 22 | 23 | 24 | public static void setShow(boolean show) { 25 | isShow = show; 26 | } 27 | 28 | 29 | public static void i(String tag, String msg) { 30 | if (isShow) { 31 | Log.i(tag, msg); 32 | } 33 | } 34 | 35 | 36 | public static void w(String tag, String msg) { 37 | if (isShow) { 38 | Log.w(tag, msg); 39 | } 40 | } 41 | 42 | 43 | public static void e(String tag, String msg) { 44 | if (isShow) { 45 | Log.e(tag, msg); 46 | } 47 | } 48 | 49 | 50 | public static void all(String msg) { 51 | if (isShow) { 52 | Log.e("all", msg); 53 | } 54 | } 55 | 56 | 57 | public static void i(String msg) { 58 | if (isShow) { 59 | Log.i(TAG, msg); 60 | } 61 | } 62 | 63 | 64 | public static void w(String msg) { 65 | if (isShow) { 66 | Log.w(TAG, msg); 67 | } 68 | } 69 | 70 | 71 | public static void e(String msg) { 72 | if (isShow) { 73 | Log.e(TAG, msg); 74 | } 75 | } 76 | 77 | 78 | public static void v(String msg) { 79 | if (isShow) { 80 | Log.v(TAG, msg); 81 | } 82 | } 83 | 84 | 85 | public static void d(String msg) { 86 | if (isShow) { 87 | Log.d(TAG, msg); 88 | } 89 | } 90 | 91 | 92 | public static void d(String tag, String msg) { 93 | if (isShow) { 94 | Log.d(tag, msg); 95 | } 96 | } 97 | 98 | 99 | public static void w(String tag, String msg, Exception e) { 100 | if (isShow) { 101 | Log.w(tag, msg, e); 102 | } 103 | } 104 | 105 | 106 | public static void v(String tag, String msg) { 107 | if (isShow) { 108 | Log.v(tag, msg); 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/LeisureReadApp.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread; 2 | 3 | import com.hotbitmapgg.leisureread.app.AppComponent; 4 | import com.hotbitmapgg.leisureread.app.AppModule; 5 | import com.hotbitmapgg.leisureread.app.DaggerAppComponent; 6 | import com.hotbitmapgg.rxzhihu.R; 7 | import com.squareup.leakcanary.LeakCanary; 8 | import io.realm.Realm; 9 | import io.realm.RealmConfiguration; 10 | import uk.co.chrisjenx.calligraphy.CalligraphyConfig; 11 | 12 | import android.app.Application; 13 | 14 | /** 15 | * Created by hcc on 2016/12/26 17:08 16 | * 100332338@qq.com 17 | * LeisureRead 18 | * 19 | * @HotBitmapGG 20 | */ 21 | public class LeisureReadApp extends Application { 22 | 23 | private AppComponent mAppComponent; 24 | 25 | public static LeisureReadApp mAppContext; 26 | 27 | public static String BMBO_KEY = "b0d3e44679384c31dd28855c08a7520d"; 28 | 29 | 30 | public static LeisureReadApp getAppContext() { 31 | 32 | return mAppContext; 33 | } 34 | 35 | 36 | public AppComponent getAppComponent() { 37 | 38 | return mAppComponent; 39 | } 40 | 41 | 42 | @Override 43 | public void onCreate() { 44 | 45 | super.onCreate(); 46 | mAppContext = this; 47 | 48 | initFont(); 49 | initRealm(); 50 | initAppComPonent(); 51 | initLeakCanary(); 52 | } 53 | 54 | 55 | /** 56 | * 初始化Realm数据库配置 57 | */ 58 | private void initRealm() { 59 | 60 | Realm.setDefaultConfiguration(new RealmConfiguration.Builder(this) 61 | .deleteRealmIfMigrationNeeded() 62 | .schemaVersion(1) 63 | .build()); 64 | } 65 | 66 | 67 | /** 68 | * 初始化LeakCanary内存泄漏检测 69 | */ 70 | private void initLeakCanary() { 71 | 72 | LeakCanary.install(this); 73 | } 74 | 75 | 76 | /** 77 | * 初始化组件 78 | */ 79 | private void initAppComPonent() { 80 | 81 | mAppComponent = DaggerAppComponent.builder() 82 | .appModule(new AppModule(this)) 83 | .build(); 84 | } 85 | 86 | 87 | /** 88 | * 初始化字体管理库 89 | */ 90 | private void initFont() { 91 | 92 | CalligraphyConfig.initDefault(new CalligraphyConfig.Builder() 93 | .setDefaultFontPath("fonts/Lobster-1.4.otf") 94 | .setFontAttrId(R.attr.fontPath) 95 | .build() 96 | ); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /app/src/main/res/values/attr.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 54 | 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/ui/adapter/SectionsAdapter.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.ui.adapter; 2 | 3 | import com.bumptech.glide.Glide; 4 | import com.bumptech.glide.load.engine.DiskCacheStrategy; 5 | import com.hotbitmapgg.leisureread.mvp.model.entity.SectionsInfo; 6 | import com.hotbitmapgg.leisureread.widget.recycler.base.AbsRecyclerViewAdapter; 7 | import com.hotbitmapgg.rxzhihu.R; 8 | 9 | import android.support.v7.widget.RecyclerView; 10 | import android.view.LayoutInflater; 11 | import android.view.View; 12 | import android.view.ViewGroup; 13 | import android.widget.ImageView; 14 | import android.widget.TextView; 15 | 16 | /** 17 | * Created by hcc on 2016/12/28 13:35 18 | * 100332338@qq.com 19 | * LeisureRead 20 | * 21 | * @HotBitmapGG 专栏列表Adapter 22 | */ 23 | public class SectionsAdapter extends AbsRecyclerViewAdapter { 24 | 25 | public SectionsAdapter(RecyclerView recyclerView) { 26 | 27 | super(recyclerView); 28 | } 29 | 30 | 31 | @Override 32 | public ClickableViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 33 | 34 | bindContext(parent.getContext()); 35 | return new ItemViewHolder( 36 | LayoutInflater.from(getContext()).inflate(R.layout.item_sections, parent, false)); 37 | } 38 | 39 | 40 | @Override 41 | public void onBindViewHolder(ClickableViewHolder holder, int position) { 42 | 43 | if (holder instanceof ItemViewHolder) { 44 | ItemViewHolder itemViewHolder = (ItemViewHolder) holder; 45 | SectionsInfo.DataBean dailySectionsInfo = mDataSources.get(position); 46 | 47 | Glide.with(getContext()) 48 | .load(dailySectionsInfo.getThumbnail()) 49 | .centerCrop() 50 | .diskCacheStrategy(DiskCacheStrategy.ALL) 51 | .placeholder(R.drawable.account_avatar) 52 | .into(itemViewHolder.mImageView); 53 | 54 | itemViewHolder.mDes.setText(dailySectionsInfo.getDescription()); 55 | itemViewHolder.mName.setText(dailySectionsInfo.getName()); 56 | } 57 | super.onBindViewHolder(holder, position); 58 | } 59 | 60 | 61 | public class ItemViewHolder extends ClickableViewHolder { 62 | 63 | public ImageView mImageView; 64 | 65 | public TextView mDes; 66 | 67 | public TextView mName; 68 | 69 | 70 | public ItemViewHolder(View itemView) { 71 | 72 | super(itemView); 73 | mImageView = $(R.id.item_img); 74 | mDes = $(R.id.item_des); 75 | mName = $(R.id.item_name); 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/ui/adapter/ThemeDailyAdapter.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.ui.adapter; 2 | 3 | import com.bumptech.glide.Glide; 4 | import com.bumptech.glide.load.engine.DiskCacheStrategy; 5 | import com.hotbitmapgg.leisureread.mvp.model.entity.ThemeDailyInfo; 6 | import com.hotbitmapgg.leisureread.widget.recycler.base.AbsRecyclerViewAdapter; 7 | import com.hotbitmapgg.rxzhihu.R; 8 | 9 | import android.support.v7.widget.RecyclerView; 10 | import android.view.LayoutInflater; 11 | import android.view.View; 12 | import android.view.ViewGroup; 13 | import android.widget.ImageView; 14 | import android.widget.TextView; 15 | 16 | /** 17 | * Created by hcc on 2016/12/28 13:35 18 | * 100332338@qq.com 19 | * LeisureRead 20 | * 21 | * @HotBitmapGG 主题日报列表Adapter 22 | */ 23 | public class ThemeDailyAdapter extends AbsRecyclerViewAdapter { 24 | 25 | public ThemeDailyAdapter(RecyclerView recyclerView) { 26 | 27 | super(recyclerView); 28 | } 29 | 30 | 31 | @Override 32 | public ClickableViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 33 | 34 | bindContext(parent.getContext()); 35 | return new ItemViewHolder( 36 | LayoutInflater.from(getContext()).inflate(R.layout.item_themes_daily, parent, false)); 37 | } 38 | 39 | 40 | @Override 41 | public void onBindViewHolder(ClickableViewHolder holder, int position) { 42 | 43 | if (holder instanceof ItemViewHolder) { 44 | ItemViewHolder itemViewHolder = (ItemViewHolder) holder; 45 | ThemeDailyInfo.OthersBean othersBean = mDataSources.get(position); 46 | 47 | Glide.with(getContext()) 48 | .load(othersBean.getThumbnail()) 49 | .centerCrop() 50 | .diskCacheStrategy(DiskCacheStrategy.ALL) 51 | .placeholder(R.drawable.account_avatar) 52 | .into(itemViewHolder.mImage); 53 | 54 | itemViewHolder.mName.setText(othersBean.getName()); 55 | itemViewHolder.mDes.setText(othersBean.getDescription()); 56 | } 57 | 58 | super.onBindViewHolder(holder, position); 59 | } 60 | 61 | 62 | private class ItemViewHolder extends AbsRecyclerViewAdapter.ClickableViewHolder { 63 | 64 | TextView mName; 65 | 66 | ImageView mImage; 67 | 68 | TextView mDes; 69 | 70 | 71 | ItemViewHolder(View itemView) { 72 | 73 | super(itemView); 74 | mName = $(R.id.item_type_name); 75 | mImage = $(R.id.item_type_img); 76 | mDes = $(R.id.item_type_des); 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/ui/adapter/ThemeDetailsStoriesAdapter.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.ui.adapter; 2 | 3 | import com.bumptech.glide.Glide; 4 | import com.bumptech.glide.load.engine.DiskCacheStrategy; 5 | import com.hotbitmapgg.leisureread.mvp.model.entity.ThemeDetailsInfo; 6 | import com.hotbitmapgg.leisureread.widget.recycler.base.AbsRecyclerViewAdapter; 7 | import com.hotbitmapgg.rxzhihu.R; 8 | 9 | import android.support.v7.widget.RecyclerView; 10 | import android.view.LayoutInflater; 11 | import android.view.View; 12 | import android.view.ViewGroup; 13 | import android.widget.ImageView; 14 | import android.widget.TextView; 15 | 16 | /** 17 | * Created by hcc on 2016/12/28 13:35 18 | * 100332338@qq.com 19 | * LeisureRead 20 | * 21 | * @HotBitmapGG 主题日报列表Adapter 22 | */ 23 | public class ThemeDetailsStoriesAdapter 24 | extends AbsRecyclerViewAdapter { 25 | 26 | public ThemeDetailsStoriesAdapter(RecyclerView recyclerView) { 27 | 28 | super(recyclerView); 29 | } 30 | 31 | 32 | @Override 33 | public ClickableViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 34 | 35 | bindContext(parent.getContext()); 36 | return new ItemViewHolder( 37 | LayoutInflater.from(getContext()).inflate(R.layout.item_themes_stories, parent, false)); 38 | } 39 | 40 | 41 | @Override 42 | public void onBindViewHolder(ClickableViewHolder holder, int position) { 43 | 44 | if (holder instanceof ItemViewHolder) { 45 | ItemViewHolder itemViewHolder = (ItemViewHolder) holder; 46 | ThemeDetailsInfo.StoriesBean storiesBean = mDataSources.get(position); 47 | 48 | if (storiesBean.getImages() == null) { 49 | itemViewHolder.mImg.setVisibility(View.GONE); 50 | } else { 51 | Glide.with(getContext()) 52 | .load(storiesBean.getImages().get(0)) 53 | .centerCrop() 54 | .diskCacheStrategy(DiskCacheStrategy.ALL) 55 | .placeholder(R.drawable.account_avatar) 56 | .into(itemViewHolder.mImg); 57 | } 58 | 59 | itemViewHolder.mTitle.setText(storiesBean.getTitle()); 60 | } 61 | super.onBindViewHolder(holder, position); 62 | } 63 | 64 | 65 | private class ItemViewHolder extends AbsRecyclerViewAdapter.ClickableViewHolder { 66 | 67 | ImageView mImg; 68 | 69 | TextView mTitle; 70 | 71 | 72 | ItemViewHolder(View itemView) { 73 | 74 | super(itemView); 75 | mImg = $(R.id.item_image); 76 | mTitle = $(R.id.item_title); 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/ui/activity/SplashActivity.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.ui.activity; 2 | 3 | import butterknife.Bind; 4 | import butterknife.ButterKnife; 5 | import com.hotbitmapgg.leisureread.app.AppConstant; 6 | import com.hotbitmapgg.rxzhihu.R; 7 | import java.util.concurrent.TimeUnit; 8 | import rx.Observable; 9 | import rx.Subscription; 10 | import rx.android.schedulers.AndroidSchedulers; 11 | 12 | import android.animation.Animator; 13 | import android.animation.AnimatorListenerAdapter; 14 | import android.animation.AnimatorSet; 15 | import android.animation.ObjectAnimator; 16 | import android.app.Activity; 17 | import android.content.Intent; 18 | import android.os.Bundle; 19 | import android.widget.ImageView; 20 | 21 | /** 22 | * Created by hcc on 2016/12/28 13:35 23 | * 100332338@qq.com 24 | * LeisureRead 25 | * 26 | * @HotBitmapGG 启动页界面 27 | */ 28 | public class SplashActivity extends Activity { 29 | 30 | @Bind(R.id.iv_splash) 31 | ImageView mSplashImageView; 32 | 33 | private Subscription subscribe; 34 | 35 | 36 | @Override 37 | protected void onCreate(Bundle savedInstanceState) { 38 | 39 | super.onCreate(savedInstanceState); 40 | setContentView(R.layout.activity_splash); 41 | ButterKnife.bind(this); 42 | initSplashImage(); 43 | } 44 | 45 | 46 | private void initSplashImage() { 47 | 48 | subscribe = Observable.timer(2000, TimeUnit.MILLISECONDS) 49 | .observeOn(AndroidSchedulers.mainThread()) 50 | .subscribe(aLong -> { 51 | animateImage(); 52 | }); 53 | } 54 | 55 | 56 | public void animateImage() { 57 | 58 | ObjectAnimator animatorX = ObjectAnimator.ofFloat(mSplashImageView, "scaleX", 1f, 59 | AppConstant.SCALE_END); 60 | ObjectAnimator animatorY = ObjectAnimator.ofFloat(mSplashImageView, "scaleY", 1f, 61 | AppConstant.SCALE_END); 62 | 63 | AnimatorSet set = new AnimatorSet(); 64 | set.setDuration(AppConstant.ANIMATION_DURATION).play(animatorX).with(animatorY); 65 | set.start(); 66 | 67 | set.addListener(new AnimatorListenerAdapter() { 68 | 69 | @Override 70 | public void onAnimationEnd(Animator animation) { 71 | 72 | startActivity(new Intent(SplashActivity.this, MainActivity.class)); 73 | SplashActivity.this.finish(); 74 | overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out); 75 | } 76 | }); 77 | } 78 | 79 | 80 | @Override 81 | protected void onDestroy() { 82 | 83 | super.onDestroy(); 84 | if (subscribe != null && !subscribe.isUnsubscribed()) { 85 | subscribe.unsubscribe(); 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/ui/fragment/ShortCommentFragment.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.ui.fragment; 2 | 3 | import butterknife.Bind; 4 | import com.hotbitmapgg.leisureread.app.AppConstant; 5 | import com.hotbitmapgg.leisureread.mvp.model.entity.DailyCommentInfo; 6 | import com.hotbitmapgg.leisureread.network.RetrofitHelper; 7 | import com.hotbitmapgg.leisureread.rx.Rxutils; 8 | import com.hotbitmapgg.leisureread.ui.adapter.CommentAdapter; 9 | import com.hotbitmapgg.leisureread.ui.fragment.base.BaseFragment; 10 | import com.hotbitmapgg.rxzhihu.R; 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | import android.os.Bundle; 15 | import android.support.v7.widget.LinearLayoutManager; 16 | import android.support.v7.widget.RecyclerView; 17 | 18 | /** 19 | * Created by hcc on 2016/12/28 13:35 20 | * 100332338@qq.com 21 | * LeisureRead 22 | * 23 | * @HotBitmapGG 短评论界面 24 | */ 25 | public class ShortCommentFragment extends BaseFragment { 26 | 27 | @Bind(R.id.recycler_view) 28 | RecyclerView mRecyclerView; 29 | 30 | private int id; 31 | 32 | private CommentAdapter mAdapter; 33 | 34 | private List mShortComments = new ArrayList<>(); 35 | 36 | 37 | public static ShortCommentFragment newInstance(int id) { 38 | 39 | ShortCommentFragment mShortCommentFragment = new ShortCommentFragment(); 40 | Bundle mBundle = new Bundle(); 41 | mBundle.putInt(AppConstant.EXTRA_SHORT_COMMENT_ID, id); 42 | mShortCommentFragment.setArguments(mBundle); 43 | 44 | return mShortCommentFragment; 45 | } 46 | 47 | 48 | @Override 49 | public int getLayoutId() { 50 | 51 | return R.layout.fragment_short_comment; 52 | } 53 | 54 | 55 | @Override 56 | public void initViews() { 57 | 58 | Bundle bundle = getArguments(); 59 | id = bundle.getInt(AppConstant.EXTRA_SHORT_COMMENT_ID); 60 | 61 | initRecyclerView(); 62 | } 63 | 64 | 65 | private void initRecyclerView() { 66 | mRecyclerView.setHasFixedSize(true); 67 | mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); 68 | mAdapter = new CommentAdapter(mRecyclerView); 69 | mRecyclerView.setAdapter(mAdapter); 70 | } 71 | 72 | 73 | @Override 74 | public void initData() { 75 | RetrofitHelper.builder().getDailyShortCommentById(id) 76 | .compose(Rxutils.normalSchedulers()) 77 | .subscribe(dailyComment -> { 78 | 79 | mShortComments.addAll(dailyComment.getComments()); 80 | finishTask(); 81 | }, throwable -> { 82 | 83 | }); 84 | } 85 | 86 | 87 | private void finishTask() { 88 | mAdapter.setDataSources(mShortComments); 89 | mAdapter.notifyDataSetChanged(); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/ui/adapter/SectionsDetailsAdapter.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.ui.adapter; 2 | 3 | import com.bumptech.glide.Glide; 4 | import com.bumptech.glide.load.engine.DiskCacheStrategy; 5 | import com.hotbitmapgg.leisureread.mvp.model.entity.SectionsDetailsInfo; 6 | import com.hotbitmapgg.leisureread.widget.recycler.base.AbsRecyclerViewAdapter; 7 | import com.hotbitmapgg.rxzhihu.R; 8 | 9 | import android.support.v7.widget.RecyclerView; 10 | import android.view.LayoutInflater; 11 | import android.view.View; 12 | import android.view.ViewGroup; 13 | import android.widget.ImageView; 14 | import android.widget.TextView; 15 | 16 | /** 17 | * Created by hcc on 2016/12/28 13:35 18 | * 100332338@qq.com 19 | * LeisureRead 20 | * 21 | * @HotBitmapGG 专栏详情Adapter 22 | */ 23 | public class SectionsDetailsAdapter 24 | extends AbsRecyclerViewAdapter { 25 | 26 | public SectionsDetailsAdapter(RecyclerView recyclerView) { 27 | 28 | super(recyclerView); 29 | } 30 | 31 | 32 | @Override 33 | public ClickableViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 34 | 35 | bindContext(parent.getContext()); 36 | return new ItemViewHolder( 37 | LayoutInflater.from(getContext()).inflate(R.layout.item_sections_details, parent, false)); 38 | } 39 | 40 | 41 | @Override 42 | public void onBindViewHolder(ClickableViewHolder holder, int position) { 43 | 44 | if (holder instanceof ItemViewHolder) { 45 | ItemViewHolder itemViewHolder = (ItemViewHolder) holder; 46 | SectionsDetailsInfo.StoriesBean storiesBean = mDataSources.get(position); 47 | 48 | Glide.with(getContext()) 49 | .load(storiesBean.getImages().get(0)) 50 | .centerCrop() 51 | .diskCacheStrategy(DiskCacheStrategy.ALL) 52 | .placeholder(R.drawable.account_avatar) 53 | .into(itemViewHolder.mImageView); 54 | 55 | itemViewHolder.mTitle.setText(storiesBean.getTitle()); 56 | itemViewHolder.mTime.setText(storiesBean.getDisplay_date()); 57 | } 58 | super.onBindViewHolder(holder, position); 59 | } 60 | 61 | 62 | public void addData(SectionsDetailsInfo.StoriesBean info) { 63 | 64 | mDataSources.add(info); 65 | this.notifyDataSetChanged(); 66 | } 67 | 68 | 69 | public class ItemViewHolder extends ClickableViewHolder { 70 | 71 | public ImageView mImageView; 72 | 73 | public TextView mTitle; 74 | 75 | public TextView mTime; 76 | 77 | 78 | public ItemViewHolder(View itemView) { 79 | 80 | super(itemView); 81 | mImageView = $(R.id.item_image); 82 | mTitle = $(R.id.item_title); 83 | mTime = $(R.id.item_time); 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/utils/NetWorkUtil.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.utils; 2 | 3 | import com.hotbitmapgg.leisureread.LeisureReadApp; 4 | 5 | import android.content.Context; 6 | import android.net.ConnectivityManager; 7 | import android.net.NetworkInfo; 8 | 9 | /** 10 | * Created by hcc on 2016/12/28 13:35 11 | * 100332338@qq.com 12 | * LeisureRead 13 | * 14 | * @HotBitmapGG 网络工具类 15 | */ 16 | public class NetWorkUtil { 17 | 18 | private NetWorkUtil() { 19 | 20 | } 21 | 22 | 23 | public static boolean isNetworkConnected() { 24 | 25 | if (LeisureReadApp.getAppContext() != null) { 26 | ConnectivityManager mConnectivityManager 27 | = (ConnectivityManager) LeisureReadApp.getAppContext() 28 | .getSystemService(Context.CONNECTIVITY_SERVICE); 29 | NetworkInfo mNetworkInfo = mConnectivityManager.getActiveNetworkInfo(); 30 | if (mNetworkInfo != null) { 31 | return mNetworkInfo.isAvailable(); 32 | } 33 | } 34 | return false; 35 | } 36 | 37 | 38 | public static boolean isWifiConnected() { 39 | 40 | if (LeisureReadApp.getAppContext() != null) { 41 | ConnectivityManager mConnectivityManager 42 | = (ConnectivityManager) LeisureReadApp.getAppContext() 43 | .getSystemService(Context.CONNECTIVITY_SERVICE); 44 | NetworkInfo mWiFiNetworkInfo = mConnectivityManager.getNetworkInfo( 45 | ConnectivityManager.TYPE_WIFI); 46 | if (mWiFiNetworkInfo != null) { 47 | return mWiFiNetworkInfo.isAvailable(); 48 | } 49 | } 50 | return false; 51 | } 52 | 53 | 54 | public static boolean isMobileConnected() { 55 | 56 | if (LeisureReadApp.getAppContext() != null) { 57 | ConnectivityManager mConnectivityManager 58 | = (ConnectivityManager) LeisureReadApp.getAppContext() 59 | .getSystemService(Context.CONNECTIVITY_SERVICE); 60 | NetworkInfo mMobileNetworkInfo = mConnectivityManager 61 | .getNetworkInfo(ConnectivityManager.TYPE_MOBILE); 62 | if (mMobileNetworkInfo != null) { 63 | return mMobileNetworkInfo.isAvailable(); 64 | } 65 | } 66 | return false; 67 | } 68 | 69 | 70 | public static int getConnectedType() { 71 | 72 | if (LeisureReadApp.getAppContext() != null) { 73 | ConnectivityManager mConnectivityManager 74 | = (ConnectivityManager) LeisureReadApp.getAppContext() 75 | .getSystemService(Context.CONNECTIVITY_SERVICE); 76 | NetworkInfo mNetworkInfo = mConnectivityManager.getActiveNetworkInfo(); 77 | if (mNetworkInfo != null && mNetworkInfo.isAvailable()) { 78 | return mNetworkInfo.getType(); 79 | } 80 | } 81 | return -1; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /app/src/main/java/com/hotbitmapgg/leisureread/network/api/ApiService.java: -------------------------------------------------------------------------------- 1 | package com.hotbitmapgg.leisureread.network.api; 2 | 3 | import com.hotbitmapgg.leisureread.mvp.model.entity.DailyCommentInfo; 4 | import com.hotbitmapgg.leisureread.mvp.model.entity.DailyDetailsInfo; 5 | import com.hotbitmapgg.leisureread.mvp.model.entity.DailyExtraMessageInfo; 6 | import com.hotbitmapgg.leisureread.mvp.model.entity.DailyInfo; 7 | import com.hotbitmapgg.leisureread.mvp.model.entity.SectionsInfo; 8 | import com.hotbitmapgg.leisureread.mvp.model.entity.ThemeDailyInfo; 9 | import com.hotbitmapgg.leisureread.mvp.model.entity.SectionsDetailsInfo; 10 | import com.hotbitmapgg.leisureread.mvp.model.entity.ThemeDetailsInfo; 11 | import retrofit2.http.GET; 12 | import retrofit2.http.Path; 13 | import rx.Observable; 14 | 15 | /** 16 | * Created by hcc on 2016/12/28 13:35 17 | * 100332338@qq.com 18 | * LeisureRead 19 | * 20 | * @HotBitmapGG 知乎日报Api 21 | */ 22 | public interface ApiService { 23 | 24 | /** 25 | * 获取最新的日报数据 26 | */ 27 | @GET("stories/latest") 28 | Observable getlatestNews(); 29 | 30 | /** 31 | * 根据时间获取对应的日报数据 32 | */ 33 | @GET("stories/before/{date}") 34 | Observable getBeforeNews(@Path("date") String date); 35 | 36 | /** 37 | * 获取日报详情数据 38 | */ 39 | @GET("story/{id}") 40 | Observable getNewsDetails(@Path("id") int id); 41 | 42 | /** 43 | * 获取专题日报 44 | */ 45 | @GET("themes") 46 | Observable getDailyType(); 47 | 48 | /** 49 | * 根据id查询主题日报内容 50 | */ 51 | @GET("theme/{id}") 52 | Observable getThemesDetailsById(@Path("id") int id); 53 | 54 | /** 55 | * 根据id查询日报的额外信息 56 | */ 57 | @GET("story-extra/{id}") 58 | Observable getDailyExtraMessageById(@Path("id") int id); 59 | 60 | /** 61 | * 根据id查询日报的长评论 62 | */ 63 | @GET("story/{id}/long-comments") 64 | Observable getDailyLongComment(@Path("id") int id); 65 | 66 | /** 67 | * 根据id查询日报的短评论 68 | */ 69 | @GET("story/{id}/short-comments") 70 | Observable getDailyShortComment(@Path("id") int id); 71 | 72 | /** 73 | * 获取知乎专栏数据 74 | */ 75 | @GET("sections") 76 | Observable getZhiHuSections(); 77 | 78 | /** 79 | * 获取专栏详情数据 80 | */ 81 | @GET("section/{id}") 82 | Observable getSectionsDetails(@Path("id") int id); 83 | 84 | /** 85 | * 获取专栏的之前消息 86 | */ 87 | @GET("section/{id}/before/{timestamp}") 88 | Observable getBeforeSectionsDetails( 89 | @Path("id") int id, @Path("timestamp") long timestamp); 90 | } 91 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | 92 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_comment.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 25 | 26 | 34 | 35 | 44 | 45 | 55 | 56 | 65 | 66 | 71 | 72 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_feedback.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 19 | 20 | 24 | 25 | 31 | 32 | 46 | 47 | 56 | 57 | 58 | 62 | 63 |