├── .github └── workflows │ └── android.yml ├── .gitignore ├── .idea ├── .gitignore ├── compiler.xml ├── gradle.xml ├── jarRepositories.xml ├── misc.xml └── vcs.xml ├── LICENSE ├── PCRTeamAnalyser ├── .gitignore ├── build.gradle └── src │ └── main │ └── java │ └── cn │ └── sun45 │ └── pcrteamanalyser │ ├── analyse │ ├── AnalyseConfig.java │ ├── AnalyseResult.java │ └── Analyser.java │ ├── model │ ├── AnalyseModel.java │ └── AnalyseTeam.java │ └── test │ ├── AnalyseTest.java │ ├── TestResult.java │ └── TestTeam.java ├── README.md ├── README_OLD.md ├── apk └── warbanner-release.apk ├── app ├── .gitignore ├── build.gradle ├── libs │ ├── bcrloglib-release.aar │ └── commons-compress-1.19.jar ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── cn │ │ └── sun45 │ │ └── warbanner │ │ ├── character │ │ └── CharacterHelper.java │ │ ├── clanwar │ │ └── ClanwarHelper.java │ │ ├── combination │ │ ├── CombinationElementModel.java │ │ └── CombinationHelper.java │ │ ├── datamanager │ │ ├── data │ │ │ └── DataManager.java │ │ └── update │ │ │ └── UpdateManager.java │ │ ├── document │ │ ├── database │ │ │ ├── setup │ │ │ │ ├── SetupDao.java │ │ │ │ ├── SetupDataBase.java │ │ │ │ └── models │ │ │ │ │ ├── ScreenCharacterModel.java │ │ │ │ │ ├── TeamCustomizeModel.java │ │ │ │ │ ├── TeamGroupCollectionModel.java │ │ │ │ │ ├── TeamGroupScreenModel.java │ │ │ │ │ ├── TeamGroupScreenUsedCharacterModel.java │ │ │ │ │ ├── TeamListShowModel.java │ │ │ │ │ └── UserModel.java │ │ │ └── source │ │ │ │ ├── SourceDao.java │ │ │ │ ├── SourceDataBase.java │ │ │ │ └── models │ │ │ │ ├── BossModel.java │ │ │ │ ├── CharacterModel.java │ │ │ │ └── TeamModel.java │ │ ├── preference │ │ │ ├── AppPreference.java │ │ │ ├── BossConfigPreference.java │ │ │ ├── DataPreference.java │ │ │ ├── SetupPreference.java │ │ │ └── UserPreference.java │ │ └── statics │ │ │ ├── Locale.java │ │ │ ├── StaticHelper.java │ │ │ ├── TeamType.java │ │ │ └── charactertype │ │ │ ├── CharacterOwnType.java │ │ │ ├── CharacterScreenType.java │ │ │ └── CharacterUseType.java │ │ ├── framework │ │ ├── MyApplication.java │ │ ├── document │ │ │ └── preference │ │ │ │ ├── BasePreference.java │ │ │ │ └── PreferenceManager.java │ │ ├── file │ │ │ ├── FileRequestListener.java │ │ │ ├── FileRequestListenerWithProgress.java │ │ │ └── FileRequester.java │ │ ├── image │ │ │ ├── ImageRequestLoader.java │ │ │ └── ImageRequester.java │ │ ├── logic │ │ │ ├── BaseLogic.java │ │ │ ├── ConverterFactory.java │ │ │ ├── JSONArrayConverter.java │ │ │ ├── JSONObjectConverter.java │ │ │ ├── RequestListener.java │ │ │ └── StringConverter.java │ │ ├── permission │ │ │ ├── PermissionRequestListener.java │ │ │ └── PermissionRequester.java │ │ ├── record │ │ │ ├── BaseRecordManager.java │ │ │ └── ErrorRecordManager.java │ │ └── ui │ │ │ ├── BaseActivity.java │ │ │ ├── BaseFragment.java │ │ │ └── BaseVerticalRecyclerView.java │ │ ├── logic │ │ ├── app │ │ │ ├── AppLogic.java │ │ │ └── AppModel.java │ │ └── caimogu │ │ │ ├── CaimoguBaseData.java │ │ │ └── CaimoguLogic.java │ │ ├── server │ │ └── ServerManager.java │ │ ├── stage │ │ └── StageManager.java │ │ ├── teamgroup │ │ ├── TeamGroupConfigureModel.java │ │ ├── TeamGroupElementModel.java │ │ └── TeamGroupHelper.java │ │ ├── ui │ │ ├── activities │ │ │ └── MainActivity.java │ │ ├── fragments │ │ │ ├── BossDataFragment.java │ │ │ ├── CollectionFragment.java │ │ │ ├── MainFragment.java │ │ │ ├── about │ │ │ │ └── AboutFragment.java │ │ │ ├── character │ │ │ │ └── CharacterScreenFragment.java │ │ │ ├── combination │ │ │ │ ├── CombinationDetailFragment.java │ │ │ │ └── CombinationFragment.java │ │ │ ├── menu │ │ │ │ ├── MenuFragment.java │ │ │ │ └── MenuPreferecefragment.java │ │ │ ├── recalucate │ │ │ │ └── ReCalucateFragment.java │ │ │ ├── record │ │ │ │ ├── RecordFragment.java │ │ │ │ └── RecordTextFragment.java │ │ │ ├── team │ │ │ │ ├── TeamDetailFragment.java │ │ │ │ ├── TeamListFragment.java │ │ │ │ └── TeamSelectFragment.java │ │ │ ├── teamgroup │ │ │ │ ├── TeamGroupDetailFragment.java │ │ │ │ ├── TeamGroupFragment.java │ │ │ │ ├── TeamGroupScreenFragment.java │ │ │ │ └── TeamGroupScreenUsedCharacterFragment.java │ │ │ └── user │ │ │ │ └── UserManagerFragment.java │ │ ├── shared │ │ │ ├── SharedViewModelClanwar.java │ │ │ ├── SharedViewModelSource.java │ │ │ └── SharedViewModelTeamScreenTeam.java │ │ └── views │ │ │ ├── character │ │ │ ├── CharacterScroll.java │ │ │ ├── characterlist │ │ │ │ ├── CharacterListLay.java │ │ │ │ ├── CharacterListLayListener.java │ │ │ │ └── characterlist │ │ │ │ │ ├── CharacterList.java │ │ │ │ │ ├── CharacterListAdapter.java │ │ │ │ │ ├── CharacterListListener.java │ │ │ │ │ └── CharacterListModel.java │ │ │ └── characterview │ │ │ │ └── CharacterView.java │ │ │ ├── combinationlist │ │ │ ├── CombinationGroupModel.java │ │ │ ├── CombinationList.java │ │ │ ├── CombinationListAdapter.java │ │ │ ├── CombinationListListener.java │ │ │ └── CombinationListModel.java │ │ │ ├── listselectbar │ │ │ ├── ListSelectBar.java │ │ │ ├── ListSelectBarListener.java │ │ │ └── ListSelectItem.java │ │ │ ├── portraittextview │ │ │ └── PortraitTextView.java │ │ │ ├── recordlist │ │ │ ├── RecordList.java │ │ │ ├── RecordListAdapter.java │ │ │ ├── RecordListListener.java │ │ │ └── RecordListModel.java │ │ │ ├── selectgroup │ │ │ ├── SelectGroup.java │ │ │ └── SelectGroupListener.java │ │ │ ├── teamdetail │ │ │ └── TeamDetailScroll.java │ │ │ ├── teamgrouplist │ │ │ ├── TeamGroupList.java │ │ │ ├── TeamGroupListAdapter.java │ │ │ ├── TeamGroupListListener.java │ │ │ └── TeamGroupListModel.java │ │ │ ├── teamlist │ │ │ ├── TeamList.java │ │ │ ├── TeamListAdapter.java │ │ │ ├── TeamListBossModel.java │ │ │ ├── TeamListListener.java │ │ │ ├── TeamListReCalucateModel.java │ │ │ ├── TeamListRemarkModel.java │ │ │ └── TeamListTeamModel.java │ │ │ └── userlist │ │ │ ├── UserList.java │ │ │ ├── UserListAdapter.java │ │ │ ├── UserListListener.java │ │ │ └── UserListModel.java │ │ ├── user │ │ └── UserManager.java │ │ └── util │ │ ├── BrotliUtils.java │ │ ├── FileUtil.java │ │ ├── GithubUtils.java │ │ └── Utils.java │ └── res │ ├── anim │ ├── fade_in.xml │ ├── fade_out.xml │ ├── slide_in_left.xml │ ├── slide_in_right.xml │ ├── slide_out_left.xml │ ├── slide_out_right.xml │ ├── zoom_in_enter.xml │ ├── zoom_in_pop.xml │ ├── zoom_out_enter.xml │ └── zoom_out_pop.xml │ ├── drawable-hdpi │ ├── ic_character_default.png │ ├── ic_position_back.png │ ├── ic_position_front.png │ └── ic_position_middle.png │ ├── drawable │ ├── ic_baseline_account_circle_24.xml │ ├── ic_baseline_adb_24.xml │ ├── ic_baseline_add_24.xml │ ├── ic_baseline_arrow_back_24.xml │ ├── ic_baseline_block_24.xml │ ├── ic_baseline_blur_on_24.xml │ ├── ic_baseline_cleaning_services_24.xml │ ├── ic_baseline_cloud_24.xml │ ├── ic_baseline_collections_24.xml │ ├── ic_baseline_delete_24.xml │ ├── ic_baseline_edit_24.xml │ ├── ic_baseline_file_copy_24.xml │ ├── ic_baseline_format_align_justify_24.xml │ ├── ic_baseline_image_24.xml │ ├── ic_baseline_info_24.xml │ ├── ic_baseline_insert_chart_outlined_24.xml │ ├── ic_baseline_linear_scale_24.xml │ ├── ic_baseline_link_24.xml │ ├── ic_baseline_menu_24.xml │ ├── ic_baseline_search_24.xml │ ├── ic_baseline_settings_24.xml │ ├── ic_baseline_share_24.xml │ ├── ic_baseline_star_white.xml │ ├── ic_baseline_star_yellow.xml │ ├── ic_baseline_text_snippet_24.xml │ ├── ic_baseline_view_comfy_24.xml │ ├── ic_character_screen_type_red_hint.xml │ ├── ic_character_screen_type_yellow_hint.xml │ ├── ic_combination_group_pic_1.xml │ ├── ic_combination_group_pic_2.xml │ ├── ic_combination_group_pic_3.xml │ ├── ic_combination_group_pic_4.xml │ ├── ic_combination_group_pic_5.xml │ ├── ic_combination_group_pic_6.xml │ ├── ic_combination_group_pic_7.xml │ ├── ic_teamgroupscreen_teamdivider.xml │ ├── listselectbar_bg.xml │ ├── selectgroup_item_center_bg.xml │ ├── selectgroup_item_left_bg.xml │ ├── selectgroup_item_right_bg.xml │ └── teamgroup_auto_screen_progress_drawable.xml │ ├── layout │ ├── activity_main.xml │ ├── characterlist_item.xml │ ├── characterlistlay_lay.xml │ ├── characterview_lay.xml │ ├── combinationlist_combinationitem.xml │ ├── combinationlist_descriptionitem.xml │ ├── fragment_about.xml │ ├── fragment_bossdata.xml │ ├── fragment_characterscreen.xml │ ├── fragment_collection.xml │ ├── fragment_combination.xml │ ├── fragment_combinationdetail.xml │ ├── fragment_main.xml │ ├── fragment_menu.xml │ ├── fragment_recalucate.xml │ ├── fragment_record.xml │ ├── fragment_recordtext.xml │ ├── fragment_teamdetail.xml │ ├── fragment_teamgroup.xml │ ├── fragment_teamgroupdetail.xml │ ├── fragment_teamgroupscreen.xml │ ├── fragment_teamgroupscreen_team_lay.xml │ ├── fragment_teamgroupscreenusedcharacter.xml │ ├── fragment_teamlist.xml │ ├── fragment_teamselect.xml │ ├── fragment_usermanager.xml │ ├── recordlist_item.xml │ ├── teamgrouplist_item.xml │ ├── teamgrouplist_item_team_lay.xml │ ├── teamlist_bossitem.xml │ ├── teamlist_divideritem.xml │ ├── teamlist_recalucateitem.xml │ ├── teamlist_teamitem.xml │ └── userlist_item.xml │ ├── menu │ ├── bottom_nav_menu.xml │ ├── fragment_collection_drop_toolbar.xml │ ├── fragment_combinationdetail_drop_toolbar.xml │ ├── fragment_recalucate_drop_toolbar.xml │ ├── fragment_record_text_drop_toolbar.xml │ ├── fragment_teamdetail_drop_toolbar.xml │ ├── fragment_teamgroup_drop_toolbar.xml │ ├── fragment_teamgroupdetail_drop_toolbar.xml │ ├── fragment_teamgroupscreen_drop_toolbar.xml │ ├── fragment_teamgroupscreenusedcharacter_drop_toolbar.xml │ ├── fragment_teamlist_drop_toolbar.xml │ ├── fragment_teamselect_drop_toolbar.xml │ └── fragment_usermanager_drop_toolbar.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── navigation │ └── app_navigation.xml │ ├── values-night │ └── styles.xml │ ├── values │ ├── anim.xml │ ├── colors.xml │ ├── strings.xml │ ├── styles.xml │ └── type.xml │ └── xml │ ├── file_paths.xml │ └── preference.xml ├── build.gradle ├── dependencies.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── release.py ├── settings.gradle ├── taofan.jpg └── update_log.json /.github/workflows/android.yml: -------------------------------------------------------------------------------- 1 | name: Release Drafter 2 | run-name: update triggers release create 3 | on: 4 | push: 5 | paths: 6 | - update_log.json 7 | 8 | jobs: 9 | update_release_draft: 10 | permissions: 11 | contents: write 12 | pull-requests: write 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v3 18 | 19 | - name: Generate release log 20 | run: | 21 | RELEASE_APK_VERSION=`python release.py` 22 | echo "RELEASE_APK_VERSION=$RELEASE_APK_VERSION" >> $GITHUB_ENV 23 | 24 | - name: Create a release 25 | uses: softprops/action-gh-release@v1 26 | with: 27 | body_path: releaselog_cache.txt 28 | files: apk/warbanner-release.apk 29 | tag_name: ${{ env.RELEASE_APK_VERSION }} 30 | name: warbanner v${{ env.RELEASE_APK_VERSION }} 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | /hs_err_pid4840.log 17 | 18 | # release draft cache files 19 | releaselog_cache.txt 20 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 20 | 21 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | 34 | 35 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /PCRTeamAnalyser/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /PCRTeamAnalyser/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java-library' 3 | id 'maven-publish' 4 | } 5 | apply from: rootProject.file("dependencies.gradle") 6 | 7 | java { 8 | sourceCompatibility = JavaVersion.VERSION_1_7 9 | targetCompatibility = JavaVersion.VERSION_1_7 10 | } 11 | 12 | publishing { 13 | publications { 14 | mavenJava(MavenPublication) { 15 | from components.java 16 | groupId = 'cn.sun45.warbanner' 17 | artifactId = 'PCRTeamAnalyser' 18 | version = versions.publish_version 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /PCRTeamAnalyser/src/main/java/cn/sun45/pcrteamanalyser/analyse/AnalyseConfig.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.pcrteamanalyser.analyse; 2 | 3 | import cn.sun45.pcrteamanalyser.model.AnalyseTeam; 4 | 5 | /** 6 | * Created by Sun45 on 2023年4月1日 7 | *

8 | * 数据分析参数 9 | */ 10 | public class AnalyseConfig { 11 | // 测试 12 | public boolean testing = false; 13 | 14 | // 分刀中断阈值 15 | public int interruptSize = 10_0000; 16 | 17 | /** 18 | * 接入数据模型转化为数据分析模型组 19 | * 20 | * @param model 接入数据模型 21 | * @return 数据分析模型组 22 | */ 23 | public AnalyseTeam buildAnalyseTeam(M model) { 24 | return (AnalyseTeam) model; 25 | } 26 | 27 | /** 28 | * 数据分析结果转化为输出数据模型 29 | * 30 | * @param result 数据分析结果 31 | * @return 输出数据模型 32 | */ 33 | public R buildResult(AnalyseResult result) { 34 | return (R) result; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /PCRTeamAnalyser/src/main/java/cn/sun45/pcrteamanalyser/model/AnalyseModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.pcrteamanalyser.model; 2 | 3 | /** 4 | * Created by Sun45 on 2023年4月1日 5 | *

6 | * 数据分析模型(角色) 7 | */ 8 | public interface AnalyseModel { 9 | /** 10 | * 获取数据分析唯一Id 11 | * 12 | * @return 数据分析唯一Id(角色Id) 13 | */ 14 | int getAnalyseId(); 15 | } 16 | -------------------------------------------------------------------------------- /PCRTeamAnalyser/src/main/java/cn/sun45/pcrteamanalyser/test/TestResult.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.pcrteamanalyser.test; 2 | 3 | public class TestResult { 4 | private TestTeam teamA; 5 | private TestTeam teamB; 6 | private TestTeam teamC; 7 | private int borrowA; 8 | private int borrowB; 9 | private int borrowC; 10 | 11 | public TestTeam getTeamA() { 12 | return teamA; 13 | } 14 | 15 | public void setTeamA(TestTeam teamA) { 16 | this.teamA = teamA; 17 | } 18 | 19 | public TestTeam getTeamB() { 20 | return teamB; 21 | } 22 | 23 | public void setTeamB(TestTeam teamB) { 24 | this.teamB = teamB; 25 | } 26 | 27 | public TestTeam getTeamC() { 28 | return teamC; 29 | } 30 | 31 | public void setTeamC(TestTeam teamC) { 32 | this.teamC = teamC; 33 | } 34 | 35 | public int getBorrowA() { 36 | return borrowA; 37 | } 38 | 39 | public void setBorrowA(int borrowA) { 40 | this.borrowA = borrowA; 41 | } 42 | 43 | public int getBorrowB() { 44 | return borrowB; 45 | } 46 | 47 | public void setBorrowB(int borrowB) { 48 | this.borrowB = borrowB; 49 | } 50 | 51 | public int getBorrowC() { 52 | return borrowC; 53 | } 54 | 55 | public void setBorrowC(int borrowC) { 56 | this.borrowC = borrowC; 57 | } 58 | 59 | @Override 60 | public String toString() { 61 | return "TestResult [teamA=" + teamA + ", teamB=" + teamB + ", teamC=" + teamC + ", borrowA=" + borrowA 62 | + ", borrowB=" + borrowB + ", borrowC=" + borrowC + "]"; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /PCRTeamAnalyser/src/main/java/cn/sun45/pcrteamanalyser/test/TestTeam.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.pcrteamanalyser.test; 2 | 3 | import java.util.List; 4 | 5 | public class TestTeam { 6 | private List idList; 7 | 8 | private int damage; 9 | 10 | private int borrowId; 11 | 12 | public List getIdList() { 13 | return idList; 14 | } 15 | 16 | public void setIdList(List idList) { 17 | this.idList = idList; 18 | } 19 | 20 | public int getDamage() { 21 | return damage; 22 | } 23 | 24 | public void setDamage(int damage) { 25 | this.damage = damage; 26 | } 27 | 28 | public int getBorrowId() { 29 | return borrowId; 30 | } 31 | 32 | public void setBorrowId(int borrowId) { 33 | this.borrowId = borrowId; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return "TestTeam [idList=" + idList + ", damage=" + damage + ", borrowId=" + borrowId + "]"; 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # warbanner 2 | Android端BCR会战作业查询记录工具 3 | 4 | 作业数据来源:[花舞攻略组的在线作业文档](https://docs.qq.com/sheet/DWkdtR2djbnFiUGRk?tab=ltc6xo) 5 | 6 | 作业数据网站:[踩蘑菇轴区网站](https://www.caimogu.cc/gzlj.html) 7 | 8 | 启发及旧版角色数据获取方式来自❤️[静流笔记|ShizuruNotes](https://github.com/MalitsPlus/ShizuruNotes) 9 | 10 | [旧版README](README_OLD.md) 11 | 12 | ## 下载 13 | [版本更新内容及下载地址](https://github.com/Sun45/warbanner/releases) 14 | 15 | 别的下载方式:[百度网盘](https://pan.baidu.com/s/1CpzfLEtD_rb9MALHSFquVg) 提取码:1234 16 | 17 | ## 需求动态权限 18 | * 无 19 | 20 | ## 系统版本需求 21 | * Android7.0及以上 22 | 23 | ## 使用教程及反馈 24 | [使用教程wiki](https://github.com/Sun45/warbanner/wiki) [问题反馈和建议](https://github.com/Sun45/warbanner/issues/new) 25 | 26 | ## 第三方库提供 27 | ### 1.分刀算法 28 | 29 | PCRTeamAnalyser [![](https://jitpack.io/v/Sun45/warbanner.svg)](https://jitpack.io/#Sun45/warbanner) 30 | ```gradle 31 | dependencies { 32 | ... 33 | implementation 'com.github.Sun45:warbanner:4.3.1' 34 | } 35 | ``` 36 | ### 2.BOSS数据监听 37 | 38 | [库文件](app/libs/bcrloglib-release.aar) 39 | 40 | 使用方式见炽旗源码,有什么问题或者建议可以加群 bcrlog交流&问题反馈群 41 | 42 | 本群的密码是? 公主连结国服版号 43 | 44 | ## 许可证 45 | 使用、改造、分发炽旗时请遵循 Apache License 2.0 开源许可证. 46 | 47 | ## 讨饭 48 | ![taofan](taofan.jpg) 49 | -------------------------------------------------------------------------------- /README_OLD.md: -------------------------------------------------------------------------------- 1 | # warbanner 最终版本 v0.8.9 双子座 2 | Android端BCR会战作业查询记录工具 3 | 4 | 作业数据来源:[花舞攻略组的在线作业文档](https://docs.qq.com/sheet/DWkdtR2djbnFiUGRk?tab=ltc6xo) 5 | 6 | 作业数据镜像站:[githubPcrGuildLibrary](https://github.com/acaly/PcrGuildLibrary) 7 | 8 | 作业数据镜像站:[giteePcrGuildLibrary](https://gitee.com/acaly/PcrGuildLibrary) 9 | 10 | 启发及角色数据获取方式来自❤️[静流笔记|ShizuruNotes](https://github.com/MalitsPlus/ShizuruNotes) 11 | 12 | 数据来源:[干炸里脊资源站](https://redive.estertion.win/) 13 | 14 | ## 下载 15 | [版本更新内容及下载地址](https://github.com/Sun45/warbanner/releases) 16 | 17 | 别的下载方式:[百度网盘](https://pan.baidu.com/s/1CpzfLEtD_rb9MALHSFquVg) 提取码:1234 18 | 19 | ## 需求动态权限 20 | 文件读写 21 | 22 | ## 系统版本需求 23 | 系统版本需求:Android5.0及以上 24 | 25 | -------------------------------------------- 26 | 目前还存在一些问题 27 | 28 | 作业更新可能会卡住,退出手动更新就行 29 | 30 | 应用升级还要修改下 31 | 32 | boss筛选弹框确认按钮异常,不影响使用 33 | 34 | 存储占用问题,大部分来自于x5浏览器内核,为的是爬作业时优化速度和性能,这个以后证明不需要使用第三方内核或有办法优化x5的存储时解决 35 | 36 | 点击检查更新后退出可能出现崩溃问题 37 | 38 | -------------------------------------------- 39 | 40 | 已列入开发项 41 | 42 | 分刀添加目标作业筛选 43 | 44 | 会战排期概念引入 45 | 46 | -------------------------------------------- 47 | 48 | 视频教程感谢@立斐 49 | [视频教程链接](https://www.bilibili.com/video/BV1Ag411G7UQ/?spm_id_from=333.880.my_history.page.click) 50 | 51 | 图文教程感谢@今天也喜欢樱岛麻衣OwO 52 | [图文教程链接](https://docs.qq.com/doc/DQ0J3VmNEeWRTZmRX) 53 | 54 | 使用方式及功能 55 | 56 | 57 | 现在算是第一个公开版吧,还在完善中,欢迎提出意见和建议 58 | -------------------------------------------------------------------------------- /apk/warbanner-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sun45/warbanner/70fc33761bda83becd1cb52f3c64eb5dedeb0616/apk/warbanner-release.apk -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/libs/bcrloglib-release.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sun45/warbanner/70fc33761bda83becd1cb52f3c64eb5dedeb0616/app/libs/bcrloglib-release.aar -------------------------------------------------------------------------------- /app/libs/commons-compress-1.19.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sun45/warbanner/70fc33761bda83becd1cb52f3c64eb5dedeb0616/app/libs/commons-compress-1.19.jar -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 35 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/combination/CombinationElementModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.combination; 2 | 3 | import java.util.List; 4 | import java.util.Set; 5 | 6 | import cn.sun45.warbanner.document.database.source.models.TeamModel; 7 | 8 | /** 9 | * Created by Sun45 on 2023/9/23 10 | * 套餐元素模型 11 | */ 12 | public class CombinationElementModel { 13 | private TeamModel teamModel; 14 | 15 | private List timeLines; 16 | 17 | private List idlist; 18 | 19 | private int screencharacter; 20 | 21 | private int returnTime; 22 | 23 | public TeamModel getTeamModel() { 24 | return teamModel; 25 | } 26 | 27 | public void setTeamModel(TeamModel teamModel) { 28 | this.teamModel = teamModel; 29 | } 30 | 31 | public List getTimeLines() { 32 | return timeLines; 33 | } 34 | 35 | public void setTimeLines(List timeLines) { 36 | this.timeLines = timeLines; 37 | } 38 | 39 | public List getIdlist() { 40 | return idlist; 41 | } 42 | 43 | public void setIdlist(List idlist) { 44 | this.idlist = idlist; 45 | } 46 | 47 | public int getScreencharacter() { 48 | return screencharacter; 49 | } 50 | 51 | public void setScreencharacter(int screencharacter) { 52 | this.screencharacter = screencharacter; 53 | } 54 | 55 | public int getReturnTime() { 56 | return returnTime; 57 | } 58 | 59 | public void setReturnTime(int returnTime) { 60 | this.returnTime = returnTime; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/database/setup/SetupDataBase.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.database.setup; 2 | 3 | import androidx.room.Database; 4 | import androidx.room.Room; 5 | import androidx.room.RoomDatabase; 6 | 7 | import cn.sun45.warbanner.document.database.setup.models.ScreenCharacterModel; 8 | import cn.sun45.warbanner.document.database.setup.models.TeamCustomizeModel; 9 | import cn.sun45.warbanner.document.database.setup.models.TeamGroupCollectionModel; 10 | import cn.sun45.warbanner.document.database.setup.models.TeamGroupScreenModel; 11 | import cn.sun45.warbanner.document.database.setup.models.TeamGroupScreenUsedCharacterModel; 12 | import cn.sun45.warbanner.document.database.setup.models.TeamListShowModel; 13 | import cn.sun45.warbanner.document.database.setup.models.UserModel; 14 | import cn.sun45.warbanner.framework.MyApplication; 15 | 16 | /** 17 | * Created by Sun45 on 2022/6/9 18 | * 设置数据库 19 | */ 20 | @Database(entities = { 21 | UserModel.class, 22 | ScreenCharacterModel.class, 23 | TeamListShowModel.class, 24 | TeamGroupScreenModel.class, 25 | TeamGroupScreenUsedCharacterModel.class, 26 | TeamCustomizeModel.class, 27 | TeamGroupCollectionModel.class}, version = 8) 28 | public abstract class SetupDataBase extends RoomDatabase { 29 | private static SetupDataBase databaseInstance; 30 | 31 | public static synchronized SetupDataBase getInstance() { 32 | if (databaseInstance == null) { 33 | databaseInstance = Room.databaseBuilder(MyApplication.application, SetupDataBase.class, "setup") 34 | .fallbackToDestructiveMigration() 35 | .allowMainThreadQueries() 36 | .build(); 37 | } 38 | return databaseInstance; 39 | } 40 | 41 | public abstract SetupDao setupDao(); 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/database/setup/models/ScreenCharacterModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.database.setup.models; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.room.ColumnInfo; 5 | import androidx.room.Entity; 6 | 7 | /** 8 | * Created by Sun45 on 2022/6/9 9 | * 筛选角色信息数据模型 10 | */ 11 | @Entity(tableName = "screencharacter", primaryKeys = {"userId", "characterId"}) 12 | public class ScreenCharacterModel { 13 | @NonNull 14 | @ColumnInfo 15 | private int userId; 16 | 17 | @NonNull 18 | @ColumnInfo 19 | private int characterId; 20 | 21 | @ColumnInfo 22 | private int type; 23 | 24 | public int getUserId() { 25 | return userId; 26 | } 27 | 28 | public void setUserId(int userId) { 29 | this.userId = userId; 30 | } 31 | 32 | public int getCharacterId() { 33 | return characterId; 34 | } 35 | 36 | public void setCharacterId(int characterId) { 37 | this.characterId = characterId; 38 | } 39 | 40 | public int getType() { 41 | return type; 42 | } 43 | 44 | public void setType(int type) { 45 | this.type = type; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/database/setup/models/TeamCustomizeModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.database.setup.models; 2 | 3 | import androidx.room.ColumnInfo; 4 | import androidx.room.Entity; 5 | import androidx.room.PrimaryKey; 6 | 7 | /** 8 | * Created by Sun45 on 2022/6/9 9 | * 阵容自定义信息数据模型 10 | */ 11 | @Entity(tableName = "teamcustomize") 12 | public class TeamCustomizeModel { 13 | @PrimaryKey 14 | @ColumnInfo 15 | private int teamId; 16 | 17 | //阵容屏蔽 18 | @ColumnInfo 19 | private boolean block; 20 | 21 | //自定轴伤 22 | @ColumnInfo 23 | private int damage; 24 | 25 | public TeamCustomizeModel() { 26 | block = false; 27 | damage = -1; 28 | } 29 | 30 | public int getTeamId() { 31 | return teamId; 32 | } 33 | 34 | public void setTeamId(int teamId) { 35 | this.teamId = teamId; 36 | } 37 | 38 | public boolean isBlock() { 39 | return block; 40 | } 41 | 42 | public void setBlock(boolean block) { 43 | this.block = block; 44 | } 45 | 46 | public int getDamage() { 47 | return damage; 48 | } 49 | 50 | public void setDamage(int damage) { 51 | this.damage = damage; 52 | } 53 | 54 | //自定轴伤生效 55 | public boolean damageEffective() { 56 | return damage != -1; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/database/setup/models/TeamGroupCollectionModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.database.setup.models; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.room.ColumnInfo; 5 | import androidx.room.Entity; 6 | 7 | /** 8 | * Created by Sun45 on 2022/6/9 9 | * 分刀信息收藏数据模型 10 | */ 11 | @Entity(tableName = "teamgroupcollection", primaryKeys = {"userId", "teamoneId", "teamtwoId", "teamthreeId"}) 12 | public class TeamGroupCollectionModel { 13 | @NonNull 14 | @ColumnInfo 15 | private int userId; 16 | 17 | @NonNull 18 | @ColumnInfo 19 | private int teamoneId; 20 | @ColumnInfo 21 | private int borrowindexone; 22 | 23 | @NonNull 24 | @ColumnInfo 25 | private int teamtwoId; 26 | @ColumnInfo 27 | private int borrowindextwo; 28 | 29 | @NonNull 30 | @ColumnInfo 31 | private int teamthreeId; 32 | @ColumnInfo 33 | private int borrowindexthree; 34 | 35 | @ColumnInfo 36 | private String time; 37 | 38 | public int getUserId() { 39 | return userId; 40 | } 41 | 42 | public void setUserId(int userId) { 43 | this.userId = userId; 44 | } 45 | 46 | public int getTeamoneId() { 47 | return teamoneId; 48 | } 49 | 50 | public void setTeamoneId(int teamoneId) { 51 | this.teamoneId = teamoneId; 52 | } 53 | 54 | public int getBorrowindexone() { 55 | return borrowindexone; 56 | } 57 | 58 | public void setBorrowindexone(int borrowindexone) { 59 | this.borrowindexone = borrowindexone; 60 | } 61 | 62 | public int getTeamtwoId() { 63 | return teamtwoId; 64 | } 65 | 66 | public void setTeamtwoId(int teamtwoId) { 67 | this.teamtwoId = teamtwoId; 68 | } 69 | 70 | public int getBorrowindextwo() { 71 | return borrowindextwo; 72 | } 73 | 74 | public void setBorrowindextwo(int borrowindextwo) { 75 | this.borrowindextwo = borrowindextwo; 76 | } 77 | 78 | public int getTeamthreeId() { 79 | return teamthreeId; 80 | } 81 | 82 | public void setTeamthreeId(int teamthreeId) { 83 | this.teamthreeId = teamthreeId; 84 | } 85 | 86 | public int getBorrowindexthree() { 87 | return borrowindexthree; 88 | } 89 | 90 | public void setBorrowindexthree(int borrowindexthree) { 91 | this.borrowindexthree = borrowindexthree; 92 | } 93 | 94 | public String getTime() { 95 | return time; 96 | } 97 | 98 | public void setTime(String time) { 99 | this.time = time; 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/database/setup/models/TeamGroupScreenUsedCharacterModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.database.setup.models; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.room.ColumnInfo; 5 | import androidx.room.Entity; 6 | 7 | /** 8 | * Created by Sun45 on 2022/10/27 9 | * 分刀信息筛选已用角色数据模型 10 | */ 11 | @Entity(tableName = "teamgroupscreenusedcharacter", primaryKeys = {"userId", "characterId"}) 12 | public class TeamGroupScreenUsedCharacterModel { 13 | @NonNull 14 | @ColumnInfo 15 | private int userId; 16 | 17 | @NonNull 18 | @ColumnInfo 19 | private int characterId; 20 | 21 | @ColumnInfo 22 | private int type; 23 | 24 | public int getUserId() { 25 | return userId; 26 | } 27 | 28 | public void setUserId(int userId) { 29 | this.userId = userId; 30 | } 31 | 32 | public int getCharacterId() { 33 | return characterId; 34 | } 35 | 36 | public void setCharacterId(int characterId) { 37 | this.characterId = characterId; 38 | } 39 | 40 | public int getType() { 41 | return type; 42 | } 43 | 44 | public void setType(int type) { 45 | this.type = type; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/database/setup/models/TeamListShowModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.database.setup.models; 2 | 3 | import androidx.room.ColumnInfo; 4 | import androidx.room.Entity; 5 | import androidx.room.PrimaryKey; 6 | 7 | /** 8 | * Created by Sun45 on 2022/6/12 9 | * 阵容信息展示数据模型 10 | */ 11 | @Entity(tableName = "teamlistshow") 12 | public class TeamListShowModel { 13 | @PrimaryKey 14 | @ColumnInfo 15 | private int userId; 16 | 17 | //链接展示 18 | @ColumnInfo 19 | private boolean linkShow; 20 | 21 | //阶段筛选 0:全部... 22 | @ColumnInfo 23 | private int teamListStage; 24 | 25 | //BOSS筛选 0:全部,1:一王,2:二王,3:三王,4:四王,5:五王 26 | @ColumnInfo 27 | private int teamListBoss; 28 | 29 | //刀型筛选 0:不限,1:AUTO,2:非AUTO,3:尾刀 30 | @ColumnInfo 31 | private int teamListType; 32 | 33 | public TeamListShowModel() { 34 | linkShow = true; 35 | } 36 | 37 | public int getUserId() { 38 | return userId; 39 | } 40 | 41 | public void setUserId(int userId) { 42 | this.userId = userId; 43 | } 44 | 45 | public boolean isLinkShow() { 46 | return linkShow; 47 | } 48 | 49 | public void setLinkShow(boolean linkShow) { 50 | this.linkShow = linkShow; 51 | } 52 | 53 | public int getTeamListStage() { 54 | return teamListStage; 55 | } 56 | 57 | public void setTeamListStage(int teamListStage) { 58 | this.teamListStage = teamListStage; 59 | } 60 | 61 | public int getTeamListBoss() { 62 | return teamListBoss; 63 | } 64 | 65 | public void setTeamListBoss(int teamListBoss) { 66 | this.teamListBoss = teamListBoss; 67 | } 68 | 69 | public int getTeamListType() { 70 | return teamListType; 71 | } 72 | 73 | public void setTeamListType(int teamListType) { 74 | this.teamListType = teamListType; 75 | } 76 | 77 | @Override 78 | public String toString() { 79 | return "TeamListShowModel{" + 80 | "userId=" + userId + 81 | ", linkShow=" + linkShow + 82 | ", teamListStage=" + teamListStage + 83 | ", teamListBoss=" + teamListBoss + 84 | ", teamListType=" + teamListType + 85 | '}'; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/database/setup/models/UserModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.database.setup.models; 2 | 3 | import androidx.room.ColumnInfo; 4 | import androidx.room.Entity; 5 | import androidx.room.PrimaryKey; 6 | 7 | /** 8 | * Created by Sun45 on 2022/6/9 9 | * 用户信息数据模型 10 | */ 11 | @Entity(tableName = "user") 12 | public class UserModel { 13 | @PrimaryKey(autoGenerate = true) 14 | @ColumnInfo 15 | private int id; 16 | 17 | @ColumnInfo 18 | public String lang; 19 | 20 | @ColumnInfo 21 | public boolean defaultUser; 22 | 23 | @ColumnInfo 24 | private String name; 25 | 26 | public int getId() { 27 | return id; 28 | } 29 | 30 | public void setId(int id) { 31 | this.id = id; 32 | } 33 | 34 | public String getLang() { 35 | return lang; 36 | } 37 | 38 | public void setLang(String lang) { 39 | this.lang = lang; 40 | } 41 | 42 | public boolean isDefaultUser() { 43 | return defaultUser; 44 | } 45 | 46 | public void setDefaultUser(boolean defaultUser) { 47 | this.defaultUser = defaultUser; 48 | } 49 | 50 | public String getName() { 51 | return name; 52 | } 53 | 54 | public void setName(String name) { 55 | this.name = name; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/database/source/SourceDao.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.database.source; 2 | 3 | import androidx.room.Dao; 4 | import androidx.room.Insert; 5 | import androidx.room.OnConflictStrategy; 6 | import androidx.room.Query; 7 | 8 | import java.util.List; 9 | 10 | import cn.sun45.warbanner.document.database.source.models.BossModel; 11 | import cn.sun45.warbanner.document.database.source.models.CharacterModel; 12 | import cn.sun45.warbanner.document.database.source.models.TeamModel; 13 | 14 | /** 15 | * Created by Sun45 on 2022/6/9 16 | * 资源数据DAO 17 | */ 18 | @Dao 19 | public interface SourceDao { 20 | //CharacterModel 21 | @Insert(onConflict = OnConflictStrategy.REPLACE) 22 | void insertCharacter(List characterModelList); 23 | 24 | @Query("delete from character where lang=:lang") 25 | void deleteAllCharacter(String lang); 26 | 27 | @Query("select * from character where lang=:lang") 28 | List queryAllCharacter(String lang); 29 | 30 | //BossModel 31 | @Insert(onConflict = OnConflictStrategy.REPLACE) 32 | void insertBoss(List bossModelList); 33 | 34 | @Query("delete from boss where lang=:lang") 35 | void deleteAllBoss(String lang); 36 | 37 | @Query("select * from boss where lang=:lang ORDER BY bossIndex ASC") 38 | List queryAllBoss(String lang); 39 | 40 | //TeamModel 41 | @Insert(onConflict = OnConflictStrategy.REPLACE) 42 | void insertTeam(List teamModelList); 43 | 44 | @Query("delete from team where lang=:lang") 45 | void deleteAllTeam(String lang); 46 | 47 | @Query("select * from team where lang=:lang") 48 | List queryAllTeam(String lang); 49 | 50 | @Query("select * from team where lang=:lang AND id=:id") 51 | TeamModel queryTeam(String lang, int id); 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/database/source/SourceDataBase.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.database.source; 2 | 3 | import androidx.room.Database; 4 | import androidx.room.Room; 5 | import androidx.room.RoomDatabase; 6 | 7 | import cn.sun45.warbanner.document.database.source.models.BossModel; 8 | import cn.sun45.warbanner.document.database.source.models.CharacterModel; 9 | import cn.sun45.warbanner.document.database.source.models.TeamModel; 10 | import cn.sun45.warbanner.framework.MyApplication; 11 | 12 | /** 13 | * Created by Sun45 on 2022/6/9 14 | * 资源数据库 15 | */ 16 | @Database(entities = {CharacterModel.class, BossModel.class, TeamModel.class}, version = 5) 17 | public abstract class SourceDataBase extends RoomDatabase { 18 | private static SourceDataBase databaseInstance; 19 | 20 | public static synchronized SourceDataBase getInstance() { 21 | if (databaseInstance == null) { 22 | databaseInstance = Room.databaseBuilder(MyApplication.application, SourceDataBase.class, "source") 23 | .fallbackToDestructiveMigration() 24 | .allowMainThreadQueries() 25 | .build(); 26 | } 27 | return databaseInstance; 28 | } 29 | 30 | public abstract SourceDao sourceDao(); 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/database/source/models/BossModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.database.source.models; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.room.ColumnInfo; 5 | import androidx.room.Entity; 6 | 7 | /** 8 | * Created by Sun45 on 2022/6/9 9 | * boss信息数据模型 10 | */ 11 | @Entity(tableName = "boss", primaryKeys = {"lang", "id"}) 12 | public class BossModel { 13 | @NonNull 14 | @ColumnInfo 15 | public String lang; 16 | 17 | @NonNull 18 | @ColumnInfo 19 | private int id; 20 | 21 | @ColumnInfo 22 | private int bossIndex; 23 | 24 | @ColumnInfo 25 | private String name; 26 | 27 | @ColumnInfo 28 | private String iconUrl; 29 | 30 | public String getLang() { 31 | return lang; 32 | } 33 | 34 | public void setLang(String lang) { 35 | this.lang = lang; 36 | } 37 | 38 | public int getId() { 39 | return id; 40 | } 41 | 42 | public void setId(int id) { 43 | this.id = id; 44 | } 45 | 46 | public int getBossIndex() { 47 | return bossIndex; 48 | } 49 | 50 | public void setBossIndex(int bossIndex) { 51 | this.bossIndex = bossIndex; 52 | } 53 | 54 | public String getName() { 55 | return name; 56 | } 57 | 58 | public void setName(String name) { 59 | this.name = name; 60 | } 61 | 62 | public String getIconUrl() { 63 | return iconUrl; 64 | } 65 | 66 | public void setIconUrl(String iconUrl) { 67 | this.iconUrl = iconUrl; 68 | } 69 | 70 | @Override 71 | public String toString() { 72 | return "BossModel{" + 73 | "lang='" + lang + '\'' + 74 | ", id=" + id + 75 | ", bossIndex=" + bossIndex + 76 | ", name='" + name + '\'' + 77 | ", iconUrl='" + iconUrl + '\'' + 78 | '}'; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/database/source/models/CharacterModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.database.source.models; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.room.ColumnInfo; 5 | import androidx.room.Entity; 6 | 7 | /** 8 | * Created by Sun45 on 2022/6/9 9 | * 角色信息数据模型 10 | */ 11 | @Entity(tableName = "character", primaryKeys = {"lang", "id"}) 12 | public class CharacterModel { 13 | @NonNull 14 | @ColumnInfo 15 | public String lang; 16 | 17 | @NonNull 18 | @ColumnInfo 19 | private int id; 20 | 21 | @ColumnInfo 22 | private int group; 23 | 24 | @ColumnInfo 25 | private String name; 26 | 27 | @ColumnInfo 28 | private String iconUrl; 29 | 30 | public String getLang() { 31 | return lang; 32 | } 33 | 34 | public void setLang(String lang) { 35 | this.lang = lang; 36 | } 37 | 38 | public int getId() { 39 | return id; 40 | } 41 | 42 | public void setId(int id) { 43 | this.id = id; 44 | } 45 | 46 | public int getGroup() { 47 | return group; 48 | } 49 | 50 | public void setGroup(int group) { 51 | this.group = group; 52 | } 53 | 54 | public String getName() { 55 | return name; 56 | } 57 | 58 | public void setName(String name) { 59 | this.name = name; 60 | } 61 | 62 | public String getIconUrl() { 63 | return iconUrl; 64 | } 65 | 66 | public void setIconUrl(String iconUrl) { 67 | this.iconUrl = iconUrl; 68 | } 69 | 70 | @Override 71 | public String toString() { 72 | return "CharacterModel{" + 73 | "lang='" + lang + '\'' + 74 | ", id=" + id + 75 | ", group=" + group + 76 | ", name='" + name + '\'' + 77 | ", iconUrl='" + iconUrl + '\'' + 78 | '}'; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/preference/AppPreference.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.preference; 2 | 3 | import cn.sun45.warbanner.framework.document.preference.BasePreference; 4 | 5 | /** 6 | * Created by Sun45 on 2021/5/22 7 | * 应用信息 8 | */ 9 | public class AppPreference extends BasePreference { 10 | //异常退出 11 | private boolean abnormal_exit; 12 | 13 | public boolean isAbnormal_exit() { 14 | return load("abnormal_exit"); 15 | } 16 | 17 | public void setAbnormal_exit(boolean abnormal_exit) { 18 | save("abnormal_exit", abnormal_exit); 19 | } 20 | 21 | @Override 22 | public String getName() { 23 | return "app"; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/preference/DataPreference.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.preference; 2 | 3 | import cn.sun45.warbanner.framework.document.preference.BasePreference; 4 | 5 | /** 6 | * Created by Sun45 on 2022/6/10 7 | * 数据信息 8 | */ 9 | public class DataPreference extends BasePreference { 10 | //上次更新时间 11 | private long lastupdate; 12 | 13 | public long getLastupdate() { 14 | return load("lastupdate"); 15 | } 16 | 17 | public void setLastupdate(long lastupdate) { 18 | save("lastupdate", lastupdate); 19 | } 20 | 21 | @Override 22 | public String getName() { 23 | return "data"; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/preference/SetupPreference.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.preference; 2 | 3 | import cn.sun45.warbanner.framework.document.preference.BasePreference; 4 | 5 | /** 6 | * Created by Sun45 on 2021/5/30 7 | * 设置信息 8 | */ 9 | public class SetupPreference extends BasePreference { 10 | //收藏排序 11 | private int collectionsort = 0; 12 | 13 | //连点间隔 14 | private int tapinterval = 10; 15 | //自动连点启用 16 | private boolean autoclick = false; 17 | 18 | //角色筛选生效 19 | private boolean characterscreenenable = false; 20 | 21 | //服务器 22 | private int server; 23 | 24 | //自动更新开启 25 | private boolean autoupdate = true; 26 | 27 | //链接打开方式 28 | private int linkopentype; 29 | 30 | public int getCollectionsort() { 31 | return load("collectionsort"); 32 | } 33 | 34 | public void setCollectionsort(int collectionsort) { 35 | save("collectionsort", collectionsort); 36 | } 37 | 38 | public int getTapinterval() { 39 | return load("tapinterval"); 40 | } 41 | 42 | public void setTapinterval(int tapinterval) { 43 | save("tapinterval", tapinterval); 44 | } 45 | 46 | public boolean isAutoclick() { 47 | return load("autoclick"); 48 | } 49 | 50 | public void setAutoclick(boolean autoclick) { 51 | save("autoclick", autoclick); 52 | } 53 | 54 | public boolean isCharacterscreenenable() { 55 | return load("characterscreenenable"); 56 | } 57 | 58 | public void setCharacterscreenenable(boolean characterscreenenable) { 59 | save("characterscreenenable", characterscreenenable); 60 | } 61 | 62 | public int getServer() { 63 | return load("server"); 64 | } 65 | 66 | public void setServer(int server) { 67 | save("server", server); 68 | } 69 | 70 | public boolean isAutoupdate() { 71 | return load("autoupdate"); 72 | } 73 | 74 | public void setAutoupdate(boolean autoupdate) { 75 | save("autoupdate", autoupdate); 76 | } 77 | 78 | public int getLinkopentype() { 79 | return load("linkopentype"); 80 | } 81 | 82 | public void setLinkopentype(int linkopentype) { 83 | save("linkopentype", linkopentype); 84 | } 85 | 86 | @Override 87 | public String getName() { 88 | return "setup"; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/preference/UserPreference.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.preference; 2 | 3 | import cn.sun45.warbanner.framework.document.preference.BasePreference; 4 | 5 | /** 6 | * Created by Sun45 on 2021/6/16 7 | * 用户信息 8 | */ 9 | public class UserPreference extends BasePreference { 10 | private int userid; 11 | 12 | public int getUserid() { 13 | return load("userid"); 14 | } 15 | 16 | public void setUserid(int userid) { 17 | save("userid", userid); 18 | } 19 | 20 | @Override 21 | public String getName() { 22 | return "user"; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/statics/Locale.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.statics; 2 | 3 | /** 4 | * Created by Sun45 on 2022/6/9 5 | * 语言地区 6 | */ 7 | public enum Locale { 8 | ZH_CN(0, StaticHelper.ZH_CN_LANG, StaticHelper.ZH_CN_SERVERNAME, new int[][]{{1}, {2}, {3}, {4}, {5}}), 9 | ZH_TW(1, StaticHelper.ZH_TW_LANG, StaticHelper.ZH_TW_SERVERNAME, new int[][]{{1, 2}, {3}, {4, 5}}); 10 | 11 | private int id; 12 | 13 | private String lang; 14 | 15 | private String serverName; 16 | 17 | private int[][] stage; 18 | 19 | private Locale(int id, String lang, String serverName, int[][] stage) { 20 | this.id = id; 21 | this.lang = lang; 22 | this.serverName = serverName; 23 | this.stage = stage; 24 | } 25 | 26 | public static Locale get(int id) { 27 | if (id == 0) { 28 | return ZH_CN; 29 | } 30 | return ZH_TW; 31 | } 32 | 33 | public String getLang() { 34 | return lang; 35 | } 36 | 37 | public String getServerName() { 38 | return serverName; 39 | } 40 | 41 | public int[][] getStage() { 42 | return stage; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/statics/StaticHelper.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.statics; 2 | 3 | /** 4 | * Created by Sun45 on 2021/5/23 5 | * 静态参数 6 | */ 7 | public class StaticHelper { 8 | //BOSS总个数 9 | public static final int BOSS_COUNT = 5; 10 | 11 | public static final String ZH_CN_LANG = "zh-cn"; 12 | public static final String ZH_TW_LANG = "zh-tw"; 13 | 14 | public static final String ZH_CN_SERVERNAME = "国服"; 15 | public static final String ZH_TW_SERVERNAME = "台服"; 16 | 17 | // App URL 18 | public static final String APK_OWNER = "Sun45"; 19 | public static final String APK_REPOSITORY = "warbanner"; 20 | public static final String APK_BRANCH = "caimogu"; 21 | public static final String APP_UPDATE_LOG_PATH = "update_log.json"; 22 | public static final String APK_PATH = "apk/warbanner-release.apk"; 23 | public static final String APK_NAME = "update.apk"; 24 | 25 | //踩蘑菇会战数据请求地址 26 | public static final String CAIMOGU_BASE = "https://www.caimogu.cc/gzlj/"; 27 | public static final String CAIMOGU_BASEDATA_URL = "https://www.caimogu.cc/gzlj/data/icon"; 28 | public static final String CAIMOGU_TEAMDATA_URL = "https://www.caimogu.cc/gzlj/data"; 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/statics/TeamType.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.statics; 2 | 3 | /** 4 | * Created by Sun45 on 2022/6/9 5 | * 阵容类型 6 | */ 7 | public enum TeamType { 8 | AUTO(1), NORMAL(2), FINISH(3); 9 | 10 | private int type; 11 | 12 | private TeamType(int type) { 13 | this.type = type; 14 | } 15 | 16 | public int getType() { 17 | return type; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/statics/charactertype/CharacterOwnType.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.statics.charactertype; 2 | 3 | /** 4 | * Created by Sun45 on 2022/10/27 5 | * 角色拥有类型 6 | */ 7 | public enum CharacterOwnType { 8 | TYPE_OWN(CharacterScreenType.TYPE_DEFAULT),//拥有角色 9 | TYPE_LACK(CharacterScreenType.TYPE_YELLOW),//缺失但可借 10 | TYPE_SKIP(CharacterScreenType.TYPE_RED);//缺失并不可借 11 | 12 | private CharacterScreenType screenType; 13 | 14 | private CharacterOwnType(CharacterScreenType screenType) { 15 | this.screenType = screenType; 16 | } 17 | 18 | public CharacterScreenType getScreenType() { 19 | return screenType; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/statics/charactertype/CharacterScreenType.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.statics.charactertype; 2 | 3 | import android.content.Context; 4 | 5 | import cn.sun45.warbanner.R; 6 | import cn.sun45.warbanner.util.Utils; 7 | 8 | /** 9 | * Created by Sun45 on 2022/10/27 10 | * 角色筛选类型 11 | */ 12 | public enum CharacterScreenType { 13 | TYPE_DEFAULT(0),//默认展示类型 14 | TYPE_YELLOW(1),//黄色展示类型 15 | TYPE_RED(2);//红色展示类型 16 | 17 | private int type; 18 | 19 | private CharacterScreenType(int type) { 20 | this.type = type; 21 | } 22 | 23 | public int getType() { 24 | return type; 25 | } 26 | 27 | public int getBgColor(Context context) { 28 | int color = 0; 29 | switch (type) { 30 | case 0: 31 | color = Utils.getColor(R.color.theme_dark); 32 | break; 33 | case 1: 34 | color = Utils.getAttrColor(context, R.attr.colorSecondary); 35 | break; 36 | case 2: 37 | color = Utils.getAttrColor(context, R.attr.colorPrimary); 38 | break; 39 | } 40 | return color; 41 | } 42 | 43 | public int getTextColor() { 44 | int color = 0; 45 | switch (type) { 46 | case 0://默认 47 | color = Utils.getColor(R.color.white_50); 48 | break; 49 | case 1://TYPE_LACK 50 | color = Utils.getColor(R.color.black); 51 | break; 52 | case 2://TYPE_SKIP 53 | color = Utils.getColor(R.color.black); 54 | break; 55 | } 56 | return color; 57 | } 58 | 59 | public static CharacterScreenType get(int type) { 60 | CharacterScreenType characterScreenType = CharacterScreenType.TYPE_DEFAULT; 61 | switch (type) { 62 | case 0: 63 | characterScreenType = CharacterScreenType.TYPE_DEFAULT; 64 | break; 65 | case 1: 66 | characterScreenType = CharacterScreenType.TYPE_YELLOW; 67 | break; 68 | case 2: 69 | characterScreenType = CharacterScreenType.TYPE_RED; 70 | break; 71 | } 72 | return characterScreenType; 73 | } 74 | 75 | public CharacterScreenType next() { 76 | return get(type + 1); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/document/statics/charactertype/CharacterUseType.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.document.statics.charactertype; 2 | 3 | /** 4 | * Created by Sun45 on 2022/10/27 5 | * 角色使用类型 6 | */ 7 | public enum CharacterUseType { 8 | TYPE_USEABLE(CharacterScreenType.TYPE_DEFAULT),//未使用 9 | TYPE_USING(CharacterScreenType.TYPE_YELLOW),//已进行实战 10 | TYPE_USED(CharacterScreenType.TYPE_RED);//使用限制 11 | 12 | private CharacterScreenType screenType; 13 | 14 | private CharacterUseType(CharacterScreenType screenType) { 15 | this.screenType = screenType; 16 | } 17 | 18 | public CharacterScreenType getScreenType() { 19 | return screenType; 20 | } 21 | 22 | public static CharacterUseType get(int type) { 23 | CharacterScreenType characterScreenType = CharacterScreenType.get(type); 24 | CharacterUseType characterUseType = TYPE_USEABLE; 25 | switch (characterScreenType) { 26 | case TYPE_DEFAULT: 27 | characterUseType = TYPE_USEABLE; 28 | break; 29 | case TYPE_YELLOW: 30 | characterUseType = TYPE_USING; 31 | break; 32 | case TYPE_RED: 33 | characterUseType = TYPE_USED; 34 | break; 35 | } 36 | return characterUseType; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/framework/document/preference/BasePreference.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.framework.document.preference; 2 | 3 | import android.content.SharedPreferences; 4 | import android.text.TextUtils; 5 | 6 | import java.lang.reflect.Field; 7 | 8 | /** 9 | * Created by Sun45 on 2019/10/28. 10 | * SharedPreferences基础类 11 | */ 12 | public abstract class BasePreference { 13 | 14 | public abstract String getName(); 15 | 16 | /** 17 | * 获取Preference参数信息 18 | * 19 | * @param key 20 | * @return 21 | */ 22 | public Field getField(String key) { 23 | Field[] declaredFields = getClass().getDeclaredFields(); 24 | for (Field field : declaredFields) { 25 | if (field.getName().equals(key)) { 26 | return field; 27 | } 28 | } 29 | throw new IllegalStateException("class \"" + getClass().getName() + "\" without field \"" + key); 30 | } 31 | 32 | /** 33 | * 注册监听 34 | * 35 | * @param listener 36 | */ 37 | public void registListener(SharedPreferences.OnSharedPreferenceChangeListener listener) { 38 | PreferenceManager.registListener(listener, getName()); 39 | } 40 | 41 | /** 42 | * 移除监听 43 | * 44 | * @param listener 45 | */ 46 | public void unregistListener(SharedPreferences.OnSharedPreferenceChangeListener listener) { 47 | PreferenceManager.unregistListener(listener, getName()); 48 | } 49 | 50 | /** 51 | * 数据读取 52 | * 53 | * @param key 54 | * @param 55 | * @return 56 | */ 57 | protected T load(String key) { 58 | if (TextUtils.isEmpty("key")) { 59 | throw new IllegalStateException("load empty key from \"" + getClass().getName() + "\""); 60 | } 61 | return PreferenceManager.load(getClass(), key); 62 | } 63 | 64 | /** 65 | * 数据存储 66 | * 67 | * @param key 68 | * @param value 69 | */ 70 | protected void save(String key, Object value) { 71 | if (TextUtils.isEmpty("key")) { 72 | throw new IllegalStateException("save empty key to \"" + getClass().getName() + "\""); 73 | } 74 | PreferenceManager.save(getClass(), key, value); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/framework/file/FileRequestListener.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.framework.file; 2 | 3 | import com.liulishuo.okdownload.DownloadTask; 4 | 5 | /** 6 | * Created by Sun45 on 2019/10/29. 7 | * 文件请求监听 8 | */ 9 | public interface FileRequestListener { 10 | void start(); 11 | 12 | void complete(String url, String path, String name); 13 | 14 | void error(String url, String path, String name, String msg); 15 | 16 | void duplicate(String url, String path, String name); 17 | 18 | void end(DownloadTask task); 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/framework/file/FileRequestListenerWithProgress.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.framework.file; 2 | 3 | /** 4 | * Created by Sun45 on 2019/10/29. 5 | * 带进度文件请求监听 6 | */ 7 | public interface FileRequestListenerWithProgress extends FileRequestListener { 8 | void progress(long currentOffset, long totalLength, float percent, int progress); 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/framework/logic/ConverterFactory.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.framework.logic; 2 | 3 | import org.json.JSONArray; 4 | import org.json.JSONObject; 5 | 6 | import java.lang.annotation.Annotation; 7 | import java.lang.reflect.Type; 8 | 9 | import okhttp3.ResponseBody; 10 | import retrofit2.Converter; 11 | import retrofit2.Retrofit; 12 | 13 | /** 14 | * Created by Sun45 on 2019/10/28. 15 | * 变换器工厂 16 | */ 17 | public class ConverterFactory extends Converter.Factory { 18 | @Override 19 | public Converter responseBodyConverter(Type type, Annotation[] annotations, Retrofit retrofit) { 20 | if (type == JSONObject.class) { 21 | return new JSONObjectConverter(); 22 | } else if (type == JSONArray.class) { 23 | return new JSONArrayConverter(); 24 | } else if (type==String.class) { 25 | return new StringConverter(); 26 | } 27 | return null; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/framework/logic/JSONArrayConverter.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.framework.logic; 2 | 3 | import org.json.JSONArray; 4 | import org.json.JSONException; 5 | 6 | import java.io.IOException; 7 | 8 | import okhttp3.ResponseBody; 9 | import retrofit2.Converter; 10 | 11 | /** 12 | * Created by Sun45 on 2019/10/28. 13 | * JSONArray变换器 14 | */ 15 | public class JSONArrayConverter implements Converter { 16 | @Override 17 | public JSONArray convert(ResponseBody value) throws IOException { 18 | String result = value.string(); 19 | JSONArray jsonArray = null; 20 | try { 21 | jsonArray = new JSONArray(result); 22 | } catch (JSONException e) { 23 | e.printStackTrace(); 24 | } 25 | return jsonArray; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/framework/logic/JSONObjectConverter.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.framework.logic; 2 | 3 | import org.json.JSONException; 4 | import org.json.JSONObject; 5 | 6 | import java.io.IOException; 7 | 8 | import okhttp3.ResponseBody; 9 | import retrofit2.Converter; 10 | 11 | /** 12 | * Created by Sun45 on 2019/10/28. 13 | * JSONObject变换器 14 | */ 15 | public class JSONObjectConverter implements Converter { 16 | @Override 17 | public JSONObject convert(ResponseBody value) throws IOException { 18 | String result = value.string(); 19 | JSONObject jsonObj = null; 20 | try { 21 | jsonObj = new JSONObject(result); 22 | } catch (JSONException e) { 23 | e.printStackTrace(); 24 | } 25 | return jsonObj; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/framework/logic/RequestListener.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.framework.logic; 2 | 3 | /** 4 | * Created by Sun45 on 2019/10/28. 5 | * 网络请求监听器 6 | */ 7 | public interface RequestListener { 8 | void onSuccess(T result); 9 | 10 | void onFailed(String message); 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/framework/logic/StringConverter.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.framework.logic; 2 | 3 | import java.io.IOException; 4 | 5 | import okhttp3.ResponseBody; 6 | import retrofit2.Converter; 7 | 8 | /** 9 | * Created by Sun45 on 2019/10/28. 10 | * String变换器 11 | */ 12 | public class StringConverter implements Converter { 13 | @Override 14 | public String convert(ResponseBody value) throws IOException { 15 | return value.string(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/framework/permission/PermissionRequestListener.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.framework.permission; 2 | 3 | /** 4 | * Created by Sun45 on 2019/10/29. 5 | * 权限申请监听 6 | */ 7 | public interface PermissionRequestListener { 8 | void permissionGained(); 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/framework/record/BaseRecordManager.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.framework.record; 2 | 3 | import java.io.File; 4 | import java.text.SimpleDateFormat; 5 | import java.util.Date; 6 | 7 | import cn.sun45.warbanner.framework.MyApplication; 8 | import cn.sun45.warbanner.util.FileUtil; 9 | 10 | 11 | /** 12 | * Created by Sun45 on 2021/2/5. 13 | * 记录管理 14 | */ 15 | public abstract class BaseRecordManager { 16 | protected abstract String getDirPath(); 17 | 18 | /** 19 | * 保存记录内容 20 | * 21 | * @param content 22 | */ 23 | protected void append(String content) { 24 | String file = getDirPath(); 25 | new File(file).mkdirs(); 26 | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(MyApplication.getTimecurrent())); 27 | String date = time.substring(0, 10); 28 | time = time.substring(11); 29 | file += File.separator + date; 30 | FileUtil.writeFile(file, time + "\n" + content + "\n", true); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/framework/record/ErrorRecordManager.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.framework.record; 2 | 3 | import cn.sun45.warbanner.util.FileUtil; 4 | 5 | /** 6 | * Created by Sun45 on 2021/2/5. 7 | * 错误记录管理 8 | */ 9 | public class ErrorRecordManager extends BaseRecordManager { 10 | @Override 11 | public String getDirPath() { 12 | return FileUtil.getExternalFilesDir("error"); 13 | } 14 | 15 | //单例对象 16 | private static ErrorRecordManager instance; 17 | 18 | public static ErrorRecordManager getInstance() { 19 | if (instance == null) { 20 | synchronized (ErrorRecordManager.class) { 21 | if (instance == null) { 22 | instance = new ErrorRecordManager(); 23 | } 24 | } 25 | } 26 | return instance; 27 | } 28 | 29 | public void save(String content) { 30 | append(content); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/framework/ui/BaseActivity.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.framework.ui; 2 | 3 | import android.os.Bundle; 4 | 5 | import androidx.annotation.Nullable; 6 | import androidx.appcompat.app.AppCompatActivity; 7 | 8 | import cn.sun45.warbanner.framework.MyApplication; 9 | import cn.sun45.warbanner.util.Utils; 10 | 11 | /** 12 | * Created by Sun45 on 2021/5/19 13 | */ 14 | public abstract class BaseActivity extends AppCompatActivity { 15 | @Override 16 | protected void onCreate(@Nullable Bundle savedInstanceState) { 17 | super.onCreate(savedInstanceState); 18 | MyApplication.setCurrentActivity(this); 19 | setContentView(getContentViewId()); 20 | initData(); 21 | refreshDB(); 22 | initView(); 23 | initNet(); 24 | } 25 | 26 | @Override 27 | protected void onResume() { 28 | MyApplication.setCurrentActivity(this); 29 | super.onResume(); 30 | } 31 | 32 | protected abstract int getContentViewId(); 33 | 34 | protected void refreshDB() { 35 | } 36 | 37 | protected abstract void initData(); 38 | 39 | protected abstract void initView(); 40 | 41 | protected abstract void initNet(); 42 | 43 | protected void logD(String msg) { 44 | Utils.logD(this.getClass().getName(), msg); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/framework/ui/BaseVerticalRecyclerView.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.framework.ui; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | import androidx.annotation.NonNull; 7 | import androidx.annotation.Nullable; 8 | import androidx.recyclerview.widget.RecyclerView; 9 | 10 | /** 11 | * Created by Sun45 on 2023/10/22 12 | */ 13 | public class BaseVerticalRecyclerView extends RecyclerView { 14 | public BaseVerticalRecyclerView(@NonNull Context context) { 15 | super(context); 16 | init(); 17 | } 18 | 19 | public BaseVerticalRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs) { 20 | super(context, attrs); 21 | init(); 22 | } 23 | 24 | public BaseVerticalRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { 25 | super(context, attrs, defStyleAttr); 26 | init(); 27 | } 28 | 29 | private void init() { 30 | setVerticalFadingEdgeEnabled(true); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/logic/app/AppLogic.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.logic.app; 2 | 3 | import org.json.JSONObject; 4 | 5 | import cn.sun45.warbanner.document.statics.StaticHelper; 6 | import cn.sun45.warbanner.framework.logic.BaseLogic; 7 | import cn.sun45.warbanner.framework.logic.RequestListener; 8 | import cn.sun45.warbanner.util.GithubUtils; 9 | import retrofit2.Call; 10 | import retrofit2.Callback; 11 | import retrofit2.Response; 12 | import retrofit2.http.GET; 13 | import retrofit2.http.Header; 14 | import retrofit2.http.Headers; 15 | import retrofit2.http.Url; 16 | 17 | /** 18 | * Created by Sun45 on 2021/5/29 19 | * 应用Logic 20 | */ 21 | public class AppLogic extends BaseLogic { 22 | interface Api { 23 | @Headers("Cache-Control: no-store") 24 | @GET 25 | Call checkAppVersion(@Header("User-Agent") String userAgent, @Url String url); 26 | } 27 | 28 | public Call checkAppVersion(final RequestListener listener) { 29 | String url = GithubUtils.getFileUrl(GithubUtils.TYPE_RAW, StaticHelper.APK_OWNER, StaticHelper.APK_REPOSITORY, StaticHelper.APK_BRANCH, StaticHelper.APP_UPDATE_LOG_PATH); 30 | Call call = retrofit(url).create(Api.class).checkAppVersion(getUserAgent(), url); 31 | call.enqueue(new Callback() { 32 | @Override 33 | public void onResponse(Call call, Response response) { 34 | JSONObject obj = response.body(); 35 | if (obj != null) { 36 | AppModel appModel = new AppModel(); 37 | appModel.setVersionCode(obj.optInt("versionCode")); 38 | appModel.setVersionName(obj.optString("versionName")); 39 | appModel.setFource(obj.optBoolean("fource")); 40 | appModel.setContent(obj.optString("content")); 41 | listener.onSuccess(appModel); 42 | } else { 43 | listener.onFailed("onResponse empty"); 44 | } 45 | } 46 | 47 | @Override 48 | public void onFailure(Call call, Throwable t) { 49 | listener.onFailed(t.getMessage()); 50 | } 51 | }); 52 | return call; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/logic/app/AppModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.logic.app; 2 | 3 | /** 4 | * Created by Sun45 on 2021/5/29 5 | * 安装包信息 6 | */ 7 | public class AppModel { 8 | private int versionCode; 9 | private String versionName; 10 | private boolean fource; 11 | private String content; 12 | 13 | public int getVersionCode() { 14 | return versionCode; 15 | } 16 | 17 | public void setVersionCode(int versionCode) { 18 | this.versionCode = versionCode; 19 | } 20 | 21 | public String getVersionName() { 22 | return versionName; 23 | } 24 | 25 | public void setVersionName(String versionName) { 26 | this.versionName = versionName; 27 | } 28 | 29 | public boolean isFource() { 30 | return fource; 31 | } 32 | 33 | public void setFource(boolean fource) { 34 | this.fource = fource; 35 | } 36 | 37 | public String getContent() { 38 | return content; 39 | } 40 | 41 | public void setContent(String content) { 42 | this.content = content; 43 | } 44 | 45 | @Override 46 | public String toString() { 47 | return "AppModel{" + 48 | "versionCode=" + versionCode + 49 | ", versionName='" + versionName + '\'' + 50 | ", fource=" + fource + 51 | ", content='" + content + '\'' + 52 | '}'; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/logic/caimogu/CaimoguBaseData.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.logic.caimogu; 2 | 3 | import java.util.List; 4 | 5 | import cn.sun45.warbanner.document.database.source.models.BossModel; 6 | import cn.sun45.warbanner.document.database.source.models.CharacterModel; 7 | 8 | /** 9 | * Created by Sun45 on 2022/6/9 10 | * 踩蘑菇基础数据 11 | */ 12 | public class CaimoguBaseData { 13 | private List characterModels; 14 | 15 | private List bossModels; 16 | 17 | public List getCharacterModels() { 18 | return characterModels; 19 | } 20 | 21 | public void setCharacterModels(List characterModels) { 22 | this.characterModels = characterModels; 23 | } 24 | 25 | public List getBossModels() { 26 | return bossModels; 27 | } 28 | 29 | public void setBossModels(List bossModels) { 30 | this.bossModels = bossModels; 31 | } 32 | 33 | public boolean isEmpty() { 34 | return characterModels == null || characterModels.isEmpty() || bossModels == null || bossModels.isEmpty(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/server/ServerManager.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.server; 2 | 3 | import androidx.annotation.StringRes; 4 | 5 | import cn.sun45.warbanner.datamanager.data.DataManager; 6 | import cn.sun45.warbanner.document.preference.SetupPreference; 7 | import cn.sun45.warbanner.document.statics.Locale; 8 | 9 | /** 10 | * Created by Sun45 on 2022/6/11 11 | * 服务管理 12 | */ 13 | public class ServerManager { 14 | //单例对象 15 | private static ServerManager instance; 16 | 17 | public static ServerManager getInstance() { 18 | if (instance == null) { 19 | synchronized (ServerManager.class) { 20 | if (instance == null) { 21 | instance = new ServerManager(); 22 | } 23 | } 24 | } 25 | return instance; 26 | } 27 | 28 | private IActivityCallBack iActivityCallBack; 29 | 30 | public void setiActivityCallBack(IActivityCallBack iActivityCallBack) { 31 | this.iActivityCallBack = iActivityCallBack; 32 | } 33 | 34 | public Locale getLocal() { 35 | return Locale.get(new SetupPreference().getServer()); 36 | } 37 | 38 | public String getLang() { 39 | return getLocal().getLang(); 40 | } 41 | 42 | public String getServerName() { 43 | return getLocal().getServerName(); 44 | } 45 | 46 | public int getCurrentServer() { 47 | return new SetupPreference().getServer(); 48 | } 49 | 50 | public void setCurrentServer(int position) { 51 | int currentServer = getCurrentServer(); 52 | if (currentServer != position) { 53 | new SetupPreference().setServer(position); 54 | if (iActivityCallBack != null) { 55 | iActivityCallBack.serverUpdate(); 56 | } 57 | } 58 | } 59 | 60 | public interface IActivityCallBack { 61 | void showSnackBar(@StringRes int messageRes); 62 | 63 | void serverUpdate(); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/stage/StageManager.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.stage; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Arrays; 5 | import java.util.List; 6 | 7 | import cn.sun45.warbanner.document.database.source.models.TeamModel; 8 | import cn.sun45.warbanner.document.statics.Locale; 9 | import cn.sun45.warbanner.server.ServerManager; 10 | 11 | /** 12 | * Created by Sun45 on 2022/6/11 13 | * 阶段管理 14 | */ 15 | public class StageManager { 16 | //单例对象 17 | private static StageManager instance; 18 | 19 | public static StageManager getInstance() { 20 | if (instance == null) { 21 | synchronized (StageManager.class) { 22 | if (instance == null) { 23 | instance = new StageManager(); 24 | } 25 | } 26 | } 27 | return instance; 28 | } 29 | 30 | public int[][] getStage() { 31 | return ServerManager.getInstance().getLocal().getStage(); 32 | } 33 | 34 | public int getStageCount() { 35 | return getStage().length; 36 | } 37 | 38 | public int[] getStageArray(int stagePosition) { 39 | return getStage()[stagePosition]; 40 | } 41 | 42 | public String getStageDescription(int stagePosition) { 43 | int[] array = getStageArray(stagePosition); 44 | StringBuilder stringBuilder = new StringBuilder(); 45 | for (int i = 0; i < array.length; i++) { 46 | if (i != 0) { 47 | stringBuilder.append("+"); 48 | } 49 | stringBuilder.append((char) ('A' + array[i] - 1)); 50 | } 51 | stringBuilder.append("面"); 52 | return stringBuilder.toString(); 53 | } 54 | 55 | public List getStageDescriptionList() { 56 | List list = new ArrayList<>(); 57 | for (int i = 0; i < getStageCount(); i++) { 58 | list.add(getStageDescription(i)); 59 | } 60 | return list; 61 | } 62 | 63 | public boolean matchTeamModel(TeamModel teamModel, int stagePosition) { 64 | int[] stageArray = getStageArray(stagePosition); 65 | for (int stage : stageArray) { 66 | if (stage==teamModel.getStage()) { 67 | return true; 68 | } 69 | } 70 | return false; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/teamgroup/TeamGroupElementModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.teamgroup; 2 | 3 | import java.util.List; 4 | import java.util.stream.Collectors; 5 | 6 | import cn.sun45.warbanner.document.database.setup.models.TeamCustomizeModel; 7 | import cn.sun45.warbanner.document.database.source.models.TeamModel; 8 | 9 | /** 10 | * Created by Sun45 on 2021/5/30 11 | * 分刀元素数据 12 | */ 13 | public class TeamGroupElementModel { 14 | private List idlist; 15 | private int screencharacter; 16 | private TeamModel teamModel; 17 | private TeamCustomizeModel teamCustomizeModel; 18 | 19 | public List getIdlist() { 20 | return idlist; 21 | } 22 | 23 | public void setIdlist(List idlist) { 24 | this.idlist = idlist; 25 | } 26 | 27 | public int getScreencharacter() { 28 | return screencharacter; 29 | } 30 | 31 | public void setScreencharacter(int screencharacter) { 32 | this.screencharacter = screencharacter; 33 | } 34 | 35 | public TeamModel getTeamModel() { 36 | return teamModel; 37 | } 38 | 39 | public void setTeamModel(TeamModel teamModel) { 40 | this.teamModel = teamModel; 41 | } 42 | 43 | public TeamCustomizeModel getTeamCustomizeModel() { 44 | return teamCustomizeModel; 45 | } 46 | 47 | public void setTeamCustomizeModel(TeamCustomizeModel teamCustomizeModel) { 48 | this.teamCustomizeModel = teamCustomizeModel; 49 | } 50 | 51 | public int getDamage() { 52 | if (teamCustomizeModel != null && teamCustomizeModel.damageEffective()) { 53 | return teamCustomizeModel.getDamage(); 54 | } else { 55 | return teamModel.getDamage(); 56 | } 57 | } 58 | 59 | public TeamGroupElementModel getCopy() { 60 | TeamGroupElementModel model = new TeamGroupElementModel(); 61 | model.setIdlist(idlist.stream().collect(Collectors.toList())); 62 | model.setScreencharacter(screencharacter); 63 | model.setTeamModel(getTeamModel()); 64 | model.setTeamCustomizeModel(teamCustomizeModel); 65 | return model; 66 | } 67 | 68 | @Override 69 | public String toString() { 70 | return "{" + 71 | "idlist=" + idlist + 72 | ", screencharacter=" + screencharacter + 73 | '}'; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/fragments/menu/MenuFragment.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.fragments.menu; 2 | 3 | import android.view.View; 4 | 5 | import androidx.fragment.app.FragmentManager; 6 | import androidx.fragment.app.FragmentTransaction; 7 | 8 | import cn.sun45.warbanner.R; 9 | import cn.sun45.warbanner.framework.ui.BaseFragment; 10 | 11 | /** 12 | * Created by Sun45 on 2021/5/22 13 | * 菜单Fragment 14 | */ 15 | public class MenuFragment extends BaseFragment { 16 | private View mContiner; 17 | 18 | @Override 19 | protected int getContentViewId() { 20 | return R.layout.fragment_menu; 21 | } 22 | 23 | @Override 24 | protected void initData() { 25 | } 26 | 27 | @Override 28 | protected void initView() { 29 | mContiner=mRoot.findViewById(R.id.continer); 30 | 31 | 32 | FragmentManager fragmentManager = getChildFragmentManager(); 33 | FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); 34 | fragmentTransaction.replace(R.id.continer,new MenuPreferecefragment()).commit(); 35 | } 36 | 37 | @Override 38 | protected void dataRequest() { 39 | 40 | } 41 | 42 | @Override 43 | protected void onShow() { 44 | 45 | } 46 | 47 | @Override 48 | protected void onHide() { 49 | 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/fragments/record/RecordTextFragment.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.fragments.record; 2 | 3 | import android.content.ClipData; 4 | import android.content.ClipboardManager; 5 | import android.content.Context; 6 | import android.os.Bundle; 7 | import android.view.Menu; 8 | import android.view.MenuInflater; 9 | import android.view.MenuItem; 10 | import android.view.View; 11 | import android.widget.TextView; 12 | 13 | import androidx.annotation.NonNull; 14 | import androidx.navigation.Navigation; 15 | 16 | import com.google.android.material.appbar.MaterialToolbar; 17 | 18 | import org.jetbrains.annotations.NotNull; 19 | 20 | import cn.sun45.warbanner.R; 21 | import cn.sun45.warbanner.framework.ui.BaseActivity; 22 | import cn.sun45.warbanner.framework.ui.BaseFragment; 23 | import cn.sun45.warbanner.util.FileUtil; 24 | import cn.sun45.warbanner.util.Utils; 25 | 26 | /** 27 | * Created by Sun45 on 2021/6/4 28 | * 记录内容Fragment 29 | */ 30 | public class RecordTextFragment extends BaseFragment { 31 | private String path; 32 | private String content; 33 | 34 | private TextView mText; 35 | 36 | @Override 37 | protected int getContentViewId() { 38 | return R.layout.fragment_recordtext; 39 | } 40 | 41 | @Override 42 | protected void initData() { 43 | Bundle bundle = getArguments(); 44 | path = bundle.getString("path"); 45 | content = FileUtil.convertCodeAndGetText(path); 46 | setHasOptionsMenu(true); 47 | } 48 | 49 | @Override 50 | protected void initView() { 51 | MaterialToolbar toolbar = mRoot.findViewById(R.id.drop_toolbar); 52 | ((BaseActivity) getActivity()).setSupportActionBar(toolbar); 53 | toolbar.setNavigationOnClickListener(v -> Navigation.findNavController(v).navigateUp()); 54 | 55 | mText = mRoot.findViewById(R.id.text); 56 | } 57 | 58 | @Override 59 | protected void dataRequest() { 60 | mText.setText(content); 61 | } 62 | 63 | @Override 64 | protected void onShow() { 65 | 66 | } 67 | 68 | @Override 69 | protected void onHide() { 70 | 71 | } 72 | 73 | @Override 74 | public void onCreateOptionsMenu(@NonNull @NotNull Menu menu, @NonNull @NotNull MenuInflater inflater) { 75 | menu.clear(); 76 | inflater.inflate(R.menu.fragment_record_text_drop_toolbar, menu); 77 | } 78 | 79 | @Override 80 | public boolean onOptionsItemSelected(@NonNull @NotNull MenuItem item) { 81 | switch (item.getItemId()) { 82 | case R.id.menu_copy: 83 | ClipboardManager cm = (ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE); 84 | ClipData mClipData = ClipData.newPlainText("Label", content); 85 | cm.setPrimaryClip(mClipData); 86 | Utils.tip(getView(), R.string.record_text_menu_copy_hint); 87 | break; 88 | } 89 | return true; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/shared/SharedViewModelClanwar.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.shared; 2 | 3 | import androidx.lifecycle.MutableLiveData; 4 | import androidx.lifecycle.ViewModel; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | import cn.sun45.warbanner.document.database.setup.SetupDataBase; 10 | import cn.sun45.warbanner.document.database.setup.models.TeamCustomizeModel; 11 | import cn.sun45.warbanner.document.database.setup.models.TeamGroupCollectionModel; 12 | import cn.sun45.warbanner.user.UserManager; 13 | 14 | /** 15 | * Created by Sun45 on 2021/6/30 16 | * 会战数据 17 | */ 18 | public class SharedViewModelClanwar extends ViewModel { 19 | public MutableLiveData> teamCustomizeList = new MutableLiveData<>(); 20 | public MutableLiveData> teamGroupCollectionList = new MutableLiveData<>(); 21 | 22 | public void loadData() { 23 | boolean succeeded = true; 24 | int userId = UserManager.getInstance().getCurrentUserId(); 25 | List customizeList = SetupDataBase.getInstance().setupDao().queryAllTeamCustomize(); 26 | List collectionlist = SetupDataBase.getInstance().setupDao().queryAllTeamGroupCollection(userId); 27 | if (customizeList == null || customizeList.isEmpty()) { 28 | succeeded = false; 29 | } 30 | if (collectionlist == null || collectionlist.isEmpty()) { 31 | succeeded = false; 32 | } 33 | teamCustomizeList.postValue(customizeList); 34 | teamGroupCollectionList.postValue(collectionlist); 35 | } 36 | 37 | public void clearData() { 38 | teamGroupCollectionList.postValue(new ArrayList<>()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/shared/SharedViewModelSource.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.shared; 2 | 3 | import androidx.lifecycle.MutableLiveData; 4 | import androidx.lifecycle.ViewModel; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | import cn.sun45.warbanner.document.database.source.SourceDataBase; 10 | import cn.sun45.warbanner.document.database.source.models.BossModel; 11 | import cn.sun45.warbanner.document.database.source.models.CharacterModel; 12 | import cn.sun45.warbanner.document.database.source.models.TeamModel; 13 | import cn.sun45.warbanner.framework.MyApplication; 14 | import cn.sun45.warbanner.server.ServerManager; 15 | import cn.sun45.warbanner.util.Utils; 16 | 17 | /** 18 | * Created by Sun45 on 2021/5/23 19 | * 数据源数据 20 | */ 21 | public class SharedViewModelSource extends ViewModel { 22 | private static final String TAG = "SharedViewModelSource"; 23 | 24 | public MutableLiveData> characterList = new MutableLiveData<>(); 25 | public MutableLiveData> bossList = new MutableLiveData<>(); 26 | public MutableLiveData> teamList = new MutableLiveData<>(); 27 | 28 | public void loadData() { 29 | List characterModelList = SourceDataBase.getInstance().sourceDao().queryAllCharacter(ServerManager.getInstance().getLang()); 30 | if (characterModelList != null && !characterModelList.isEmpty()) { 31 | characterList.postValue(characterModelList); 32 | if (MyApplication.testing) { 33 | for (CharacterModel characterModel : characterModelList) { 34 | Utils.logD(TAG, characterModel.toString()); 35 | } 36 | } 37 | } 38 | List bossModelList = SourceDataBase.getInstance().sourceDao().queryAllBoss(ServerManager.getInstance().getLang()); 39 | if (bossModelList != null && !bossModelList.isEmpty()) { 40 | bossList.postValue(bossModelList); 41 | if (MyApplication.testing) { 42 | for (BossModel bossModel : bossModelList) { 43 | Utils.logD(TAG, bossModel.toString()); 44 | } 45 | } 46 | } 47 | List teamModelList = SourceDataBase.getInstance().sourceDao().queryAllTeam(ServerManager.getInstance().getLang()); 48 | if (teamModelList != null && !teamModelList.isEmpty()) { 49 | teamList.postValue(teamModelList); 50 | if (MyApplication.testing) { 51 | for (TeamModel teamModel : teamModelList) { 52 | Utils.logD(TAG, teamModel.toString()); 53 | } 54 | } 55 | } 56 | } 57 | 58 | public void clearData() { 59 | characterList.postValue(new ArrayList<>()); 60 | bossList.postValue(new ArrayList<>()); 61 | teamList.postValue(new ArrayList<>()); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/shared/SharedViewModelTeamScreenTeam.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.shared; 2 | 3 | import androidx.lifecycle.MutableLiveData; 4 | import androidx.lifecycle.ViewModel; 5 | 6 | import java.util.List; 7 | 8 | import cn.sun45.warbanner.document.database.setup.models.ScreenCharacterModel; 9 | import cn.sun45.warbanner.document.database.setup.models.TeamGroupScreenUsedCharacterModel; 10 | import cn.sun45.warbanner.document.database.source.models.CharacterModel; 11 | import cn.sun45.warbanner.document.database.source.models.TeamModel; 12 | 13 | /** 14 | * Created by Sun45 on 2021/7/4 15 | * 分刀筛选阵容数据 16 | */ 17 | public class SharedViewModelTeamScreenTeam extends ViewModel { 18 | public MutableLiveData teamOne = new MutableLiveData<>(); 19 | public MutableLiveData teamTwo = new MutableLiveData<>(); 20 | public MutableLiveData teamThree = new MutableLiveData<>(); 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/character/characterlist/CharacterListLayListener.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.character.characterlist; 2 | 3 | import cn.sun45.warbanner.document.database.source.models.CharacterModel; 4 | import cn.sun45.warbanner.document.statics.charactertype.CharacterScreenType; 5 | 6 | /** 7 | * Created by Sun45 on 2022/10/27 8 | * 角色列表容器监听 9 | */ 10 | public interface CharacterListLayListener { 11 | void changeState(CharacterModel characterModel, CharacterScreenType characterScreenType); 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/character/characterlist/characterlist/CharacterList.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.character.characterlist.characterlist; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | import androidx.annotation.NonNull; 7 | import androidx.annotation.Nullable; 8 | import androidx.recyclerview.widget.GridLayoutManager; 9 | 10 | import org.jetbrains.annotations.NotNull; 11 | 12 | import java.util.List; 13 | 14 | import cn.sun45.warbanner.framework.ui.BaseVerticalRecyclerView; 15 | 16 | /** 17 | * Created by Sun45 on 2021/5/30 18 | * 角色列表 19 | */ 20 | public class CharacterList extends BaseVerticalRecyclerView { 21 | private CharacterListAdapter adapter; 22 | 23 | public CharacterList(@NonNull @NotNull Context context, @Nullable @org.jetbrains.annotations.Nullable AttributeSet attrs) { 24 | super(context, attrs); 25 | init(); 26 | } 27 | 28 | private void init() { 29 | setVerticalScrollBarEnabled(false); 30 | setLayoutManager(new GridLayoutManager(getContext(), 5)); 31 | adapter = new CharacterListAdapter(getContext()); 32 | setAdapter(adapter); 33 | } 34 | 35 | public void setListener(CharacterListListener listener) { 36 | adapter.setListener(listener); 37 | } 38 | 39 | public void setData(List list) { 40 | adapter.setList(list); 41 | adapter.notifyDataSetChanged(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/character/characterlist/characterlist/CharacterListListener.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.character.characterlist.characterlist; 2 | 3 | import cn.sun45.warbanner.document.database.source.models.CharacterModel; 4 | import cn.sun45.warbanner.document.statics.charactertype.CharacterScreenType; 5 | 6 | /** 7 | * Created by Sun45 on 2021/5/30 8 | * 角色列表监听 9 | */ 10 | public interface CharacterListListener { 11 | void changeState(CharacterModel characterModel, CharacterScreenType characterScreenType); 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/character/characterlist/characterlist/CharacterListModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.character.characterlist.characterlist; 2 | 3 | import cn.sun45.warbanner.document.database.source.models.CharacterModel; 4 | import cn.sun45.warbanner.document.statics.charactertype.CharacterScreenType; 5 | 6 | /** 7 | * Created by Sun45 on 2021/5/30 8 | * 角色列表数据模型 9 | */ 10 | public class CharacterListModel { 11 | private CharacterModel characterModel; 12 | private CharacterScreenType characterScreenType; 13 | 14 | public CharacterListModel(CharacterModel characterModel, CharacterScreenType characterScreenType) { 15 | this.characterModel = characterModel; 16 | this.characterScreenType = characterScreenType; 17 | } 18 | 19 | public CharacterModel getCharacterModel() { 20 | return characterModel; 21 | } 22 | 23 | public void setCharacterModel(CharacterModel characterModel) { 24 | this.characterModel = characterModel; 25 | } 26 | 27 | public CharacterScreenType getCharacterScreenType() { 28 | return characterScreenType; 29 | } 30 | 31 | public void setCharacterScreenType(CharacterScreenType characterScreenType) { 32 | this.characterScreenType = characterScreenType; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/combinationlist/CombinationGroupModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.combinationlist; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by Sun45 on 2023/10/14 7 | * 套餐列表分组数据模型 8 | */ 9 | public class CombinationGroupModel { 10 | private int order; 11 | 12 | private String description; 13 | 14 | private int picSrc; 15 | 16 | private List list; 17 | 18 | public CombinationGroupModel(int order, String description, int picSrc, List list) { 19 | this.order = order; 20 | this.description = description; 21 | this.picSrc = picSrc; 22 | this.list = list; 23 | } 24 | 25 | public int getOrder() { 26 | return order; 27 | } 28 | 29 | public String getDescription() { 30 | return description; 31 | } 32 | 33 | public int getPicSrc() { 34 | return picSrc; 35 | } 36 | 37 | public List getList() { 38 | return list; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/combinationlist/CombinationListListener.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.combinationlist; 2 | 3 | import java.util.List; 4 | 5 | import cn.sun45.warbanner.ui.views.listselectbar.ListSelectItem; 6 | import cn.sun45.warbanner.ui.views.teamlist.TeamListReCalucateModel; 7 | 8 | 9 | /** 10 | * Created by Sun45 on 2023/9/24 11 | * 套餐列表监听 12 | */ 13 | public interface CombinationListListener { 14 | void dataSet(int count, List listSelectItems); 15 | 16 | void onScrolled(int first, int last); 17 | 18 | void open(CombinationListModel combinationListModel); 19 | 20 | void reCalucate(CombinationListModel combinationListModel); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/listselectbar/ListSelectBarListener.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.listselectbar; 2 | 3 | /** 4 | * Created by Sun45 on 2022/6/20 5 | * 列表选择器监听 6 | */ 7 | public interface ListSelectBarListener { 8 | void seek(int position); 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/listselectbar/ListSelectItem.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.listselectbar; 2 | 3 | import java.util.Objects; 4 | 5 | /** 6 | * Created by Sun45 on 2022/6/20 7 | * 列表选择元素 8 | */ 9 | public class ListSelectItem { 10 | private int position; 11 | private String picUrl; 12 | 13 | private int picSrc; 14 | 15 | public ListSelectItem(int position, String picUrl) { 16 | this.position = position; 17 | this.picUrl = picUrl; 18 | } 19 | 20 | public ListSelectItem(int position, int picSrc) { 21 | this.position = position; 22 | this.picSrc = picSrc; 23 | } 24 | 25 | public int getPosition() { 26 | return position; 27 | } 28 | 29 | public String getPicUrl() { 30 | return picUrl; 31 | } 32 | 33 | public int getPicSrc() { 34 | return picSrc; 35 | } 36 | 37 | @Override 38 | public boolean equals(Object o) { 39 | if (this == o) return true; 40 | if (o == null || getClass() != o.getClass()) return false; 41 | ListSelectItem that = (ListSelectItem) o; 42 | return position == that.position && Objects.equals(picUrl, that.picUrl); 43 | } 44 | 45 | @Override 46 | public int hashCode() { 47 | return Objects.hash(picUrl, position); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/portraittextview/PortraitTextView.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.portraittextview; 2 | 3 | import android.content.Context; 4 | import android.text.TextUtils; 5 | import android.util.AttributeSet; 6 | import android.widget.TextView; 7 | 8 | import androidx.annotation.Nullable; 9 | 10 | /** 11 | * Created by Sun45 on 2022/4/2 12 | * 纵向展示文本框 13 | */ 14 | public class PortraitTextView extends TextView { 15 | public PortraitTextView(Context context, @Nullable AttributeSet attrs) { 16 | super(context, attrs); 17 | String text = getText().toString(); 18 | if (!TextUtils.isEmpty(text)) { 19 | StringBuilder sb = new StringBuilder(); 20 | for (int i = 0; i < text.length(); i++) { 21 | if (i != 0) { 22 | sb.append("\n "); 23 | } else { 24 | sb.append(" "); 25 | } 26 | sb.append(text.charAt(i)); 27 | sb.append(" "); 28 | } 29 | setText(sb.toString()); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/recordlist/RecordList.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.recordlist; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | import androidx.annotation.NonNull; 7 | import androidx.annotation.Nullable; 8 | import androidx.recyclerview.widget.LinearLayoutManager; 9 | 10 | import org.jetbrains.annotations.NotNull; 11 | 12 | import java.util.List; 13 | 14 | import cn.sun45.warbanner.framework.ui.BaseVerticalRecyclerView; 15 | 16 | /** 17 | * Created by Sun45 on 2021/6/4 18 | * 纪录列表 19 | */ 20 | public class RecordList extends BaseVerticalRecyclerView { 21 | private RecordListAdapter adapter; 22 | 23 | public RecordList(@NonNull @NotNull Context context, @Nullable @org.jetbrains.annotations.Nullable AttributeSet attrs) { 24 | super(context, attrs); 25 | init(); 26 | } 27 | 28 | private void init() { 29 | setLayoutManager(new LinearLayoutManager(getContext())); 30 | adapter = new RecordListAdapter(getContext()); 31 | setAdapter(adapter); 32 | } 33 | 34 | public void setListener(RecordListListener listener) { 35 | adapter.setListener(listener); 36 | } 37 | 38 | public void setData(List list) { 39 | adapter.setList(list); 40 | adapter.notifyDataSetChanged(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/recordlist/RecordListAdapter.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.recordlist; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.TextView; 8 | 9 | import androidx.annotation.NonNull; 10 | import androidx.recyclerview.widget.RecyclerView; 11 | 12 | import org.jetbrains.annotations.NotNull; 13 | 14 | import java.util.List; 15 | 16 | import cn.sun45.warbanner.R; 17 | 18 | /** 19 | * Created by Sun45 on 2021/6/4 20 | * 纪录列表Adapter 21 | */ 22 | public class RecordListAdapter extends RecyclerView.Adapter { 23 | private static final String TAG = "RecordListAdapter"; 24 | 25 | private Context context; 26 | 27 | private RecordListListener listener; 28 | 29 | private List list; 30 | 31 | public RecordListAdapter(Context context) { 32 | this.context = context; 33 | } 34 | 35 | public void setListener(RecordListListener listener) { 36 | this.listener = listener; 37 | } 38 | 39 | public void setList(List list) { 40 | this.list = list; 41 | } 42 | 43 | @NotNull 44 | @Override 45 | public Holder onCreateViewHolder(@NonNull @NotNull ViewGroup parent, int viewType) { 46 | View view = LayoutInflater.from(context).inflate(R.layout.recordlist_item, parent, false); 47 | return new Holder(view); 48 | } 49 | 50 | @Override 51 | public void onBindViewHolder(@NonNull @NotNull RecordListAdapter.Holder holder, int position) { 52 | holder.setData(list.get(position)); 53 | } 54 | 55 | @Override 56 | public int getItemCount() { 57 | return list != null ? list.size() : 0; 58 | } 59 | 60 | public class Holder extends RecyclerView.ViewHolder { 61 | private TextView mText; 62 | 63 | private RecordListModel model; 64 | 65 | public Holder(@NonNull @NotNull View itemView) { 66 | super(itemView); 67 | mText = itemView.findViewById(R.id.text); 68 | itemView.setOnClickListener(new View.OnClickListener() { 69 | @Override 70 | public void onClick(View v) { 71 | if (listener != null) { 72 | listener.click(model); 73 | } 74 | } 75 | }); 76 | } 77 | 78 | public void setData(RecordListModel recordListModel) { 79 | model = recordListModel; 80 | mText.setText(recordListModel.getName()); 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/recordlist/RecordListListener.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.recordlist; 2 | 3 | /** 4 | * Created by Sun45 on 2021/6/5 5 | * 纪录列表监听 6 | */ 7 | public interface RecordListListener { 8 | void click(RecordListModel recordListModel); 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/recordlist/RecordListModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.recordlist; 2 | 3 | /** 4 | * Created by Sun45 on 2021/6/5 5 | * 纪录列表数据模型 6 | */ 7 | public class RecordListModel { 8 | private String name; 9 | private String path; 10 | 11 | public String getName() { 12 | return name; 13 | } 14 | 15 | public void setName(String name) { 16 | this.name = name; 17 | } 18 | 19 | public String getPath() { 20 | return path; 21 | } 22 | 23 | public void setPath(String path) { 24 | this.path = path; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/selectgroup/SelectGroupListener.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.selectgroup; 2 | 3 | /** 4 | * Created by Sun45 on 2021/7/27 5 | * 分组选项监听 6 | */ 7 | public interface SelectGroupListener { 8 | void select(int position); 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/teamgrouplist/TeamGroupList.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.teamgrouplist; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | import androidx.annotation.NonNull; 7 | import androidx.annotation.Nullable; 8 | import androidx.recyclerview.widget.LinearLayoutManager; 9 | 10 | import org.jetbrains.annotations.NotNull; 11 | 12 | import java.util.List; 13 | 14 | import cn.sun45.warbanner.document.database.setup.models.TeamCustomizeModel; 15 | import cn.sun45.warbanner.document.database.source.models.CharacterModel; 16 | import cn.sun45.warbanner.framework.ui.BaseVerticalRecyclerView; 17 | 18 | /** 19 | * Created by Sun45 on 2021/5/30 20 | * 分刀列表 21 | */ 22 | public class TeamGroupList extends BaseVerticalRecyclerView { 23 | private TeamGroupListAdapter adapter; 24 | 25 | public TeamGroupList(@NonNull @NotNull Context context, @Nullable @org.jetbrains.annotations.Nullable AttributeSet attrs) { 26 | super(context, attrs); 27 | init(); 28 | } 29 | 30 | private void init() { 31 | setVerticalScrollBarEnabled(false); 32 | setLayoutManager(new LinearLayoutManager(getContext())); 33 | adapter = new TeamGroupListAdapter(getContext()); 34 | setAdapter(adapter); 35 | } 36 | 37 | public void setListener(TeamGroupListListener listener) { 38 | adapter.setListener(listener); 39 | } 40 | 41 | public void setCharacterModels(List characterModels) { 42 | adapter.setCharacterModels(characterModels); 43 | } 44 | 45 | public void setData(List list) { 46 | scrollToPosition(0); 47 | adapter.setList(list); 48 | adapter.notifyDataSetChanged(); 49 | } 50 | 51 | public void notifyCustomize(List teamCustomizeModels) { 52 | adapter.setTeamCustomizeModels(teamCustomizeModels); 53 | adapter.notifyDataSetChanged(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/teamgrouplist/TeamGroupListListener.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.teamgrouplist; 2 | 3 | /** 4 | * Created by Sun45 on 2021/6/1 5 | * 分刀列表监听 6 | */ 7 | public interface TeamGroupListListener { 8 | void collect(TeamGroupListModel teamGroupListModel,boolean collect); 9 | 10 | void open(TeamGroupListModel teamGroupListModel); 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/teamlist/TeamListBossModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.teamlist; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by Sun45 on 2021/6/28 7 | * 阵容列表boss信息数据模型 8 | */ 9 | public class TeamListBossModel { 10 | private String name; 11 | private String iconUrl; 12 | 13 | private List teamModels; 14 | 15 | public TeamListBossModel(String name, String iconUrl) { 16 | this.name = name; 17 | this.iconUrl = iconUrl; 18 | } 19 | 20 | public void setTeamModels(List teamModels) { 21 | this.teamModels = teamModels; 22 | } 23 | 24 | public String getName() { 25 | return name; 26 | } 27 | 28 | public String getIconUrl() { 29 | return iconUrl; 30 | } 31 | 32 | public int getModelCount(int type) { 33 | if (teamModels == null) { 34 | return 0; 35 | } else { 36 | if (type == 0) { 37 | return teamModels.size(); 38 | } else { 39 | int count = 0; 40 | for (TeamListTeamModel teamModel : teamModels) { 41 | if (teamModel.getTeamModel().getType().getType() == type) { 42 | count++; 43 | } 44 | } 45 | return count; 46 | } 47 | } 48 | } 49 | 50 | public TeamListTeamModel getModel(int type, int position) { 51 | for (TeamListTeamModel teamModel : teamModels) { 52 | if (type == 0 || teamModel.getTeamModel().getType().getType() == type) { 53 | if (position == 0) { 54 | return teamModel; 55 | } 56 | position--; 57 | } 58 | } 59 | return null; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/teamlist/TeamListListener.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.teamlist; 2 | 3 | import java.util.List; 4 | 5 | import cn.sun45.warbanner.document.database.source.models.TeamModel; 6 | import cn.sun45.warbanner.ui.views.listselectbar.ListSelectItem; 7 | 8 | /** 9 | * Created by Sun45 on 2021/7/4 10 | * 阵容列表监听 11 | */ 12 | public interface TeamListListener { 13 | void dataSet(int count, List listSelectItems); 14 | 15 | void onScrolled(int first, int last); 16 | 17 | void select(TeamModel teamModel); 18 | 19 | void reCalucate(TeamListReCalucateModel teamListReCalucateModel); 20 | } -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/teamlist/TeamListReCalucateModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.teamlist; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by Sun45 on 2023/10/19 7 | * 阵容列表再生成信息数据模型 8 | */ 9 | public class TeamListReCalucateModel { 10 | private List usedCharacterList; 11 | 12 | public TeamListReCalucateModel(List usedCharacterList) { 13 | this.usedCharacterList = usedCharacterList; 14 | } 15 | 16 | public List getUsedCharacterList() { 17 | return usedCharacterList; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/teamlist/TeamListRemarkModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.teamlist; 2 | 3 | /** 4 | * Created by Sun45 on 2021/6/2 5 | * 阵容列表备注数据模型 6 | */ 7 | public class TeamListRemarkModel { 8 | private String content; 9 | private String link; 10 | 11 | public String getContent() { 12 | return content; 13 | } 14 | 15 | public void setContent(String content) { 16 | this.content = content; 17 | } 18 | 19 | public String getLink() { 20 | return link; 21 | } 22 | 23 | public void setLink(String link) { 24 | this.link = link; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/teamlist/TeamListTeamModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.teamlist; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import cn.sun45.warbanner.document.database.source.models.TeamModel; 7 | 8 | /** 9 | * Created by Sun45 on 2021/6/2 10 | * 阵容列表阵容信息数据模型 11 | */ 12 | public class TeamListTeamModel { 13 | private TeamModel teamModel; 14 | private int borrowindex; 15 | private List remarkModels; 16 | 17 | public TeamListTeamModel(TeamModel teamModel) { 18 | this(teamModel, -1); 19 | } 20 | 21 | public TeamListTeamModel(TeamModel teamModel, int borrowindex) { 22 | this.teamModel = teamModel; 23 | this.borrowindex = borrowindex; 24 | remarkModels = new ArrayList<>(); 25 | List timeLineList = teamModel.getTimeLines(); 26 | for (TeamModel.TimeLine timeLine : timeLineList) { 27 | TeamListRemarkModel remarkModel = new TeamListRemarkModel(); 28 | remarkModel.setContent(timeLine.getContent()); 29 | remarkModel.setLink(timeLine.getLink()); 30 | remarkModels.add(remarkModel); 31 | } 32 | } 33 | 34 | public TeamModel getTeamModel() { 35 | return teamModel; 36 | } 37 | 38 | public int getBorrowindex() { 39 | return borrowindex; 40 | } 41 | 42 | public List getRemarkModels() { 43 | return remarkModels; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/userlist/UserList.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.userlist; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | import androidx.annotation.NonNull; 7 | import androidx.annotation.Nullable; 8 | import androidx.recyclerview.widget.LinearLayoutManager; 9 | 10 | import org.jetbrains.annotations.NotNull; 11 | 12 | import java.util.List; 13 | 14 | import cn.sun45.warbanner.framework.ui.BaseVerticalRecyclerView; 15 | 16 | /** 17 | * Created by Sun45 on 2021/6/16 18 | * 用户列表 19 | */ 20 | public class UserList extends BaseVerticalRecyclerView { 21 | private UserListAdapter adapter; 22 | 23 | public UserList(@NonNull @NotNull Context context, @Nullable @org.jetbrains.annotations.Nullable AttributeSet attrs) { 24 | super(context, attrs); 25 | init(); 26 | } 27 | 28 | private void init() { 29 | setLayoutManager(new LinearLayoutManager(getContext())); 30 | adapter = new UserListAdapter(getContext()); 31 | setAdapter(adapter); 32 | } 33 | 34 | public void setListener(UserListListener listener) { 35 | adapter.setListener(listener); 36 | } 37 | 38 | public void setData(List list) { 39 | adapter.setList(list); 40 | adapter.notifyDataSetChanged(); 41 | } 42 | 43 | public void notifyDataSetChanged() { 44 | adapter.notifyDataSetChanged(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/userlist/UserListListener.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.userlist; 2 | 3 | /** 4 | * Created by Sun45 on 2021/6/16 5 | * 用户列表监听 6 | */ 7 | public interface UserListListener { 8 | void select(UserListModel model); 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/ui/views/userlist/UserListModel.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.ui.views.userlist; 2 | 3 | /** 4 | * Created by Sun45 on 2021/6/16 5 | * 用户列表数据模型 6 | */ 7 | public class UserListModel { 8 | private int id; 9 | private String name; 10 | 11 | public UserListModel(int id, String name) { 12 | this.id = id; 13 | this.name = name; 14 | } 15 | 16 | public int getId() { 17 | return id; 18 | } 19 | 20 | public String getName() { 21 | return name; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/util/BrotliUtils.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.util; 2 | 3 | import org.apache.commons.compress.compressors.brotli.BrotliCompressorInputStream; 4 | 5 | import java.io.ByteArrayInputStream; 6 | import java.io.ByteArrayOutputStream; 7 | import java.io.File; 8 | import java.io.FileInputStream; 9 | import java.io.FileOutputStream; 10 | import java.io.IOException; 11 | import java.io.InputStream; 12 | import java.io.OutputStream; 13 | 14 | public class BrotliUtils { 15 | /**缓冲字节*/ 16 | public static final int BUFFER = 1024; 17 | /**后缀名*/ 18 | public static final String EXT = ".br"; 19 | 20 | /** 21 | * 数据解压缩 22 | * @param data 压缩的数据 23 | * @return 24 | * @throws IOException 25 | */ 26 | public static byte[] deCompress(byte[] data) throws IOException{ 27 | ByteArrayInputStream bais = new ByteArrayInputStream(data); 28 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); 29 | 30 | // 解压缩 31 | deCompress(bais, baos); 32 | 33 | data = baos.toByteArray(); 34 | 35 | baos.flush(); 36 | baos.close(); 37 | bais.close(); 38 | 39 | return data; 40 | } 41 | 42 | /** 43 | * 文件解压缩 44 | * @param file 压缩文件 45 | * @param delete 是否删除源文件 46 | * @throws IOException 47 | */ 48 | public static void deCompress(File file, boolean delete) throws IOException{ 49 | FileInputStream fis = new FileInputStream(file); 50 | FileOutputStream fos = new FileOutputStream(file.getPath().replace(EXT, "")); 51 | 52 | deCompress(fis, fos); 53 | 54 | fos.flush(); 55 | fos.close(); 56 | fis.close(); 57 | 58 | if (delete) { 59 | file.delete(); 60 | } 61 | } 62 | 63 | /** 64 | * 解压缩 65 | * @param is 输入流 66 | * @param os 输出流 67 | * @throws IOException 68 | */ 69 | private static void deCompress(InputStream is, OutputStream os) throws IOException { 70 | BrotliCompressorInputStream bcis = new BrotliCompressorInputStream(is); 71 | 72 | int count; 73 | byte data[] = new byte[BUFFER]; 74 | 75 | while((count = bcis.read(data, 0, BUFFER)) != -1){ 76 | os.write(data, 0, count); 77 | } 78 | 79 | bcis.close(); 80 | } 81 | 82 | /** 83 | * 文件解压缩 84 | * @param path 文件路径 85 | * @param delete 是否删除源文件 86 | * @throws IOException 87 | */ 88 | public static void deCompress(String path, boolean delete) throws IOException{ 89 | File file = new File(path); 90 | deCompress(file, delete); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /app/src/main/java/cn/sun45/warbanner/util/GithubUtils.java: -------------------------------------------------------------------------------- 1 | package cn.sun45.warbanner.util; 2 | 3 | /** 4 | * Created by Sun45 on 2021/11/15 5 | * Github类 6 | */ 7 | public class GithubUtils { 8 | //GitHub Pages 9 | public static final int TYPE_GITHUBPAGES = 0; 10 | //cloudflare 11 | public static final int TYPE_CLOUDFLARE = 1; 12 | //JsDeliver 13 | public static final int TYPE_JSDELIVR = 2; 14 | //Github Raw 15 | public static final int TYPE_RAW = 3; 16 | 17 | public static final String getFileUrl(int type, String owner, String repository, String branch, String path) { 18 | StringBuilder sb = new StringBuilder(); 19 | switch (type) { 20 | case TYPE_GITHUBPAGES: 21 | sb.append("https://"); 22 | sb.append(owner); 23 | sb.append(".github.io"); 24 | sb.append("/"); 25 | sb.append(repository); 26 | sb.append("/"); 27 | sb.append(path); 28 | break; 29 | case TYPE_CLOUDFLARE: 30 | sb.append("https://round-union-edb0.sun45.workers.dev/"); 31 | sb.append("/"); 32 | sb.append(getFileUrl(TYPE_RAW, owner, repository, branch, path)); 33 | break; 34 | case TYPE_JSDELIVR: 35 | sb.append("https://cdn.jsdelivr.net/gh/"); 36 | sb.append(owner); 37 | sb.append("/"); 38 | sb.append(repository); 39 | sb.append("@"+branch); 40 | sb.append("/"); 41 | sb.append(path); 42 | break; 43 | case TYPE_RAW: 44 | sb.append("https://raw.githubusercontent.com/"); 45 | sb.append(owner); 46 | sb.append("/"); 47 | sb.append(repository); 48 | sb.append("/"); 49 | sb.append(branch); 50 | sb.append("/"); 51 | sb.append(path); 52 | break; 53 | default: 54 | break; 55 | } 56 | return sb.toString(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fade_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fade_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_in_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_in_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_out_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_out_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/anim/zoom_in_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/anim/zoom_in_pop.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/anim/zoom_out_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/anim/zoom_out_pop.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_character_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sun45/warbanner/70fc33761bda83becd1cb52f3c64eb5dedeb0616/app/src/main/res/drawable-hdpi/ic_character_default.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_position_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sun45/warbanner/70fc33761bda83becd1cb52f3c64eb5dedeb0616/app/src/main/res/drawable-hdpi/ic_position_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_position_front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sun45/warbanner/70fc33761bda83becd1cb52f3c64eb5dedeb0616/app/src/main/res/drawable-hdpi/ic_position_front.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_position_middle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sun45/warbanner/70fc33761bda83becd1cb52f3c64eb5dedeb0616/app/src/main/res/drawable-hdpi/ic_position_middle.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_account_circle_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_adb_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_add_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_arrow_back_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_block_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_blur_on_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_cleaning_services_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_cloud_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_collections_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_delete_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_edit_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_file_copy_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_format_align_justify_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_image_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_info_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_insert_chart_outlined_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_linear_scale_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_link_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_menu_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_search_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_settings_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_share_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_star_white.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_star_yellow.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_text_snippet_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_view_comfy_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_character_screen_type_red_hint.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_character_screen_type_yellow_hint.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_combination_group_pic_5.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 16 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_combination_group_pic_6.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 16 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_teamgroupscreen_teamdivider.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/listselectbar_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selectgroup_item_center_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selectgroup_item_left_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selectgroup_item_right_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/teamgroup_auto_screen_progress_drawable.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 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 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/characterlist_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 19 | 20 | 28 | 29 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/res/layout/characterview_lay.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 19 | 20 | 31 | 32 | 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/combinationlist_descriptionitem.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 22 | 23 | 24 | 31 | 32 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_bossdata.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 22 | 23 | 24 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_characterscreen.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 22 | 23 | 24 | 30 | 31 | 38 | 39 | 49 | 50 | 60 | 61 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_combinationdetail.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 23 | 24 | 25 | 32 | 33 | 37 | 38 | 39 | 50 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 21 | 22 | 23 | 31 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_recalucate.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 23 | 24 | 25 | 33 | 34 | 48 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_record.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 22 | 23 | 24 | 32 | 33 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_recordtext.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 23 | 24 | 25 | 32 | 33 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_teamgroup.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 23 | 24 | 25 | 33 | 34 | 47 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_teamgroupdetail.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 23 | 24 | 25 | 32 | 33 | 37 | 38 | 39 | 50 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_teamlist.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 22 | 23 | 24 | 31 | 32 | 36 | 37 | 42 | 43 | 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_teamselect.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 23 | 24 | 25 | 32 | 33 | 37 | 38 | 43 | 44 | 52 | 53 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_usermanager.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 23 | 24 | 25 | 33 | 34 | 45 | 46 | 57 | -------------------------------------------------------------------------------- /app/src/main/res/layout/recordlist_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/teamgrouplist_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 14 | 15 | 25 | 26 | 34 | 35 | 42 | 43 | 50 | 51 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /app/src/main/res/layout/teamgrouplist_item_team_lay.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 17 | 18 | 26 | 27 | 31 | 32 | 37 | 38 | 43 | 44 | 49 | 50 | 55 | 56 | -------------------------------------------------------------------------------- /app/src/main/res/layout/teamlist_bossitem.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/teamlist_divideritem.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/teamlist_recalucateitem.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/userlist_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/menu/bottom_nav_menu.xml: -------------------------------------------------------------------------------- 1 | 2 |

3 | 7 | 11 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/menu/fragment_collection_drop_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/menu/fragment_combinationdetail_drop_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/menu/fragment_recalucate_drop_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/fragment_record_text_drop_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/menu/fragment_teamdetail_drop_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/menu/fragment_teamgroup_drop_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/fragment_teamgroupdetail_drop_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/menu/fragment_teamgroupscreen_drop_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/fragment_teamgroupscreenusedcharacter_drop_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/menu/fragment_teamlist_drop_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/menu/fragment_teamselect_drop_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/fragment_usermanager_drop_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sun45/warbanner/70fc33761bda83becd1cb52f3c64eb5dedeb0616/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values/anim.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 200 4 | 300 5 | 6 | 7 | 200 8 | 400 9 | 600 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/xml/preference.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 12 | 13 | 17 | 21 | 25 | 30 | 34 | 35 | 39 | 43 | 47 | 52 | 53 | 57 | 61 | 65 | 66 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:7.1.2' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | mavenCentral() 19 | jcenter() // Warning: this repository is going to shut down soon 20 | maven { url 'https://jitpack.io' } 21 | } 22 | } 23 | 24 | task clean(type: Delete) { 25 | delete rootProject.buildDir 26 | } -------------------------------------------------------------------------------- /dependencies.gradle: -------------------------------------------------------------------------------- 1 | ext.versions = [ 2 | min_sdk : 24, 3 | compile_sdk : 30, 4 | publish_version : "4.4.1", 5 | publish_version_code: 53 6 | ] -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sun45/warbanner/70fc33761bda83becd1cb52f3c64eb5dedeb0616/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed May 19 20:02:45 CST 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /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 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 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 Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /release.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | from pathlib import Path 4 | 5 | _MSG_TEMPLATE = """ 6 | {msg} 7 | """ 8 | 9 | def main(): 10 | global _MSG_TEMPLATE 11 | with open("update_log.json", "r", encoding="utf8") as fp: 12 | logjson = json.load(fp) 13 | _MSG_TEMPLATE = _MSG_TEMPLATE.replace( 14 | "{msg}", logjson["content"]) 15 | 16 | Path("releaselog_cache.txt").write_text(_MSG_TEMPLATE, "utf8") 17 | 18 | print(logjson["versionName"]) 19 | 20 | if __name__ == "__main__": 21 | main() -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = "warbanner" 2 | include ':app' 3 | include ':PCRTeamAnalyser' 4 | -------------------------------------------------------------------------------- /taofan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sun45/warbanner/70fc33761bda83becd1cb52f3c64eb5dedeb0616/taofan.jpg -------------------------------------------------------------------------------- /update_log.json: -------------------------------------------------------------------------------- 1 | { 2 | "versionCode": "53", 3 | "versionName": "4.4.1", 4 | "fource": "false", 5 | "content": "1.bcrlog版本更新\n2.优化套餐生成逻辑\n3.添加再生成功能" 6 | } 7 | --------------------------------------------------------------------------------