├── .gitignore
├── .idea
├── .gitignore
├── codeStyles
│ ├── Project.xml
│ └── codeStyleConfig.xml
├── dbnavigator.xml
├── deploymentTargetSelector.xml
├── git_toolbox_blame.xml
├── git_toolbox_prj.xml
├── inspectionProfiles
│ └── Project_Default.xml
├── kotlinc.xml
├── other.xml
├── render.experimental.xml
└── runConfigurations.xml
├── LICENSE
├── NOTE.md
├── README.md
├── Screenshot
├── s1.webp
├── s2.webp
├── s3.webp
├── s4.webp
├── s5.webp
├── s6.webp
├── s7.webp
├── s8.webp
└── s9.webp
├── Update
└── updateinfo.json
├── app
├── .gitignore
├── build.gradle.kts
├── proguard-rules.pro
├── retrofit2.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── shizq
│ │ └── bika
│ │ ├── BIKAApplication.kt
│ │ ├── adapter
│ │ ├── CategoriesAdapter.kt
│ │ ├── ChatMessageMultiAdapter.kt
│ │ ├── ChatMessageOldAdapter.kt
│ │ ├── ChatRoomBlackListAdapter.kt
│ │ ├── ChatRoomListAdapter.kt
│ │ ├── ChatRoomListOldAdapter.kt
│ │ ├── CollectionsAdapter.kt
│ │ ├── CollectionsItemAdapter.kt
│ │ ├── ComicListAdapter.kt
│ │ ├── ComicListAdapter2.kt
│ │ ├── CommentsAdapter.kt
│ │ ├── EpisodeAdapter.kt
│ │ ├── GameScreenshotAdapter.kt
│ │ ├── GamesAdapter.kt
│ │ ├── HistoryAdapter.kt
│ │ ├── KnightAdapter.kt
│ │ ├── MyCommentsAdapter.kt
│ │ ├── NotificationsAdapter.kt
│ │ ├── PicaAppsAdapter.kt
│ │ ├── ReaderAdapter.kt
│ │ ├── RecommendAdapter.kt
│ │ ├── ViewPagerAdapter.kt
│ │ └── holder
│ │ │ ├── ChatMessageReceiveHolder.kt
│ │ │ ├── ChatMessageSendHolder.kt
│ │ │ └── ChatMessageSystemHolder.kt
│ │ ├── base
│ │ ├── BaseActivity.kt
│ │ ├── BaseBindingAdapter.java
│ │ ├── BaseBindingHolder.java
│ │ ├── BaseFragment.kt
│ │ ├── BaseViewModel.kt
│ │ └── IBaseView.kt
│ │ ├── bean
│ │ ├── ActionBean.kt
│ │ ├── CategoriesBean.kt
│ │ ├── ChatMessageBean.kt
│ │ ├── ChatMessageOldBean.kt
│ │ ├── ChatRoomBlackListBean.kt
│ │ ├── ChatRoomBlackListDeleteBean.kt
│ │ ├── ChatRoomBlockUserBean.kt
│ │ ├── ChatRoomListBean.kt
│ │ ├── ChatRoomListOldBean.kt
│ │ ├── ChatRoomProfileBean.kt
│ │ ├── ChatRoomSignInBean.kt
│ │ ├── CollectionsBean.kt
│ │ ├── ComicInfoBean.kt
│ │ ├── ComicListBean.kt
│ │ ├── ComicListBean2.kt
│ │ ├── ComicsPictureBean.kt
│ │ ├── CommentsBean.kt
│ │ ├── EpisodeBean.kt
│ │ ├── GameInfoBean.kt
│ │ ├── GamesBean.kt
│ │ ├── InitBean.kt
│ │ ├── KeywordsBean.kt
│ │ ├── KnightBean.kt
│ │ ├── MyCommentsBean.kt
│ │ ├── NotificationsBean.kt
│ │ ├── PicaAppsBean.kt
│ │ ├── PicaInitBean.kt
│ │ ├── ProfileBean.kt
│ │ ├── PunchInBean.kt
│ │ ├── RecommendBean.kt
│ │ ├── ReportBean.kt
│ │ ├── SignInBean.kt
│ │ └── UpdateBean.kt
│ │ ├── database
│ │ ├── BikaDatabase.kt
│ │ ├── dao
│ │ │ ├── HistoryDao.kt
│ │ │ └── SearchDao.kt
│ │ └── model
│ │ │ ├── HistoryEntity.kt
│ │ │ └── SearchEntity.kt
│ │ ├── network
│ │ ├── ApiService.kt
│ │ ├── HmacSHA256Util.java
│ │ ├── HttpDns.kt
│ │ ├── JsonUtil.kt
│ │ ├── Result.kt
│ │ ├── RetrofitUtil.kt
│ │ ├── base
│ │ │ ├── BaseHeaders.kt
│ │ │ ├── BaseObserver.kt
│ │ │ └── BaseResponse.java
│ │ └── websocket
│ │ │ ├── ChatWebSocketManager.java
│ │ │ ├── IReceiveMessage.java
│ │ │ └── WebSocketManager.java
│ │ ├── service
│ │ ├── ChatWebSocketService.kt
│ │ └── ChatWebSocketServiceOld.kt
│ │ ├── ui
│ │ ├── account
│ │ │ ├── AccountActivity.kt
│ │ │ └── AccountViewModel.kt
│ │ ├── apps
│ │ │ ├── AppsActivity.kt
│ │ │ ├── AppsFragment.kt
│ │ │ ├── AppsFragmentViewModel.kt
│ │ │ ├── AppsRepository.kt
│ │ │ └── AppsViewModel.kt
│ │ ├── chatroom
│ │ │ ├── current
│ │ │ │ ├── ChatRoomActivity.kt
│ │ │ │ ├── ChatRoomViewModel.kt
│ │ │ │ ├── blacklist
│ │ │ │ │ ├── ChatBlacklistActivity.kt
│ │ │ │ │ ├── ChatBlacklistRepository.kt
│ │ │ │ │ └── ChatBlacklistViewModel.kt
│ │ │ │ └── roomlist
│ │ │ │ │ ├── ChatRoomListActivity.kt
│ │ │ │ │ ├── ChatRoomListRepository.kt
│ │ │ │ │ └── ChatRoomListViewModel.kt
│ │ │ └── old
│ │ │ │ ├── ChatRoomActivity.kt
│ │ │ │ └── ChatRoomViewModel.kt
│ │ ├── collections
│ │ │ ├── CollectionsActivity.kt
│ │ │ ├── CollectionsRepository.kt
│ │ │ └── CollectionsViewModel.kt
│ │ ├── comicinfo
│ │ │ ├── ComicInfoActivity.kt
│ │ │ ├── ComicInfoRepository.kt
│ │ │ └── ComicInfoViewModel.kt
│ │ ├── comiclist
│ │ │ ├── ComicListActivity.kt
│ │ │ ├── ComicListRepository.kt
│ │ │ └── ComicListViewModel.kt
│ │ ├── comment
│ │ │ ├── CommentsActivity.kt
│ │ │ ├── CommentsRepository.kt
│ │ │ └── CommentsViewModel.kt
│ │ ├── games
│ │ │ ├── GameInfoActivity.kt
│ │ │ ├── GameInfoViewModel.kt
│ │ │ ├── GamesActivity.kt
│ │ │ └── GamesViewModel.kt
│ │ ├── history
│ │ │ ├── HistoryActivity.kt
│ │ │ └── HistoryViewModel.kt
│ │ ├── image
│ │ │ ├── ImageActivity.kt
│ │ │ └── ImageViewModel.kt
│ │ ├── leaderboard
│ │ │ ├── LeaderboardActivity.kt
│ │ │ ├── LeaderboardDayFragment.kt
│ │ │ ├── LeaderboardDayViewModel.kt
│ │ │ ├── LeaderboardKnightFragment.kt
│ │ │ ├── LeaderboardKnightViewModel.kt
│ │ │ └── LeaderboardViewModel.kt
│ │ ├── main
│ │ │ ├── MainActivity.kt
│ │ │ └── MainViewModel.kt
│ │ ├── mycomments
│ │ │ ├── MyCommentsActivity.kt
│ │ │ └── MyCommentsViewModel.kt
│ │ ├── notifications
│ │ │ ├── NotificationsActivity.kt
│ │ │ └── NotificationsViewModel.kt
│ │ ├── reader
│ │ │ ├── ReaderActivity.kt
│ │ │ └── ReaderViewModel.kt
│ │ ├── search
│ │ │ ├── SearchActivity.kt
│ │ │ └── SearchViewModel.kt
│ │ ├── settings
│ │ │ ├── SettingsActivity.kt
│ │ │ ├── SettingsPreferenceFragment.kt
│ │ │ └── SettingsViewModel.kt
│ │ ├── signin
│ │ │ ├── SignInFragment.kt
│ │ │ └── SignInViewModel.kt
│ │ ├── signup
│ │ │ ├── SignUpFragment.kt
│ │ │ └── SignUpViewModel.kt
│ │ ├── splash
│ │ │ ├── SplashActivity.kt
│ │ │ └── SplashViewModel.kt
│ │ └── user
│ │ │ ├── UserActivity.kt
│ │ │ └── UserViewModel.kt
│ │ ├── utils
│ │ ├── AndroidBug5497Workaround.java
│ │ ├── AppVersion.kt
│ │ ├── Base64Util.kt
│ │ ├── Dimension.kt
│ │ ├── GlideCacheUtil.java
│ │ ├── GlideEngine.java
│ │ ├── GlideModuleOkHttp.kt
│ │ ├── GlideUrlNewKey.kt
│ │ ├── SPUtil.kt
│ │ ├── StatusBarUtil.java
│ │ └── TimeUtil.kt
│ │ └── widget
│ │ ├── IconTextSpan.java
│ │ ├── InputTextMsgDialog.java
│ │ ├── OutlineSpan.kt
│ │ ├── PageIndicatorTextView.kt
│ │ ├── SpacesItemDecoration.java
│ │ ├── TouchImageView.java
│ │ └── UserViewDialog.kt
│ └── res
│ ├── anim
│ ├── anim_enter_from_bottom.xml
│ └── anim_exit_from_bottom.xml
│ ├── drawable
│ ├── bika.webp
│ ├── cat_forum.webp
│ ├── cat_game.webp
│ ├── cat_latest.webp
│ ├── cat_leaderboard.webp
│ ├── cat_love_pica.webp
│ ├── cat_random.webp
│ ├── ic_applications.xml
│ ├── ic_arrow_down.xml
│ ├── ic_arrow_drop_down.xml
│ ├── ic_arrow_forward.xml
│ ├── ic_arrow_up.xml
│ ├── ic_back.xml
│ ├── ic_bookmark_add.xml
│ ├── ic_bookmark_check.xml
│ ├── ic_bookmarks.xml
│ ├── ic_chat.webp
│ ├── ic_chat_24.xml
│ ├── ic_close.xml
│ ├── ic_delete.xml
│ ├── ic_delete_sweep.xml
│ ├── ic_edit.xml
│ ├── ic_error.xml
│ ├── ic_exit.xml
│ ├── ic_favorite_24.xml
│ ├── ic_favorite_border_24.xml
│ ├── ic_github.xml
│ ├── ic_group_work.xml
│ ├── ic_history.xml
│ ├── ic_home.xml
│ ├── ic_hotel_class.xml
│ ├── ic_key.xml
│ ├── ic_keyboard.xml
│ ├── ic_keyboard_voice.xml
│ ├── ic_launcher_foreground.xml
│ ├── ic_list.xml
│ ├── ic_mail.xml
│ ├── ic_menu.xml
│ ├── ic_night.xml
│ ├── ic_photo_camera.xml
│ ├── ic_punch.xml
│ ├── ic_search.xml
│ ├── ic_security.xml
│ ├── ic_settings_24.xml
│ ├── ic_sort.xml
│ ├── ic_voice_1.xml
│ ├── ic_voice_2.xml
│ ├── ic_widgets.xml
│ ├── p.webp
│ ├── placeholder_avatar.png
│ ├── placeholder_avatar_2.webp
│ ├── placeholder_transparent.webp
│ ├── placeholder_transparent_low.png
│ ├── shape_chat_bg.xml
│ ├── shape_chat_notification_bg.xml
│ ├── shape_chat_reply_bg.xml
│ ├── shape_chat_send_bg.xml
│ ├── shape_title_bg.xml
│ ├── verified_icon.webp
│ └── voice.xml
│ ├── layout
│ ├── activity_account.xml
│ ├── activity_apps.xml
│ ├── activity_chat_room.xml
│ ├── activity_chat_room_blacklist.xml
│ ├── activity_chat_room_list.xml
│ ├── activity_chat_room_old.xml
│ ├── activity_collections.xml
│ ├── activity_comicinfo.xml
│ ├── activity_comiclist.xml
│ ├── activity_comments.xml
│ ├── activity_game_info.xml
│ ├── activity_games.xml
│ ├── activity_history.xml
│ ├── activity_image.xml
│ ├── activity_leaderboard.xml
│ ├── activity_main.xml
│ ├── activity_my_comments.xml
│ ├── activity_notifications.xml
│ ├── activity_reader.xml
│ ├── activity_search.xml
│ ├── activity_settings.xml
│ ├── activity_splash.xml
│ ├── activity_user.xml
│ ├── dialog_input_text_msg.xml
│ ├── fragment_apps.xml
│ ├── fragment_leaderboard_day.xml
│ ├── fragment_leaderboard_knight.xml
│ ├── fragment_signin.xml
│ ├── fragment_signup.xml
│ ├── item_categories.xml
│ ├── item_categories_skeleton.xml
│ ├── item_chat_message_old.xml
│ ├── item_chat_message_receive.xml
│ ├── item_chat_message_send.xml
│ ├── item_chat_message_system.xml
│ ├── item_chat_room_blacklist.xml
│ ├── item_chat_room_list.xml
│ ├── item_chat_room_list_old.xml
│ ├── item_chip_at.xml
│ ├── item_collections.xml
│ ├── item_comiclist.xml
│ ├── item_comiclist2.xml
│ ├── item_comiclist_skeleton.xml
│ ├── item_comments.xml
│ ├── item_episode.xml
│ ├── item_episode_footer_view.xml
│ ├── item_game_screenshot.xml
│ ├── item_games.xml
│ ├── item_games_skeleton.xml
│ ├── item_histroy.xml
│ ├── item_knight.xml
│ ├── item_knight_skeleton.xml
│ ├── item_main_drawer_header.xml
│ ├── item_my_comments.xml
│ ├── item_notifications.xml
│ ├── item_picaapps.xml
│ ├── item_picture.xml
│ ├── item_recommend.xml
│ ├── view_bottom_sub_comments.xml
│ ├── view_chip.xml
│ ├── view_dialog_edit_text.xml
│ ├── view_dialog_edit_text_answer.xml
│ ├── view_dialog_edit_text_change_password.xml
│ ├── view_dialog_edit_text_change_password_old.xml
│ ├── view_dialog_edit_text_slogan.xml
│ ├── view_dialog_user.xml
│ ├── view_load.xml
│ ├── view_popup_image.xml
│ ├── view_preference_switch.xml
│ └── view_toolbar.xml
│ ├── menu
│ ├── activity_main_drawer.xml
│ ├── activity_sigup_gender.xml
│ ├── toolbar_menu_chat.xml
│ ├── toolbar_menu_chat2.xml
│ ├── toolbar_menu_comicinfo.xml
│ ├── toolbar_menu_comiclist.xml
│ ├── toolbar_menu_comiclist_sort.xml
│ ├── toolbar_menu_comiclist_sort2.xml
│ ├── toolbar_menu_gameinfo.xml
│ ├── toolbar_menu_history.xml
│ ├── toolbar_menu_main.xml
│ └── toolbar_menu_reader.xml
│ ├── mipmap-anydpi-v26
│ ├── ic_launcher.xml
│ └── ic_launcher_round.xml
│ ├── mipmap-hdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-mdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── navigation
│ └── nav_login.xml
│ ├── transition
│ └── change_bounds.xml
│ ├── values-land
│ └── dimens.xml
│ ├── values-night-v31
│ └── themes.xml
│ ├── values-night
│ └── themes.xml
│ ├── values-v31
│ └── themes.xml
│ ├── values-v34
│ └── dimens.xml
│ ├── values
│ ├── array.xml
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── themes.xml
│ └── xml
│ ├── backup_rules.xml
│ ├── data_extraction_rules.xml
│ ├── network_security_config.xml
│ └── settings_preferences.xml
├── build.gradle.kts
├── gradle.properties
├── gradle
├── libs.versions.toml
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle.kts
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | /detekt.xml
5 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/deploymentTargetSelector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/git_toolbox_blame.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/git_toolbox_prj.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/kotlinc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/other.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/render.experimental.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/NOTE.md:
--------------------------------------------------------------------------------
1 | #未完成
2 |
3 | 漫画详情章节观看记录
4 | 漫画详情章节图片观看记录
5 | 漫画阅读器
6 | 聊天室发送语音
7 | 子评论页加进度条
8 | 哔咔新的聊天室
9 |
10 | 未来适配平板
11 | 未来添加漫画下载
12 | 添加转场动画
13 |
14 | #待优化
15 |
16 | 注册页面 需要优化 跳转到登录页要显示注册的账号密码
17 | 回退键
18 | 设置页太乱
19 | 历史记录需要优化
20 | 更改密码 需要添加进度条
21 | 优化activity 转成fragment
22 | 图片修剪工具不是很好用
23 | 上传头像的锯齿较多不清晰
24 | 主题切换livedata会重复加载
25 |
26 | #服务器状态
27 |
28 | 400 1019 cannot comment 无法发表评论
29 | 400 1031 higher level is required 评论等级不够
30 | 400 1002 avatar invalid base64 image 无效的base64图像
31 | 400 1004 账号密码错误
32 | 400 1008 email is already exist 邮箱已存在
33 | 400 1009 name is already exist 名称已存在
34 | 400 1014 漫画审核中
35 | 401 1005 unauthorized token过期
36 | 404 1007 not found 找不到数据
37 | 413 request entity too large 图片上传太大
38 | 500 :( --
39 |
40 | #旧聊天室 webSocket
41 |
42 | 0 连接成功
43 | 2 心跳包 服务器会回复 3
44 | 40 连接成功
45 | 41 关闭聊天
46 | 42 消息
47 | 1000 超时
48 |
--------------------------------------------------------------------------------
/Screenshot/s1.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizq123/BIKA/e2931812ebcc07f17871396a1ddd86aabb9f77e8/Screenshot/s1.webp
--------------------------------------------------------------------------------
/Screenshot/s2.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizq123/BIKA/e2931812ebcc07f17871396a1ddd86aabb9f77e8/Screenshot/s2.webp
--------------------------------------------------------------------------------
/Screenshot/s3.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizq123/BIKA/e2931812ebcc07f17871396a1ddd86aabb9f77e8/Screenshot/s3.webp
--------------------------------------------------------------------------------
/Screenshot/s4.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizq123/BIKA/e2931812ebcc07f17871396a1ddd86aabb9f77e8/Screenshot/s4.webp
--------------------------------------------------------------------------------
/Screenshot/s5.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizq123/BIKA/e2931812ebcc07f17871396a1ddd86aabb9f77e8/Screenshot/s5.webp
--------------------------------------------------------------------------------
/Screenshot/s6.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizq123/BIKA/e2931812ebcc07f17871396a1ddd86aabb9f77e8/Screenshot/s6.webp
--------------------------------------------------------------------------------
/Screenshot/s7.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizq123/BIKA/e2931812ebcc07f17871396a1ddd86aabb9f77e8/Screenshot/s7.webp
--------------------------------------------------------------------------------
/Screenshot/s8.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizq123/BIKA/e2931812ebcc07f17871396a1ddd86aabb9f77e8/Screenshot/s8.webp
--------------------------------------------------------------------------------
/Screenshot/s9.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizq123/BIKA/e2931812ebcc07f17871396a1ddd86aabb9f77e8/Screenshot/s9.webp
--------------------------------------------------------------------------------
/Update/updateinfo.json:
--------------------------------------------------------------------------------
1 | {
2 | "code": 6,
3 | "name": "1.0.5",
4 | "url": "https://zquan.lanzoue.com/b00zguxje",
5 | "des": "",
6 | "size": "0"
7 | }
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /release
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | -keep class com.luck.picture.lib.** { *; }
2 | -dontwarn com.yalantis.ucrop**
3 | -keep class com.yalantis.ucrop** { *; }
4 | -keep interface com.yalantis.ucrop** { *; }
5 |
6 | -keep class com.shizq.bika.network.base.BaseResponse {*;}
7 | -keep class com.shizq.bika.bean.** {*;}
8 | -keep class com.shizq.bika.base.** {*;}
9 |
--------------------------------------------------------------------------------
/app/retrofit2.pro:
--------------------------------------------------------------------------------
1 | # Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
2 | # EnclosingMethod is required to use InnerClasses.
3 | -keepattributes Signature, InnerClasses, EnclosingMethod
4 |
5 | # Retrofit does reflection on method and parameter annotations.
6 | -keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
7 |
8 | # Keep annotation default values (e.g., retrofit2.http.Field.encoded).
9 | -keepattributes AnnotationDefault
10 |
11 | # Retain service method parameters when optimizing.
12 | -keepclassmembers,allowshrinking,allowobfuscation interface * {
13 | @retrofit2.http.* ;
14 | }
15 |
16 | # Ignore annotation used for build tooling.
17 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
18 |
19 | # Ignore JSR 305 annotations for embedding nullability information.
20 | -dontwarn javax.annotation.**
21 |
22 | # Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
23 | -dontwarn kotlin.Unit
24 |
25 | # Top-level functions that can only be used by Kotlin.
26 | -dontwarn retrofit2.KotlinExtensions
27 | -dontwarn retrofit2.KotlinExtensions$*
28 |
29 | # With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
30 | # and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
31 | -if interface * { @retrofit2.http.* ; }
32 | -keep,allowobfuscation interface <1>
33 |
34 | # Keep inherited services.
35 | -if interface * { @retrofit2.http.* ; }
36 | -keep,allowobfuscation interface * extends <1>
37 |
38 | # With R8 full mode generic signatures are stripped for classes that are not
39 | # kept. Suspend functions are wrapped in continuations where the type argument
40 | # is used.
41 | -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
42 |
43 | # R8 full mode strips generic signatures from return types if not kept.
44 | -if interface * { @retrofit2.http.* public *** *(...); }
45 | -keep,allowoptimization,allowshrinking,allowobfuscation class <3>
46 |
47 | # With R8 full mode generic signatures are stripped for classes that are not kept.
48 | -keep,allowobfuscation,allowshrinking class retrofit2.Response
49 |
--------------------------------------------------------------------------------
/app/src/main/java/com/shizq/bika/BIKAApplication.kt:
--------------------------------------------------------------------------------
1 | package com.shizq.bika
2 |
3 | import android.annotation.SuppressLint
4 | import android.app.Application
5 | import androidx.appcompat.app.AppCompatDelegate
6 | import com.google.android.material.color.DynamicColors
7 | import com.shizq.bika.utils.SPUtil
8 |
9 | class BIKAApplication : Application() {
10 |
11 | companion object {
12 | @SuppressLint("StaticFieldLeak")
13 | lateinit var contextBase: Application
14 | }
15 |
16 | override fun onCreate() {
17 | super.onCreate()
18 | contextBase = this
19 | DynamicColors.applyToActivitiesIfAvailable(this)//根据壁纸修改App主题颜色
20 |
21 | SPUtil.init(this)
22 | val nightMode = SPUtil.get("setting_night", "跟随系统") as String
23 | AppCompatDelegate.setDefaultNightMode(
24 | when (nightMode) {
25 | "开启" -> AppCompatDelegate.MODE_NIGHT_YES
26 | "关闭" -> AppCompatDelegate.MODE_NIGHT_NO
27 | "跟随系统" -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
28 | else -> AppCompatDelegate.MODE_NIGHT_NO
29 | }
30 | )
31 | }
32 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shizq/bika/adapter/CategoriesAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.shizq.bika.adapter
2 | import com.shizq.bika.R
3 | import com.shizq.bika.base.BaseBindingAdapter
4 | import com.shizq.bika.base.BaseBindingHolder
5 | import com.shizq.bika.bean.CategoriesBean
6 | import com.shizq.bika.databinding.ItemCategoriesBinding
7 | import com.bumptech.glide.Glide
8 | import com.shizq.bika.utils.GlideUrlNewKey
9 |
10 | //分类
11 | class CategoriesAdapter :
12 | BaseBindingAdapter(R.layout.item_categories) {
13 |
14 | override fun bindView(
15 | holder: BaseBindingHolder<*, *>,
16 | bean: CategoriesBean.Category,
17 | binding: ItemCategoriesBinding,
18 | position: Int
19 | ) {
20 | Glide.with(holder.itemView)
21 | .load(
22 | //判断是否是手动添加的数据
23 | if (bean.imageRes == null) {
24 | //哔咔服务器问题 需自行修改图片请求路径
25 | GlideUrlNewKey("https://s3.picacomic.com", bean.thumb.path)
26 | } else {
27 | bean.imageRes
28 | }
29 | )
30 | .centerCrop()
31 | .placeholder(R.drawable.placeholder_transparent)
32 | .into(binding.categoriesItemImage)
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shizq/bika/adapter/ChatRoomBlackListAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.shizq.bika.adapter
2 |
3 | import com.shizq.bika.R
4 | import com.shizq.bika.base.BaseBindingAdapter
5 | import com.shizq.bika.base.BaseBindingHolder
6 | import com.shizq.bika.bean.ChatRoomBlackListBean
7 | import com.shizq.bika.databinding.ItemChatRoomBlacklistBinding
8 | import com.bumptech.glide.Glide
9 |
10 | //新聊天室黑名单
11 | class ChatRoomBlackListAdapter :
12 | BaseBindingAdapter(R.layout.item_chat_room_blacklist) {
13 |
14 | override fun bindView(
15 | holder: BaseBindingHolder<*, *>,
16 | bean: ChatRoomBlackListBean.Doc,
17 | binding: ItemChatRoomBlacklistBinding,
18 | position: Int
19 | ) {
20 |
21 | Glide.with(holder.itemView)
22 | .load(bean.user.avatarUrl)
23 | .placeholder(R.drawable.placeholder_avatar_2)
24 | .into(binding.chatBlacklistAvatar)
25 |
26 | holder.addOnClickListener(R.id.chat_blacklist_delete)
27 |
28 | }
29 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shizq/bika/adapter/ChatRoomListAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.shizq.bika.adapter
2 |
3 | import com.shizq.bika.R
4 | import com.shizq.bika.base.BaseBindingAdapter
5 | import com.shizq.bika.base.BaseBindingHolder
6 | import com.shizq.bika.bean.ChatRoomListBean
7 | import com.shizq.bika.databinding.ItemChatRoomListBinding
8 | import com.bumptech.glide.Glide
9 |
10 | //新聊天室列表
11 | class ChatRoomListAdapter :
12 | BaseBindingAdapter(R.layout.item_chat_room_list) {
13 |
14 | override fun bindView(
15 | holder: BaseBindingHolder<*, *>,
16 | bean: ChatRoomListBean.Room,
17 | binding: ItemChatRoomListBinding,
18 | position: Int
19 | ) {
20 |
21 | Glide.with(holder.itemView)
22 | .load(bean.icon)
23 | .placeholder(R.drawable.placeholder_avatar_2)
24 | .into(binding.chatRoomsImage)
25 |
26 | }
27 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shizq/bika/adapter/ChatRoomListOldAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.shizq.bika.adapter
2 |
3 | import com.shizq.bika.R
4 | import com.shizq.bika.base.BaseBindingAdapter
5 | import com.shizq.bika.base.BaseBindingHolder
6 | import com.shizq.bika.bean.ChatRoomListOldBean
7 | import com.shizq.bika.databinding.ItemChatRoomListOldBinding
8 | import com.bumptech.glide.Glide
9 |
10 | //旧聊天室列表
11 | class ChatRoomListOldAdapter :
12 | BaseBindingAdapter(R.layout.item_chat_room_list_old) {
13 |
14 | override fun bindView(
15 | holder: BaseBindingHolder<*, *>,
16 | bean: ChatRoomListOldBean.Chat,
17 | binding: ItemChatRoomListOldBinding,
18 | position: Int
19 | ) {
20 |
21 | Glide.with(holder.itemView)
22 | .load(bean.avatar)
23 | .placeholder(R.drawable.placeholder_avatar_2)
24 | .into(binding.chatListImage)
25 |
26 | }
27 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shizq/bika/adapter/EpisodeAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.shizq.bika.adapter
2 |
3 | import com.shizq.bika.R
4 | import com.shizq.bika.base.BaseBindingAdapter
5 | import com.shizq.bika.base.BaseBindingHolder
6 | import com.shizq.bika.bean.EpisodeBean
7 | import com.shizq.bika.databinding.ItemEpisodeBinding
8 | import com.shizq.bika.utils.TimeUtil
9 |
10 | //漫画片段或章节adapter
11 | class EpisodeAdapter : BaseBindingAdapter(R.layout.item_episode) {
12 |
13 | override fun bindView(
14 | holder: BaseBindingHolder<*, *>,
15 | bean: EpisodeBean.Eps.Doc,
16 | binding: ItemEpisodeBinding,
17 | position: Int
18 | ) {
19 | binding.episodeTitle.text = bean.title
20 | binding.episodeTime.text = TimeUtil().time(bean.updated_at)
21 | }
22 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shizq/bika/adapter/GamesAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.shizq.bika.adapter
2 |
3 | import com.shizq.bika.R
4 | import com.shizq.bika.base.BaseBindingAdapter
5 | import com.shizq.bika.base.BaseBindingHolder
6 | import com.shizq.bika.bean.GamesBean
7 | import com.shizq.bika.databinding.ItemGamesBinding
8 | import com.bumptech.glide.Glide
9 | import com.shizq.bika.utils.GlideUrlNewKey
10 |
11 | class GamesAdapter :
12 | BaseBindingAdapter(R.layout.item_games) {
13 |
14 | override fun bindView(
15 | holder: BaseBindingHolder<*, *>,
16 | bean: GamesBean.Games.Docs,
17 | binding: ItemGamesBinding,
18 | position: Int
19 | ) {
20 | Glide.with(holder.itemView)
21 | .load(GlideUrlNewKey(bean.icon.fileServer, bean.icon.path))
22 | .placeholder(R.drawable.placeholder_avatar_2)
23 | .into(binding.gamesItemImage)
24 | }
25 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shizq/bika/adapter/HistoryAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.shizq.bika.adapter
2 |
3 | import com.shizq.bika.R
4 | import com.shizq.bika.base.BaseBindingAdapter
5 | import com.shizq.bika.base.BaseBindingHolder
6 | import com.shizq.bika.databinding.ItemHistroyBinding
7 | import com.shizq.bika.database.model.HistoryEntity
8 | import com.bumptech.glide.Glide
9 | import com.shizq.bika.utils.GlideUrlNewKey
10 | import com.shizq.bika.utils.TimeUtil
11 |
12 | class HistoryAdapter :
13 | BaseBindingAdapter(R.layout.item_histroy) {
14 |
15 | override fun bindView(
16 | holder: BaseBindingHolder<*, *>,
17 | bean: HistoryEntity,
18 | binding: ItemHistroyBinding,
19 | position: Int
20 | ) {
21 | Glide.with(holder.itemView)
22 | .load(GlideUrlNewKey(bean.fileServer, bean.path))
23 | .placeholder(R.drawable.placeholder_avatar_2)
24 | .into(binding.historyItemImage)
25 | binding.historyItemTime.text = TimeUtil().getDate(bean.time)
26 | }
27 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shizq/bika/adapter/KnightAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.shizq.bika.adapter
2 |
3 | import com.shizq.bika.R
4 | import com.shizq.bika.base.BaseBindingAdapter
5 | import com.shizq.bika.base.BaseBindingHolder
6 | import com.shizq.bika.bean.KnightBean
7 | import com.shizq.bika.databinding.ItemKnightBinding
8 | import com.bumptech.glide.Glide
9 | import com.shizq.bika.utils.GlideUrlNewKey
10 |
11 | class KnightAdapter : BaseBindingAdapter(R.layout.item_knight) {
12 |
13 | override fun bindView(
14 | holder: BaseBindingHolder<*, *>,
15 | bean: KnightBean.Users,
16 | binding: ItemKnightBinding,
17 | position: Int
18 | ) {
19 | //头像
20 | Glide.with(holder.itemView)
21 | .load(
22 | if (bean.avatar != null)
23 | GlideUrlNewKey(bean.avatar.fileServer, bean.avatar.path)
24 | else
25 | R.drawable.placeholder_avatar_2
26 | )
27 | .placeholder(R.drawable.placeholder_avatar_2)
28 | .into(binding.knightUserImage)
29 | //头像框
30 | Glide.with(holder.itemView)
31 | .load(if (bean.character.isNullOrEmpty()) "" else bean.character)
32 | .into(binding.knightUserCharacter)
33 |
34 | holder.addOnClickListener(R.id.knight_user_image_layout)
35 | }
36 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shizq/bika/adapter/PicaAppsAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.shizq.bika.adapter
2 |
3 | import com.shizq.bika.R
4 | import com.shizq.bika.base.BaseBindingAdapter
5 | import com.shizq.bika.base.BaseBindingHolder
6 | import com.shizq.bika.bean.PicaAppsBean
7 | import com.shizq.bika.databinding.ItemPicaappsBinding
8 | import com.bumptech.glide.Glide
9 |
10 | class PicaAppsAdapter :
11 | BaseBindingAdapter(R.layout.item_picaapps) {
12 |
13 | override fun bindView(
14 | holder: BaseBindingHolder<*, *>,
15 | bean: PicaAppsBean.App,
16 | binding: ItemPicaappsBinding,
17 | position: Int
18 | ) {
19 |
20 | Glide.with(holder.itemView)
21 | .load(bean.icon)
22 | .placeholder(R.drawable.placeholder_avatar_2)
23 | .into(binding.picaAppsImage)
24 |
25 | }
26 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shizq/bika/adapter/ViewPagerAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.shizq.bika.adapter
2 |
3 | import androidx.fragment.app.Fragment
4 | import androidx.fragment.app.FragmentManager
5 | import androidx.lifecycle.Lifecycle
6 | import androidx.viewpager2.adapter.FragmentStateAdapter
7 |
8 | class ViewPagerAdapter(
9 | private val list: List,
10 | fragmentManager: FragmentManager,
11 | lifecycle: Lifecycle,
12 | ) : FragmentStateAdapter(fragmentManager, lifecycle) {
13 | override fun createFragment(position: Int): Fragment = list[position]
14 | override fun getItemCount(): Int = list.size
15 |
16 |
17 |
18 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shizq/bika/adapter/holder/ChatMessageSystemHolder.kt:
--------------------------------------------------------------------------------
1 | package com.shizq.bika.adapter.holder
2 |
3 | import android.view.ViewGroup
4 | import com.shizq.bika.base.BaseBindingHolder
5 | import com.shizq.bika.bean.ChatMessageBean
6 | import com.shizq.bika.databinding.ItemChatMessageSystemBinding
7 | import com.shizq.bika.utils.TimeUtil
8 |
9 | //新聊天室 一些通知
10 | class ChatMessageSystemHolder(viewGroup: ViewGroup, layoutId: Int) :
11 | BaseBindingHolder(viewGroup, layoutId) {
12 |
13 | override fun onBindingView(
14 | holder: BaseBindingHolder<*, *>,
15 | bean: ChatMessageBean,
16 | position: Int
17 | ) {
18 | binding.chatNotification.text = when (bean.type) {
19 | "CONNECTED" -> {
20 | TimeUtil().getDate(bean.data.data)
21 | }
22 |
23 | "SYSTEM_MESSAGE" -> {
24 | bean.data.message.message
25 | }
26 |
27 | "TEXT_MESSAGE" -> {
28 | "黑名单消息"
29 | }
30 |
31 | "IMAGE_MESSAGE" -> {
32 | "黑名单消息"
33 | }
34 |
35 | else -> {
36 | "未知消息类型"
37 | }
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shizq/bika/base/BaseBindingHolder.java:
--------------------------------------------------------------------------------
1 | package com.shizq.bika.base;
2 |
3 | import android.view.LayoutInflater;
4 | import android.view.ViewGroup;
5 |
6 | import androidx.annotation.NonNull;
7 | import androidx.databinding.DataBindingUtil;
8 | import androidx.databinding.ViewDataBinding;
9 |
10 | import java.util.List;
11 |
12 | import me.jingbin.library.adapter.BaseByViewHolder;
13 |
14 | /**
15 | * https://github.com/youlookwhat/ByRecyclerView
16 | */
17 | public abstract class BaseBindingHolder extends BaseByViewHolder {
18 |
19 | public final B binding;
20 |
21 | public BaseBindingHolder(ViewGroup viewGroup, int layoutId) {
22 | super(DataBindingUtil.inflate(LayoutInflater.from(viewGroup.getContext()), layoutId, viewGroup, false).getRoot());
23 | binding = DataBindingUtil.getBinding(this.itemView);
24 | }
25 |
26 | @Override
27 | protected void onBaseBindView(BaseByViewHolder holder, T bean, int position) {
28 | onBindingView(this, bean, position);
29 | binding.executePendingBindings();
30 | }
31 |
32 | @Override
33 | protected void onBaseBindViewPayloads(BaseByViewHolder holder, T bean, int position, @NonNull List