├── .idea
├── .name
├── encodings.xml
├── codeStyles
│ └── codeStyleConfig.xml
├── compiler.xml
├── vcs.xml
├── .gitignore
├── misc.xml
├── runConfigurations.xml
├── jarRepositories.xml
└── gradle.xml
├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_android.jpg
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_android.jpg
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── values
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── drawable
│ │ │ │ ├── ic_baseline_home_24.xml
│ │ │ │ ├── ic_home_black_24dp.xml
│ │ │ │ ├── ic_baseline_call_split_24.xml
│ │ │ │ ├── ic_dashboard_black_24dp.xml
│ │ │ │ ├── ic_notifications_black_24dp.xml
│ │ │ │ └── ic_baseline_person_outline_24.xml
│ │ │ ├── layout
│ │ │ │ ├── activity_splash.xml
│ │ │ │ └── activity_main.xml
│ │ │ ├── menu
│ │ │ │ └── bottom_nav_menu.xml
│ │ │ └── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── fuusy
│ │ │ │ └── jetpackkt
│ │ │ │ └── SplashActivity.kt
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── fuusy
│ │ │ └── jetpackkt
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── fuusy
│ │ └── jetpackkt
│ │ └── ExampleInstrumentedTest.kt
├── build.gradle
└── proguard-rules.pro
├── common
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── drawable
│ │ │ │ ├── launch_icon.jpg
│ │ │ │ ├── ic_back_clear.xml
│ │ │ │ └── splash_windows_background.xml
│ │ │ ├── drawable-v24
│ │ │ │ ├── ic_loading.png
│ │ │ │ ├── shape_button_bg.xml
│ │ │ │ ├── shape_load_bg.xml
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── navi_back.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── icon_defult.png
│ │ │ │ ├── img_placeholder.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ └── layout
│ │ │ │ ├── base_fragment_layout.xml
│ │ │ │ ├── base_layout_loading.xml
│ │ │ │ ├── base_layout_error.xml
│ │ │ │ ├── base_layout_empty.xml
│ │ │ │ ├── layout_loading_view.xml
│ │ │ │ └── paging_footer_item.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── fuusy
│ │ │ │ └── common
│ │ │ │ ├── network
│ │ │ │ ├── BasePagingResp.kt
│ │ │ │ ├── ResState.kt
│ │ │ │ ├── net
│ │ │ │ │ └── StateLiveData.kt
│ │ │ │ ├── BaseResp.kt
│ │ │ │ ├── config
│ │ │ │ │ └── LocalCookieJar.kt
│ │ │ │ └── RetrofitManager.kt
│ │ │ │ ├── loadsir
│ │ │ │ ├── ErrorCallback.kt
│ │ │ │ ├── EmptyCallback.kt
│ │ │ │ └── LoadingCallback.kt
│ │ │ │ ├── utils
│ │ │ │ ├── AppHelper.kt
│ │ │ │ ├── ToastUtil.kt
│ │ │ │ ├── AppUtil.kt
│ │ │ │ └── SpUtils.kt
│ │ │ │ ├── support
│ │ │ │ ├── Constants.kt
│ │ │ │ ├── SingleLiveData.kt
│ │ │ │ ├── BnvMediator.kt
│ │ │ │ ├── StatusBar.kt
│ │ │ │ └── NetStateHelper.kt
│ │ │ │ ├── ktx
│ │ │ │ └── ContextExt.kt
│ │ │ │ ├── base
│ │ │ │ ├── BaseViewModel.kt
│ │ │ │ ├── BaseActivity.kt
│ │ │ │ └── BaseVmActivity.kt
│ │ │ │ └── widget
│ │ │ │ ├── LoadingDialog.kt
│ │ │ │ ├── FooterAdapter.kt
│ │ │ │ └── FSmartRefreshLayout.kt
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── fuusy
│ │ │ └── common
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── fuusy
│ │ └── common
│ │ └── ExampleInstrumentedTest.kt
├── build.gradle
└── proguard-rules.pro
├── home
├── .gitignore
├── src
│ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── fuusy
│ │ │ │ └── home
│ │ │ │ ├── bean
│ │ │ │ ├── Tag.kt
│ │ │ │ ├── BannerData.kt
│ │ │ │ ├── QuestionInfo.kt
│ │ │ │ ├── RemoteKey.kt
│ │ │ │ ├── RemoteKeyDao.kt
│ │ │ │ ├── SquareData.kt
│ │ │ │ ├── DailyQuestionData.kt
│ │ │ │ └── ArticleData.kt
│ │ │ │ ├── dao
│ │ │ │ ├── ArticleDao.kt
│ │ │ │ ├── converter
│ │ │ │ │ └── TagTypeConverter.kt
│ │ │ │ └── db
│ │ │ │ │ └── AppDatabase.kt
│ │ │ │ ├── di
│ │ │ │ └── LibHome.kt
│ │ │ │ ├── api
│ │ │ │ └── HomeService.kt
│ │ │ │ ├── repo
│ │ │ │ └── data
│ │ │ │ │ ├── SquarePagingDataSource.kt
│ │ │ │ │ ├── DailyQuestionPagingSource.kt
│ │ │ │ │ └── HomeArticlePagingSource.kt
│ │ │ │ ├── adapter
│ │ │ │ ├── viewpager
│ │ │ │ │ └── HomePageAdapter.kt
│ │ │ │ └── paging
│ │ │ │ │ ├── SquarePagingAdapter.kt
│ │ │ │ │ ├── HomeArticlePagingAdapter.kt
│ │ │ │ │ └── DailyQuestionPagingAdapter.kt
│ │ │ │ ├── ui
│ │ │ │ ├── HomeFragment.kt
│ │ │ │ └── SquareFragment.kt
│ │ │ │ └── viewmodel
│ │ │ │ └── ArticleViewModel.kt
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_android.jpg
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── styles.xml
│ │ │ │ └── dimes.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── drawable-v24
│ │ │ │ ├── shape_health_info.xml
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── navigation
│ │ │ │ ├── navi_home.xml
│ │ │ │ └── nvi_home.xml
│ │ │ └── layout
│ │ │ │ ├── item_banner.xml
│ │ │ │ ├── fragment_square.xml
│ │ │ │ ├── fragment_daily_question.xml
│ │ │ │ ├── fragment_article.xml
│ │ │ │ └── item_daily_question.xml
│ │ ├── AndroidManifest.xml
│ │ └── manifest
│ │ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── fuusy
│ │ │ └── home
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── fuusy
│ │ └── home
│ │ └── ExampleInstrumentedTest.kt
├── build.gradle
└── proguard-rules.pro
├── login
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_android.jpg
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ └── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ ├── manifest
│ │ │ └── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── fuusy
│ │ │ │ └── login
│ │ │ │ ├── di
│ │ │ │ └── LibLogin.kt
│ │ │ │ ├── repo
│ │ │ │ ├── LoginApi.kt
│ │ │ │ └── LoginRepo.kt
│ │ │ │ ├── viewmodel
│ │ │ │ └── LoginViewModel.kt
│ │ │ │ └── ui
│ │ │ │ └── RegisterActivity.kt
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── fuusy
│ │ │ └── login
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── fuusy
│ │ └── login
│ │ └── ExampleInstrumentedTest.kt
├── build.gradle
└── proguard-rules.pro
├── personal
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_android.jpg
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── navigation
│ │ │ │ └── navi_personal.xml
│ │ │ ├── layout
│ │ │ │ └── activity_personal.xml
│ │ │ └── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── fuusy
│ │ │ │ └── personal
│ │ │ │ ├── repo
│ │ │ │ ├── PersonalApi.kt
│ │ │ │ └── PersonalRepo.kt
│ │ │ │ ├── viewmodel
│ │ │ │ └── PersonalViewModel.kt
│ │ │ │ ├── ui
│ │ │ │ ├── PersonalActivity.kt
│ │ │ │ └── PersonalFragment.kt
│ │ │ │ └── di
│ │ │ │ └── LibPersonal.kt
│ │ ├── manifest
│ │ │ └── AndroidManifest.xml
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── fuusy
│ │ │ └── personal
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── fuusy
│ │ └── personal
│ │ └── ExampleInstrumentedTest.kt
├── build.gradle
└── proguard-rules.pro
├── project
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── bg1.jpg
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_android.jpg
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ ├── drawable-v24
│ │ │ │ ├── shape_bgh.xml
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── layout
│ │ │ │ ├── activity_project.xml
│ │ │ │ ├── fragment_project.xml
│ │ │ │ ├── fragment_project_content.xml
│ │ │ │ └── item_project_all.xml
│ │ │ └── navigation
│ │ │ │ └── navi_project.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── fuusy
│ │ │ │ └── project
│ │ │ │ ├── ui
│ │ │ │ ├── ProjectActivity.kt
│ │ │ │ └── ProjectContentFragment.kt
│ │ │ │ ├── di
│ │ │ │ └── LibProject.kt
│ │ │ │ ├── repo
│ │ │ │ ├── ProjectApi.kt
│ │ │ │ ├── ProjectRepo.kt
│ │ │ │ └── ProjectDataSource.kt
│ │ │ │ ├── bean
│ │ │ │ └── ProjectTree.kt
│ │ │ │ ├── adapter
│ │ │ │ ├── ProjectPagingAdapter.kt
│ │ │ │ └── ProjectAdapter.kt
│ │ │ │ └── viewmodel
│ │ │ │ └── ProjectViewModel.kt
│ │ ├── manifest
│ │ │ └── AndroidManifest.xml
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── fuusy
│ │ │ └── project
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── fuusy
│ │ └── project
│ │ └── ExampleInstrumentedTest.kt
├── build.gradle
└── proguard-rules.pro
├── service
├── .gitignore
├── consumer-rules.pro
├── build.gradle
├── src
│ ├── main
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── fuusy
│ │ │ └── service
│ │ │ └── repo
│ │ │ ├── DbHelper.kt
│ │ │ └── UserDB.kt
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── fuusy
│ │ │ └── service
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── fuusy
│ │ └── service
│ │ └── ExampleInstrumentedTest.kt
└── proguard-rules.pro
├── webview
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_android.jpg
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── layout
│ │ │ │ └── activity_webview.xml
│ │ │ └── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ ├── manifest
│ │ │ └── AndroidManifest.xml
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── fuusy
│ │ │ └── webview
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── fuusy
│ │ └── webview
│ │ └── ExampleInstrumentedTest.kt
├── build.gradle
└── proguard-rules.pro
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── settings.gradle
├── .gitignore
└── LICENSE
/.idea/.name:
--------------------------------------------------------------------------------
1 | JetPackKt
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/common/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/home/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/login/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/personal/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/project/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/service/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/service/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webview/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/gradle.properties
--------------------------------------------------------------------------------
/login/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | login
3 |
--------------------------------------------------------------------------------
/webview/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | webview
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_android.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/app/src/main/res/mipmap-xhdpi/ic_android.jpg
--------------------------------------------------------------------------------
/common/src/main/res/drawable/launch_icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/drawable/launch_icon.jpg
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/bean/Tag.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.bean
2 |
3 | data class Tag(
4 | val name: String,
5 | val url: String
6 | )
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-xxxhdpi/bg1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/project/src/main/res/mipmap-xxxhdpi/bg1.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_android.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/app/src/main/res/mipmap-xxhdpi/ic_android.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable-v24/ic_loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/drawable-v24/ic_loading.png
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-xxhdpi/navi_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/mipmap-xxhdpi/navi_back.png
--------------------------------------------------------------------------------
/home/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/home/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/home/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/home/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/home/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/home/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/home/src/main/res/mipmap-xxhdpi/ic_android.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/home/src/main/res/mipmap-xxhdpi/ic_android.jpg
--------------------------------------------------------------------------------
/home/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/home/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/login/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/login/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/login/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/login/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/login/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/login/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/login/src/main/res/mipmap-xxhdpi/ic_android.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/login/src/main/res/mipmap-xxhdpi/ic_android.jpg
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-xxhdpi/icon_defult.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/mipmap-xxhdpi/icon_defult.png
--------------------------------------------------------------------------------
/home/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/home/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/login/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/login/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/login/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/login/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/personal/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/personal/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/personal/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/personal/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/project/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/project/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/project/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-xxhdpi/ic_android.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/project/src/main/res/mipmap-xxhdpi/ic_android.jpg
--------------------------------------------------------------------------------
/webview/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/webview/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/webview/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/webview/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/webview/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/webview/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/webview/src/main/res/mipmap-xxhdpi/ic_android.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/webview/src/main/res/mipmap-xxhdpi/ic_android.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/home/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/home/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/home/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/home/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/home/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/home/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/login/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/login/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/login/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/login/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/personal/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/personal/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/personal/src/main/res/mipmap-xxhdpi/ic_android.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/personal/src/main/res/mipmap-xxhdpi/ic_android.jpg
--------------------------------------------------------------------------------
/personal/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/personal/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/personal/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/personal/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/project/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/project/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/webview/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/webview/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/webview/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/webview/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-xxhdpi/img_placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/mipmap-xxhdpi/img_placeholder.png
--------------------------------------------------------------------------------
/common/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | common
3 | 加载失败,请点击重试
4 |
--------------------------------------------------------------------------------
/home/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/home/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/home/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/home/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/login/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/login/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/login/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/login/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/project/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/project/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/webview/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/webview/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/webview/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/webview/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/common/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/login/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/login/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/personal/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/personal/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/personal/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/personal/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/personal/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/personal/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/personal/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/personal/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/project/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/project/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/project/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/webview/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/webview/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/webview/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/webview/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/webview/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/webview/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/personal/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fuusy/component-jetpack-mvvm/HEAD/personal/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/personal/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | personal
3 | 点击头像登录/注册
4 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/bean/BannerData.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.bean
2 |
3 | data class BannerData(var desc: String, var imagePath: String, var title: String, var url: String)
4 |
--------------------------------------------------------------------------------
/service/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply from:'../dependencies.gradle'
3 | dependencies {
4 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.10"
5 |
6 | }
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':service'
2 | include ':login'
3 | include ':project'
4 | include ':personal'
5 | include ':webview'
6 | include ':home'
7 | include ':common'
8 | include ':app'
9 | rootProject.name = "JetPackKt"
--------------------------------------------------------------------------------
/home/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Home
3 |
4 | Hello blank fragment
5 |
--------------------------------------------------------------------------------
/personal/src/main/java/com/fuusy/personal/repo/PersonalApi.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.personal.repo
2 |
3 | import okhttp3.RequestBody
4 | import retrofit2.http.Body
5 | import retrofit2.http.POST
6 |
7 | interface PersonalApi {
8 |
9 |
10 | }
--------------------------------------------------------------------------------
/project/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | project
3 |
4 | Hello blank fragment
5 |
--------------------------------------------------------------------------------
/login/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #6200EE
4 | #3700B3
5 | #03DAC5
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
--------------------------------------------------------------------------------
/personal/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #6200EE
4 | #3700B3
5 | #03DAC5
6 |
--------------------------------------------------------------------------------
/project/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #6200EE
4 | #3700B3
5 | #03DAC5
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | JetPackKt
3 | 首页
4 | 项目
5 | 我的
6 |
--------------------------------------------------------------------------------
/home/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #6200EE
4 | #3700B3
5 | #03DAC5
6 |
7 |
--------------------------------------------------------------------------------
/webview/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #6200EE
4 | #3700B3
5 | #03DAC5
6 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /../../../../:\AndroidProject\JetPackKt\.idea/dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #6200EE
4 | #3700B3
5 | #03DAC5
6 |
7 |
8 |
--------------------------------------------------------------------------------
/common/src/main/res/drawable-v24/shape_button_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/personal/src/main/java/com/fuusy/personal/repo/PersonalRepo.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.personal.repo
2 |
3 | import com.fuusy.common.base.BaseRepository
4 | import com.fuusy.common.network.RetrofitManager
5 |
6 | class PersonalRepo(private val service:PersonalApi) : BaseRepository() {
7 |
8 | }
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Feb 01 14:42:40 CST 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/personal/src/main/java/com/fuusy/personal/viewmodel/PersonalViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.personal.viewmodel
2 |
3 | import com.fuusy.common.base.BaseViewModel
4 | import com.fuusy.personal.repo.PersonalRepo
5 |
6 | class PersonalViewModel(private val repo:PersonalRepo) : BaseViewModel() {
7 |
8 |
9 | }
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/network/BasePagingResp.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.network
2 |
3 | data class BasePagingResp(
4 | var curPage: Int,
5 | var offset: Int,
6 | var over: Boolean,
7 | var pageCount: Int, var size: Int, var total: Int,
8 | var datas: T
9 |
10 | )
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/network/ResState.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.network
2 |
3 | import java.lang.Exception
4 |
5 | sealed class ResState {
6 | data class Success(val data: T) : ResState()
7 | data class Error(val exception: Exception) : ResState()
8 | }
--------------------------------------------------------------------------------
/project/src/main/res/drawable-v24/shape_bgh.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/loadsir/ErrorCallback.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.loadsir
2 |
3 | import com.fuusy.common.R
4 | import com.kingja.loadsir.callback.Callback
5 |
6 | class ErrorCallback : Callback() {
7 | override fun onCreateView(): Int {
8 | return R.layout.base_layout_error
9 | }
10 | }
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/bean/QuestionInfo.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.bean
2 |
3 | data class QuestionInfo(var curPage: Int, var data: List, var pageCount: Int, var size: Int, var total: Int)
4 |
5 | data class QuestionList(var author: String, var desc: String, var niceDate: String, var title: String)
6 |
7 |
--------------------------------------------------------------------------------
/home/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/login/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/personal/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/webview/src/main/manifest/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/home/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/login/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/project/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/webview/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/personal/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/webview/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/bean/RemoteKey.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.bean
2 |
3 | import androidx.room.Entity
4 | import androidx.room.PrimaryKey
5 |
6 | @Entity(tableName = "tab_remote_key")
7 | data class RemoteKey(
8 | @PrimaryKey
9 | val articleId: Int,
10 | val articleType: Int,
11 | val prevKey: Int?,
12 | val nextKey: Int?
13 | )
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_home_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/utils/AppHelper.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.utils
2 |
3 | import android.content.Context
4 |
5 | /**
6 | * @date:2021/5/19
7 | * @author fuusy
8 | * @instruction:
9 | */
10 | object AppHelper {
11 | lateinit var mContext: Context
12 |
13 | fun init(context: Context) {
14 | this.mContext = context
15 | }
16 | }
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/network/net/StateLiveData.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.network.net
2 |
3 | import androidx.lifecycle.MutableLiveData
4 | import com.fuusy.common.network.BaseResp
5 |
6 |
7 | /**
8 | * @date:2021/6/11
9 | * @author fuusy
10 | * @instruction:MutableLiveData,用于将请求状态分发给UI
11 | */
12 | class StateLiveData : MutableLiveData>() {
13 | }
--------------------------------------------------------------------------------
/home/src/main/res/drawable-v24/shape_health_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_home_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/login/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/project/src/main/java/com/fuusy/project/ui/ProjectActivity.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.project.ui
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.fuusy.project.R
6 |
7 | class ProjectActivity : AppCompatActivity() {
8 |
9 | override fun onCreate(savedInstanceState: Bundle?) {
10 | super.onCreate(savedInstanceState)
11 | setContentView(R.layout.activity_project)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/personal/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/project/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/service/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_call_split_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/common/src/main/res/layout/base_fragment_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/home/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/login/src/test/java/com/fuusy/login/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.login
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/webview/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_dashboard_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/personal/src/test/java/com/fuusy/personal/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.personal
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/project/src/test/java/com/fuusy/project/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.project
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/service/src/test/java/com/fuusy/service/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.service
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/home/src/test/java/com/fuusy/home/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/common/src/test/java/com/fuusy/common/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/app/src/test/java/com/fuusy/jetpackkt/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.jetpackkt
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/home/build.gradle:
--------------------------------------------------------------------------------
1 | if (!singleModule.toBoolean()) {
2 | apply plugin: 'com.android.library'
3 | } else {
4 | apply plugin: 'com.android.application'
5 | }
6 | apply from:'../dependencies.gradle'
7 |
8 |
9 | dependencies {
10 | implementation project(path: ':common')
11 |
12 | //banner
13 | implementation 'com.youth.banner:banner:2.1.0'
14 |
15 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
16 |
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/webview/src/test/java/com/fuusy/webview/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.webview
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/common/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/common/src/main/res/drawable/ic_back_clear.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/home/src/main/res/values/dimes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 25dp
5 | 55dp
6 |
7 | 14sp
8 | 16sp
9 | 12sp
10 | 18sp
11 | 20sp
12 |
13 | 44dp
14 |
--------------------------------------------------------------------------------
/personal/src/main/java/com/fuusy/personal/ui/PersonalActivity.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.personal.ui
2 |
3 | import android.os.Bundle
4 | import com.fuusy.common.base.BaseActivity
5 | import com.fuusy.personal.R
6 | import com.fuusy.personal.databinding.ActivityPersonalBinding
7 |
8 | class PersonalActivity : BaseActivity() {
9 |
10 |
11 | override fun getLayoutId(): Int =
12 | R.layout.activity_personal
13 |
14 | override fun initData(savedInstanceState: Bundle?) {
15 |
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/project/src/main/manifest/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/common/src/main/res/layout/base_layout_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/personal/src/main/manifest/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/home/src/main/res/navigation/navi_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/common/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply from:'../dependencies.gradle'
3 |
4 | dependencies {
5 |
6 | implementation("com.squareup.okhttp3:okhttp:4.9.0")
7 | implementation("com.squareup.okhttp3:logging-interceptor:4.9.0")
8 | //retrofit
9 | api("com.squareup.retrofit2:retrofit:2.9.0")
10 | implementation("com.squareup.retrofit2:converter-gson:2.9.0")
11 |
12 | api 'com.blankj:utilcodex:1.29.0'
13 | implementation("com.tencent:mmkv-static:1.2.1")
14 |
15 | api 'com.kingja.loadsir:loadsir:1.3.8'
16 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_notifications_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/personal/src/main/res/navigation/navi_personal.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/common/src/main/res/drawable/splash_windows_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 | -
10 |
13 |
14 |
--------------------------------------------------------------------------------
/common/src/main/res/drawable-v24/shape_load_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
16 |
17 |
--------------------------------------------------------------------------------
/home/src/main/res/navigation/nvi_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/fuusy/jetpackkt/SplashActivity.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.jetpackkt
2 |
3 | import android.content.Intent
4 | import android.os.Bundle
5 | import com.fuusy.common.base.BaseActivity
6 | import com.fuusy.jetpackkt.databinding.ActivitySplashBinding
7 |
8 | class SplashActivity : BaseActivity() {
9 |
10 | override fun initData(savedInstanceState: Bundle?) {
11 | val intent = Intent(this, MainActivity::class.java)
12 | startActivity(intent)
13 | finish()
14 | }
15 |
16 | override fun getLayoutId(): Int = R.layout.activity_splash
17 |
18 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_person_outline_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/loadsir/EmptyCallback.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.loadsir
2 |
3 | import android.content.Context
4 | import android.view.View
5 | import com.fuusy.common.R
6 | import com.kingja.loadsir.callback.Callback
7 |
8 | class EmptyCallback : Callback() {
9 | override fun onCreateView(): Int {
10 | return R.layout.base_layout_empty
11 | }
12 |
13 | //当前Callback的点击事件,如果返回true则覆盖注册时的onReload(),如果返回false则两者都执行,先执行onReloadEvent()。
14 | override fun onReloadEvent(
15 | context: Context,
16 | view: View
17 | ): Boolean {
18 | return false
19 | }
20 | }
--------------------------------------------------------------------------------
/home/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/home/src/main/manifest/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/home/src/main/res/layout/item_banner.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
11 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/project/src/main/java/com/fuusy/project/di/LibProject.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.project.di
2 |
3 | import com.fuusy.common.network.RetrofitManager
4 | import com.fuusy.project.repo.ProjectApi
5 | import com.fuusy.project.repo.ProjectRepo
6 | import com.fuusy.project.viewmodel.ProjectViewModel
7 | import org.koin.androidx.viewmodel.dsl.viewModel
8 | import org.koin.dsl.module
9 |
10 |
11 | val moduleProject = module {
12 | single {
13 | RetrofitManager.initRetrofit().getService(ProjectApi::class.java)
14 | }
15 |
16 | single {
17 | ProjectRepo(get())
18 | }
19 |
20 | viewModel { ProjectViewModel(get()) }
21 | }
--------------------------------------------------------------------------------
/login/src/main/manifest/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/personal/src/main/java/com/fuusy/personal/di/LibPersonal.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.personal.di
2 |
3 | import com.fuusy.common.network.RetrofitManager
4 | import com.fuusy.personal.repo.PersonalApi
5 | import com.fuusy.personal.repo.PersonalRepo
6 | import com.fuusy.personal.viewmodel.PersonalViewModel
7 | import org.koin.androidx.viewmodel.dsl.viewModel
8 | import org.koin.dsl.module
9 |
10 |
11 | val modulePersonal = module {
12 | single {
13 | RetrofitManager.initRetrofit().getService(PersonalApi::class.java)
14 | }
15 |
16 | single {
17 | PersonalRepo(get())
18 | }
19 |
20 | viewModel { PersonalViewModel(get()) }
21 | }
--------------------------------------------------------------------------------
/login/src/main/java/com/fuusy/login/di/LibLogin.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.login.di
2 |
3 | import com.fuusy.common.network.RetrofitManager
4 | import com.fuusy.login.repo.LoginApi
5 | import com.fuusy.login.repo.LoginRepo
6 | import com.fuusy.login.viewmodel.LoginViewModel
7 |
8 | import org.koin.androidx.viewmodel.dsl.viewModel
9 | import org.koin.core.parameter.parametersOf
10 | import org.koin.dsl.module
11 |
12 |
13 | val moduleLogin= module{
14 | single {
15 | RetrofitManager.initRetrofit().getService(LoginApi::class.java)
16 | }
17 |
18 | single {
19 | LoginRepo(get())
20 | }
21 |
22 | viewModel { LoginViewModel(get()) }
23 | }
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/dao/ArticleDao.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.dao
2 |
3 | import androidx.paging.PagingSource
4 | import androidx.room.*
5 | import com.fuusy.home.bean.ArticleData
6 |
7 | @Dao
8 | interface ArticleDao {
9 |
10 | @Insert(onConflict = OnConflictStrategy.REPLACE)
11 | suspend fun insertArticle(articleDataList: List)
12 |
13 | @Query("SELECT * FROM tab_article WHERE articleType =:articleType")
14 | fun queryLocalArticle(articleType: Int): PagingSource
15 |
16 | @Query("DELETE FROM tab_article WHERE articleType=:articleType")
17 | suspend fun clearArticleByType(articleType: Int)
18 |
19 | }
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/bean/RemoteKeyDao.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.bean
2 |
3 | import androidx.room.Dao
4 | import androidx.room.Insert
5 | import androidx.room.OnConflictStrategy
6 | import androidx.room.Query
7 |
8 | @Dao
9 | interface RemoteKeyDao {
10 | @Insert(onConflict = OnConflictStrategy.REPLACE)
11 | suspend fun insertAll(remoteKey: List)
12 |
13 | @Query("SELECT * FROM tab_remote_key WHERE articleId = :articleId AND articleType =:articleType")
14 | suspend fun remoteKeysArticleId(articleId: Int, articleType: Int): RemoteKey?
15 |
16 | @Query("DELETE FROM tab_remote_key WHERE articleType =:articleType")
17 | suspend fun clearRemoteKeys(articleType: Int)
18 | }
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/network/BaseResp.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.network
2 |
3 | /**
4 | * json返回的基本类型
5 | */
6 | class BaseResp{
7 | var errorCode = -1
8 | var errorMsg: String? = null
9 | var data: T? = null
10 | private set
11 | var dataState: DataState? = null
12 | var error: Throwable? = null
13 | val isSuccess: Boolean
14 | get() = errorCode == 0
15 | }
16 |
17 | enum class DataState {
18 | STATE_CREATE,//创建
19 | STATE_LOADING,//加载中
20 | STATE_SUCCESS,//成功
21 | STATE_COMPLETED,//完成
22 | STATE_EMPTY,//数据为null
23 | STATE_FAILED,//接口请求成功但是服务器返回error
24 | STATE_ERROR,//请求失败
25 | STATE_UNKNOWN//未知
26 | }
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/dao/converter/TagTypeConverter.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.dao.converter
2 |
3 | import androidx.room.TypeConverter
4 | import com.fuusy.home.bean.Tag
5 | import com.google.gson.Gson
6 | import com.google.gson.reflect.TypeToken
7 |
8 | /**
9 | * @date:2021/5/20
10 | * @author fuusy
11 | * @instruction: List的类型转换
12 | */
13 | class TagTypeConverter {
14 | @TypeConverter
15 | fun stringToObject(value: String): List {
16 | val listType = object : TypeToken>() {
17 | }.type
18 | return Gson().fromJson(value, listType)
19 | }
20 |
21 | @TypeConverter
22 | fun objectToString(list: List): String {
23 | return Gson().toJson(list)
24 | }
25 | }
--------------------------------------------------------------------------------
/project/src/main/java/com/fuusy/project/repo/ProjectApi.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.project.repo
2 |
3 | import com.fuusy.common.network.BasePagingResp
4 | import com.fuusy.common.network.BaseResp
5 | import com.fuusy.project.bean.ProjectContent
6 | import com.fuusy.project.bean.ProjectTree
7 | import retrofit2.http.GET
8 | import retrofit2.http.Path
9 | import retrofit2.http.Query
10 |
11 | interface ProjectApi {
12 |
13 | @GET("project/tree/json")
14 | suspend fun loadProjectTree(): BaseResp>
15 |
16 |
17 | @GET("project/list/{path}/json")
18 | suspend fun loadContentById(
19 | @Path("path") path: Int,
20 | @Query("cid") cid: Int
21 | ): BaseResp>>
22 |
23 |
24 | }
--------------------------------------------------------------------------------
/app/src/main/res/menu/bottom_nav_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/webview/build.gradle:
--------------------------------------------------------------------------------
1 | if (!singleModule.toBoolean()) {
2 | apply plugin: 'com.android.library'
3 | } else {
4 | apply plugin: 'com.android.application'
5 | }
6 |
7 | apply from:'../dependencies.gradle'
8 |
9 | android{
10 | sourceSets{
11 | main {
12 | if (!singleModule.toBoolean()) {
13 | //如果是library,则编译manifest下AndroidManifest.xml
14 | manifest.srcFile 'src/main/manifest/AndroidManifest.xml'
15 | } else {
16 | //如果是application,则编译主目录下AndroidManifest.xml
17 | manifest.srcFile 'src/main/AndroidManifest.xml'
18 | }
19 | }
20 | }
21 | }
22 |
23 | dependencies {
24 | implementation project(path: ':common')
25 | }
26 |
--------------------------------------------------------------------------------
/personal/build.gradle:
--------------------------------------------------------------------------------
1 | if (!singleModule.toBoolean()) {
2 | apply plugin: 'com.android.library'
3 | } else {
4 | apply plugin: 'com.android.application'
5 | }
6 | apply from:'../dependencies.gradle'
7 |
8 | android{
9 | sourceSets{
10 | main {
11 | if (!singleModule.toBoolean()) {
12 | //如果是library,则编译manifest下AndroidManifest.xml
13 | manifest.srcFile 'src/main/manifest/AndroidManifest.xml'
14 | } else {
15 | //如果是application,则编译主目录下AndroidManifest.xml
16 | manifest.srcFile 'src/main/AndroidManifest.xml'
17 | }
18 | }
19 | }
20 | }
21 | dependencies {
22 | implementation project(path: ':common')
23 | implementation project(path: ':service')
24 | }
25 |
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/support/Constants.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.support
2 |
3 |
4 |
5 | class Constants {
6 |
7 | companion object{
8 | const val PATH_WEBVIEW: String = "/webview/WebviewActivity"
9 | const val PATH_MAIN: String = "/app/MainActivity"
10 | const val PATH_LOGIN: String = "/login/LoginActivity"
11 | const val PATH_REGISTER: String = "/login/RegisterActivity"
12 |
13 | const val KEY_LIVEDATA_BUS_LOGIN = "KEY_LIVEDATA_BUS_LOGIN"
14 | const val KEY_PROJECT_ID = "KEY_PROJECT_ID"
15 |
16 | const val KEY_WEBVIEW_PATH = "KEY_WEBVIEW_PATH"
17 | const val KEY_WEBVIEW_TITLE = "KEY_WEBVIEW_TITLE"
18 | //Sp
19 | const val SP_KEY_USER_INFO_NAME = "SP_KEY_USER_INFO_NAME"
20 | }
21 | }
--------------------------------------------------------------------------------
/login/src/androidTest/java/com/fuusy/login/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.login
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.fuusy.login", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/login/build.gradle:
--------------------------------------------------------------------------------
1 | if (!singleModule.toBoolean()) {
2 | apply plugin: 'com.android.library'
3 | } else {
4 | apply plugin: 'com.android.application'
5 | }
6 | apply from:'../dependencies.gradle'
7 | apply plugin: 'kotlin-android'
8 |
9 | android{
10 | sourceSets{
11 | main {
12 | if (!singleModule.toBoolean()) {
13 | //如果是library,则编译manifest下AndroidManifest.xml
14 | manifest.srcFile 'src/main/manifest/AndroidManifest.xml'
15 | } else {
16 | //如果是application,则编译主目录下AndroidManifest.xml
17 | manifest.srcFile 'src/main/AndroidManifest.xml'
18 | }
19 | }
20 | }
21 | }
22 | dependencies {
23 | implementation project(path: ':common')
24 | implementation project(path: ':service')
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/login/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/login/src/main/java/com/fuusy/login/repo/LoginApi.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.login.repo
2 |
3 | import com.fuusy.common.network.BaseResp
4 | import com.fuusy.service.repo.LoginResp
5 | import retrofit2.http.Field
6 | import retrofit2.http.FormUrlEncoded
7 | import retrofit2.http.POST
8 |
9 | interface LoginApi {
10 | /**
11 | * 注册
12 | */
13 | @FormUrlEncoded
14 | @POST("user/register")
15 | suspend fun register(@Field("username") username: String,@Field("password") password: String
16 | ,@Field("repassword") repassword: String) : BaseResp
17 |
18 | /**
19 | * 登录
20 | */
21 | @FormUrlEncoded
22 | @POST("user/login")
23 | suspend fun login(@Field("username") username: String,@Field("password") password: String): BaseResp
24 |
25 | }
--------------------------------------------------------------------------------
/project/src/androidTest/java/com/fuusy/project/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.project
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.fuusy.project", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/personal/src/androidTest/java/com/fuusy/personal/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.personal
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.fuusy.personal", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/personal/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/project/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/service/src/androidTest/java/com/fuusy/service/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.service
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.fuusy.service.test", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/home/src/androidTest/java/com/fuusy/home/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.fuusy.home", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/project/build.gradle:
--------------------------------------------------------------------------------
1 | if (!singleModule.toBoolean()) {
2 | apply plugin: 'com.android.library'
3 | } else {
4 | apply plugin: 'com.android.application'
5 | }
6 | apply from:'../dependencies.gradle'
7 | apply plugin: 'kotlin-android'
8 | android{
9 | sourceSets{
10 | main {
11 | if (!singleModule.toBoolean()) {
12 | //如果是library,则编译manifest下AndroidManifest.xml
13 | manifest.srcFile 'src/main/manifest/AndroidManifest.xml'
14 | } else {
15 | //如果是application,则编译主目录下AndroidManifest.xml
16 | manifest.srcFile 'src/main/AndroidManifest.xml'
17 | }
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | implementation project(path: ':common')
24 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/webview/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/common/src/androidTest/java/com/fuusy/common/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.fuusy.common", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/webview/src/androidTest/java/com/fuusy/webview/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.webview
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.fuusy.webview", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply from:'../dependencies.gradle'
3 | apply plugin: 'kotlin-android'
4 |
5 | android {
6 |
7 | defaultConfig {
8 | applicationId "com.fuusy.jetpackkt"
9 | }
10 |
11 | }
12 |
13 | dependencies {
14 |
15 | implementation project(path: ':common')
16 | implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
17 | implementation 'androidx.appcompat:appcompat:1.2.0'
18 | implementation project(path: ':service')
19 | if (!singleModule.toBoolean()) {
20 | implementation project(path: ':home')
21 | implementation project(path: ':webview')
22 | implementation project(path: ':personal')
23 | implementation project(path: ':project')
24 | implementation project(path: ':login')
25 | }
26 | }
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/fuusy/jetpackkt/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.jetpackkt
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.fuusy.jetpackkt", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/login/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
--------------------------------------------------------------------------------
/personal/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
--------------------------------------------------------------------------------
/project/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
--------------------------------------------------------------------------------
/service/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
--------------------------------------------------------------------------------
/login/src/main/java/com/fuusy/login/repo/LoginRepo.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.login.repo
2 |
3 | import com.fuusy.common.base.BaseRepository
4 | import com.fuusy.common.network.RetrofitManager
5 | import com.fuusy.common.network.net.StateLiveData
6 | import com.fuusy.service.repo.LoginResp
7 |
8 | class LoginRepo( private val service:LoginApi) : BaseRepository() {
9 |
10 | suspend fun login(userName: String, password: String, stateLiveData: StateLiveData) {
11 | executeResp({ service.login(userName, password) }, stateLiveData)
12 | }
13 |
14 | suspend fun register(
15 | userName: String,
16 | password: String,
17 | rePassword: String,
18 | stateLiveData: StateLiveData
19 | ) {
20 | executeResp({ service.register(userName, password, rePassword) }, stateLiveData)
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/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
--------------------------------------------------------------------------------
/home/src/main/res/layout/fragment_square.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
14 |
15 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/common/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
--------------------------------------------------------------------------------
/home/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
--------------------------------------------------------------------------------
/home/src/main/res/layout/fragment_daily_question.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
13 |
14 |
19 |
20 |
--------------------------------------------------------------------------------
/webview/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
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/di/LibHome.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.di
2 |
3 | import androidx.paging.ExperimentalPagingApi
4 | import com.fuusy.common.network.RetrofitManager
5 | import com.fuusy.home.api.HomeService
6 | import com.fuusy.home.dao.db.AppDatabase
7 | import com.fuusy.home.repo.HomeRepo
8 | import com.fuusy.home.viewmodel.ArticleViewModel
9 | import org.koin.android.ext.koin.androidApplication
10 | import org.koin.androidx.viewmodel.dsl.viewModel
11 | import org.koin.dsl.module
12 |
13 |
14 | @ExperimentalPagingApi
15 | val moduleHome = module {
16 | single {
17 | RetrofitManager.initRetrofit().getService(HomeService::class.java)
18 | }
19 |
20 | single {
21 | AppDatabase.get(androidApplication())
22 | }
23 |
24 | single {
25 | HomeRepo(get(),get())
26 | }
27 |
28 | viewModel { ArticleViewModel(get()) }
29 | }
--------------------------------------------------------------------------------
/common/src/main/res/layout/base_layout_error.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
16 |
17 |
22 |
23 |
--------------------------------------------------------------------------------
/project/src/main/res/layout/activity_project.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/ktx/ContextExt.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.ktx
2 |
3 | import android.annotation.SuppressLint
4 | import android.content.Context
5 | import android.net.ConnectivityManager
6 | import android.net.NetworkInfo
7 |
8 |
9 | /**
10 | * @date:2021/5/19
11 | * @author fuusy
12 | * @instruction:扩展函数,判断network是否连接
13 | */
14 | @Suppress("DEPRECATION")
15 | @SuppressLint("MissingPermission")
16 | fun Context.isConnectedNetwork(): Boolean = run {
17 | val cm = getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
18 | val activeNetwork: NetworkInfo? = cm.activeNetworkInfo
19 | activeNetwork?.isConnectedOrConnecting == true
20 | }
21 |
22 | inline fun String.getEmptyOrDefault(default: () -> T): T {
23 | return if (isNullOrEmpty() || this == "null") {
24 | default()
25 | } else {
26 | this as T
27 | }
28 | }
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
15 |
16 |
19 |
--------------------------------------------------------------------------------
/common/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #6200EE
4 | #3700B3
5 | #03DAC5
6 | #4474FF
7 | #A6A6C0
8 | #405182
9 | #F1F3F9
10 | #fab27b
11 | #ffffff
12 | #FF4500
13 | #61FF4500
14 | #000000
15 | #FFA500
16 | #FF7F50
17 | #FF6347
18 | #FF0000
19 |
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/utils/ToastUtil.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.utils
2 |
3 | import android.content.Context
4 | import android.widget.Toast
5 |
6 | object ToastUtil {
7 |
8 | private var time: Long = 0
9 | private var oldMsg: String? = null
10 |
11 | fun show(msg: String) {
12 | if (msg != oldMsg) {
13 | create(msg)
14 | time = System.currentTimeMillis()
15 | } else {
16 | if (System.currentTimeMillis() - time > 2000) {
17 | create(msg)
18 | time = System.currentTimeMillis()
19 | }
20 | }
21 | oldMsg = msg
22 | }
23 |
24 | private fun create(massage: String) {
25 | val context: Context? = AppUtil.getApplication()?.applicationContext
26 | val toast = Toast(context)
27 |
28 | //设置显示时间
29 | toast.duration = Toast.LENGTH_SHORT
30 | toast.show()
31 | }
32 | }
--------------------------------------------------------------------------------
/home/src/main/res/layout/fragment_article.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
14 |
15 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/common/src/main/res/layout/base_layout_empty.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
18 |
19 |
24 |
25 |
--------------------------------------------------------------------------------
/personal/src/main/res/layout/activity_personal.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
14 |
15 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/api/HomeService.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.api
2 |
3 | import com.fuusy.common.network.BasePagingResp
4 | import com.fuusy.common.network.BaseResp
5 | import com.fuusy.home.bean.ArticleData
6 | import com.fuusy.home.bean.BannerData
7 | import com.fuusy.home.bean.DailyQuestionData
8 | import com.fuusy.home.bean.SquareData
9 | import retrofit2.http.GET
10 | import retrofit2.http.Path
11 |
12 | interface HomeService {
13 |
14 |
15 | @GET("article/list/{page}/json")
16 | suspend fun getHomeArticle(@Path("page") page: Int): BaseResp>>
17 |
18 |
19 | @GET("banner/json")
20 | suspend fun getBanner(): BaseResp>
21 |
22 | @GET("wenda/list/{page}/json")
23 | suspend fun getDailyQuestion(@Path("page") page: Int): BaseResp>>
24 |
25 | @GET("user_article/list/{page}/json")
26 | suspend fun getSquareData(@Path("page") page: Int): BaseResp>>
27 | }
--------------------------------------------------------------------------------
/login/src/main/java/com/fuusy/login/viewmodel/LoginViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.login.viewmodel
2 |
3 | import androidx.lifecycle.viewModelScope
4 | import com.fuusy.common.base.BaseViewModel
5 | import com.fuusy.common.network.net.StateLiveData
6 | import com.fuusy.login.repo.LoginRepo
7 | import com.fuusy.service.repo.LoginResp
8 | import kotlinx.coroutines.launch
9 |
10 | class LoginViewModel(private val repo : LoginRepo) : BaseViewModel() {
11 | val loginLiveData = StateLiveData()
12 | val registerLiveData = StateLiveData()
13 |
14 | fun login(userName: String, password: String) {
15 |
16 | viewModelScope.launch {
17 | repo.login(userName, password, loginLiveData)
18 | }
19 |
20 | }
21 |
22 | fun register(
23 | userName: String,
24 | password: String,
25 | rePassword: String,
26 | ) {
27 | viewModelScope.launch {
28 | repo.register(userName, password, rePassword, registerLiveData)
29 | }
30 |
31 | }
32 |
33 | }
--------------------------------------------------------------------------------
/project/src/main/res/navigation/navi_project.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
13 |
14 |
17 |
18 |
19 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/project/src/main/res/layout/fragment_project.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
13 |
14 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/bean/SquareData.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.bean
2 |
3 |
4 | data class SquareData(
5 | val apkLink: String,
6 | val audit: Int,
7 | val author: String,
8 | val canEdit: Boolean,
9 | val chapterId: Int,
10 | val chapterName: String,
11 | val collect: Boolean,
12 | val courseId: Int,
13 | val desc: String,
14 | val descMd: String,
15 | val envelopePic: String,
16 | val fresh: Boolean,
17 | val host: String,
18 | val id: Int,
19 | val link: String,
20 | val niceDate: String,
21 | val niceShareDate: String,
22 | val origin: String,
23 | val prefix: String,
24 | val projectLink: String,
25 | val publishTime: Long,
26 | val realSuperChapterId: Int,
27 | val selfVisible: Int,
28 | val shareDate: Long,
29 | val shareUser: String,
30 | val superChapterId: Int,
31 | val superChapterName: String,
32 | val tags: List,
33 | val title: String,
34 | val type: Int,
35 | val userId: Int,
36 | val visible: Int,
37 | val zan: Int
38 | )
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/repo/data/SquarePagingDataSource.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.repo.data
2 |
3 | import androidx.paging.PagingSource
4 | import androidx.paging.PagingState
5 | import com.fuusy.home.api.HomeService
6 | import com.fuusy.home.bean.SquareData
7 |
8 | /**
9 | * @date:2021/5/20
10 | * @author fuusy
11 | * @instruction:首页广场模块的数据源,主要配合Paging3进行数据请求与显示
12 | */
13 | class SquarePagingDataSource(private val service: HomeService) :
14 | PagingSource() {
15 | override fun getRefreshKey(state: PagingState): Int? = null
16 |
17 |
18 | override suspend fun load(params: LoadParams): LoadResult {
19 | return try {
20 | val pageNum = params.key ?: 1
21 | val data = service.getSquareData(pageNum)
22 | val preKey = if (pageNum > 1) pageNum - 1 else null
23 | LoadResult.Page(data.data?.datas!!, prevKey = preKey, nextKey = pageNum + 1)
24 |
25 | } catch (e: Exception) {
26 | LoadResult.Error(e)
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/project/src/main/res/layout/fragment_project_content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
13 |
14 |
17 |
18 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/bean/DailyQuestionData.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.bean
2 |
3 | data class DailyQuestionData(
4 | val apkLink: String,
5 | val audit: Int,
6 | val author: String,
7 | val canEdit: Boolean,
8 | val chapterId: Int,
9 | val chapterName: String,
10 | val collect: Boolean,
11 | val courseId: Int,
12 | val desc: String,
13 | val descMd: String,
14 | val envelopePic: String,
15 | val fresh: Boolean,
16 | val host: String,
17 | val id: Int,
18 | val link: String,
19 | val niceDate: String,
20 | val niceShareDate: String,
21 | val origin: String,
22 | val prefix: String,
23 | val projectLink: String,
24 | val publishTime: Long,
25 | val realSuperChapterId: Int,
26 | val selfVisible: Int,
27 | val shareDate: Long,
28 | val shareUser: String,
29 | val superChapterId: Int,
30 | val superChapterName: String,
31 | val tags: List,
32 | val title: String,
33 | val type: Int,
34 | val userId: Int,
35 | val visible: Int,
36 | val zan: Int
37 | )
38 |
39 |
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/repo/data/DailyQuestionPagingSource.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.repo.data
2 |
3 | import androidx.paging.PagingSource
4 | import androidx.paging.PagingState
5 | import com.fuusy.home.api.HomeService
6 | import com.fuusy.home.bean.DailyQuestionData
7 |
8 | /**
9 | * @date:2021/5/20
10 | * @author fuusy
11 | * @instruction: 每日一问数据源,主要配合Paging3进行数据请求与显示
12 | */
13 | class DailyQuestionPagingSource(private val service: HomeService) :
14 |
15 | PagingSource() {
16 | override fun getRefreshKey(state: PagingState): Int? = null
17 |
18 | override suspend fun load(params: LoadParams): LoadResult {
19 | return try {
20 | val pageNum = params.key ?: 1
21 | val data = service.getDailyQuestion(pageNum)
22 | val preKey = if (pageNum > 1) pageNum - 1 else null
23 | LoadResult.Page(data.data?.datas!!, prevKey = preKey, nextKey = pageNum + 1)
24 |
25 | } catch (e: Exception) {
26 | LoadResult.Error(e)
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 fuusy
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/loadsir/LoadingCallback.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.loadsir
2 |
3 | import android.content.Context
4 | import android.view.View
5 | import com.fuusy.common.R
6 | import com.kingja.loadsir.callback.Callback
7 |
8 | class LoadingCallback : Callback() {
9 | //填充布局
10 | override fun onCreateView(): Int {
11 | return R.layout.base_layout_loading
12 | }
13 |
14 | //是否在显示Callback视图的时候显示原始图(SuccessView),返回true显示,false隐藏
15 | override fun getSuccessVisible(): Boolean {
16 | return true
17 | }
18 |
19 | //将Callback添加到当前视图时的回调,View为当前Callback的布局View
20 | override fun onAttach(
21 | context: Context,
22 | view: View
23 | ) {
24 | super.onAttach(context, view)
25 | }
26 |
27 | //将Callback从当前视图删除时的回调,View为当前Callback的布局View
28 | override fun onDetach() {
29 | super.onDetach()
30 | }
31 |
32 | //当前Callback的点击事件,如果返回true则覆盖注册时的onReload(),如果返回false则两者都执行,先执行onReloadEvent()。
33 | override fun onReloadEvent(
34 | context: Context,
35 | view: View
36 | ): Boolean {
37 | return true
38 | }
39 | }
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/utils/AppUtil.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.utils
2 |
3 | import android.annotation.SuppressLint
4 | import android.app.Application
5 | import java.lang.reflect.InvocationTargetException
6 |
7 | /**
8 | * 全局的Application
9 | */
10 | object AppUtil {
11 | private var sApplication: Application? = null
12 |
13 | @SuppressLint("PrivateApi")
14 | fun getApplication(): Application? {
15 | if (sApplication == null) {
16 | try {
17 | sApplication = Class.forName("android.app.ActivityThread")
18 | .getMethod("currentApplication")
19 | .invoke(null, null as Array?) as Application
20 | } catch (e: IllegalAccessException) {
21 | e.printStackTrace()
22 | } catch (e: InvocationTargetException) {
23 | e.printStackTrace()
24 | } catch (e: NoSuchMethodException) {
25 | e.printStackTrace()
26 | } catch (e: ClassNotFoundException) {
27 | e.printStackTrace()
28 | }
29 | }
30 | return sApplication
31 | }
32 | }
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/dao/db/AppDatabase.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.dao.db
2 |
3 | import android.content.Context
4 | import androidx.room.Database
5 | import androidx.room.Room
6 | import androidx.room.RoomDatabase
7 | import com.fuusy.home.bean.ArticleData
8 | import com.fuusy.home.bean.RemoteKey
9 | import com.fuusy.home.bean.RemoteKeyDao
10 | import com.fuusy.home.dao.ArticleDao
11 |
12 | @Database(
13 | entities = [ArticleData::class, RemoteKey::class],
14 | version = 1,
15 | exportSchema = false
16 | )
17 | abstract class AppDatabase : RoomDatabase() {
18 |
19 | abstract fun articleDao(): ArticleDao
20 | abstract fun remoteKeyDao(): RemoteKeyDao
21 |
22 | companion object {
23 | private const val DB_NAME = "app.db"
24 |
25 | @Volatile
26 | private var instance: AppDatabase? = null
27 |
28 | fun get(context: Context): AppDatabase {
29 | return instance ?: Room.databaseBuilder(context, AppDatabase::class.java,
30 | DB_NAME
31 | )
32 | .build().also {
33 | instance = it
34 | }
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/adapter/viewpager/HomePageAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.adapter.viewpager
2 |
3 | import android.util.Log
4 | import androidx.fragment.app.Fragment
5 | import androidx.paging.ExperimentalPagingApi
6 | import androidx.viewpager2.adapter.FragmentStateAdapter
7 | import com.fuusy.home.ui.ArticleFragment
8 | import com.fuusy.home.ui.DailyQuestionFragment
9 | import com.fuusy.home.ui.SquareFragment
10 |
11 | private const val TAG = "HomePageAdapter"
12 |
13 | /**
14 | * @date:2021/5/21
15 | * @author fuusy
16 | * @instruction: 首页ViewPagerAdapter,主要加载DailyQuestionFragment、ArticleFragment、SquareFragment
17 | */
18 | @ExperimentalPagingApi
19 | class HomePageAdapter(fragment: Fragment) : FragmentStateAdapter(fragment) {
20 | override fun getItemCount(): Int {
21 | return 3
22 | }
23 |
24 | override fun createFragment(position: Int): Fragment {
25 | Log.d(TAG, "createFragment: $position")
26 | return when (position) {
27 | 0 -> DailyQuestionFragment()
28 | 1 -> ArticleFragment()
29 | else -> SquareFragment()
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/home/src/main/java/com/fuusy/home/repo/data/HomeArticlePagingSource.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.home.repo.data
2 |
3 | import androidx.paging.PagingSource
4 | import androidx.paging.PagingState
5 | import com.fuusy.home.api.HomeService
6 | import com.fuusy.home.bean.ArticleData
7 |
8 | private const val TAG = "HomeArticlePagingSource"
9 |
10 | /**
11 | * @date:2021/5/20
12 | * @author fuusy
13 | * @instruction:首页文章的pagingSource,主要配合Paging3进行数据请求与显示
14 | */
15 | class HomeArticlePagingSource(private var service: HomeService) : PagingSource() {
16 |
17 | override suspend fun load(params: LoadParams): LoadResult {
18 | return try {
19 | val pageNum = params.key ?: 1
20 | val homeData = service.getHomeArticle(pageNum)
21 | val preKey = if (pageNum > 1) pageNum - 1 else null
22 | LoadResult.Page(homeData.data?.datas!!, prevKey = preKey, nextKey = pageNum + 1)
23 | } catch (e: Exception) {
24 | LoadResult.Error(e)
25 | }
26 | }
27 |
28 | override fun getRefreshKey(state: PagingState): Int? = null
29 |
30 | }
--------------------------------------------------------------------------------
/service/src/main/java/com/fuusy/service/repo/DbHelper.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.service.repo
2 |
3 | import android.content.Context
4 | import kotlinx.coroutines.Dispatchers
5 | import kotlinx.coroutines.GlobalScope
6 | import kotlinx.coroutines.launch
7 |
8 | object DbHelper {
9 | /**
10 | * 获取room数据表中存储的userInfo
11 | * return liveData形式
12 | */
13 | fun getLiveUserInfo(context: Context) =
14 | UserDB.get(context).userDao.queryLiveUser()
15 |
16 | /**
17 | * 以普通数据对象的形式,获取userInfo
18 | */
19 | fun getUserInfo(context: Context) = UserDB.get(context).userDao.queryUser()
20 |
21 | /**
22 | * 删除数据表中的userInfo信息
23 | */
24 | fun deleteUserInfo(context: Context) {
25 | GlobalScope.launch(Dispatchers.IO) {
26 | getUserInfo(context)?.let { info ->
27 | UserDB.get(context).userDao.deleteUser(info)
28 | }
29 | }
30 | }
31 |
32 | /**
33 | * 新增用户数据到数据表
34 | */
35 | fun insertUserInfo(context: Context, user: LoginResp) {
36 | GlobalScope.launch(Dispatchers.IO) {
37 | UserDB.get(context).userDao.insertUser(user)
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/base/BaseViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.base
2 |
3 | import androidx.lifecycle.ViewModel
4 | import androidx.lifecycle.viewModelScope
5 | import com.fuusy.common.support.SingleLiveData
6 | import kotlinx.coroutines.Dispatchers
7 | import kotlinx.coroutines.launch
8 |
9 | /**
10 | * @date:2021/6/11
11 | * @author fuusy
12 | * @instruction:
13 | */
14 | open class BaseViewModel : ViewModel() {
15 | val loadingLiveData = SingleLiveData()
16 |
17 | val errorLiveData = SingleLiveData()
18 |
19 | /**
20 | * @deprecated
21 | */
22 | fun launch(
23 | block: suspend () -> Unit,
24 | error: suspend (Throwable) -> Unit,
25 | complete: suspend () -> Unit
26 | ) {
27 | loadingLiveData.postValue(true)
28 | viewModelScope.launch(Dispatchers.IO) {
29 | try {
30 | block()
31 | } catch (e: Exception) {
32 | error(e)
33 | } finally {
34 | complete()
35 | }
36 | }
37 | }
38 |
39 |
40 |
41 | }
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/network/config/LocalCookieJar.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.network.config
2 |
3 | import okhttp3.Cookie
4 | import okhttp3.CookieJar
5 | import okhttp3.HttpUrl
6 |
7 | internal class LocalCookieJar : CookieJar {
8 | //cookie的本地化存储
9 | private val cache = mutableListOf()
10 |
11 | override fun loadForRequest(url: HttpUrl): List {
12 | //过期的Cookie
13 | val invalidCookies: MutableList = ArrayList()
14 | //有效的Cookie
15 | val validCookies: MutableList = ArrayList()
16 |
17 | for (cookie in cache) {
18 | if (cookie.expiresAt < System.currentTimeMillis()) {
19 | //判断是否过期
20 | invalidCookies.add(cookie)
21 | } else if (cookie.matches(url)) {
22 | //匹配Cookie对应url
23 | validCookies.add(cookie)
24 | }
25 | }
26 | //缓存中移除过期的Cookie
27 | cache.removeAll(invalidCookies)
28 |
29 | //返回List让Request进行设置
30 | return validCookies
31 | }
32 |
33 | override fun saveFromResponse(url: HttpUrl, cookies: List) {
34 | cache.addAll(cookies)
35 | }
36 |
37 | }
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/common/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
26 |
27 |
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/support/SingleLiveData.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.support
2 |
3 | import android.util.Log
4 | import androidx.annotation.MainThread
5 | import androidx.lifecycle.LifecycleOwner
6 | import androidx.lifecycle.MutableLiveData
7 | import androidx.lifecycle.Observer
8 | import java.util.concurrent.atomic.AtomicBoolean
9 |
10 | /**
11 | * 单事件响应的liveData,只有一个接收者能接收到信息,可以避免不必要的业务的场景中的事件消费通知
12 | * 只有调用call的时候,observer才能收到通知
13 | */
14 | open class SingleLiveData : MutableLiveData() {
15 |
16 | private val mPending = AtomicBoolean(false)
17 |
18 | @MainThread
19 | override fun observe(owner: LifecycleOwner, observer: Observer) {
20 |
21 | if (hasActiveObservers()) {
22 | Log.w(TAG, "多个观察者存在的时候,只会有一个被通知到数据更新")
23 | }
24 |
25 | super.observe(owner, Observer { t ->
26 | if (mPending.compareAndSet(true, false)) {
27 | observer.onChanged(t)
28 | }
29 | })
30 |
31 | }
32 |
33 | override fun setValue(value: T?) {
34 | mPending.set(true)
35 | super.setValue(value)
36 | }
37 |
38 | @MainThread
39 | fun call() {
40 | value = null
41 | }
42 |
43 | companion object {
44 | private const val TAG = "SingleLiveData"
45 | }
46 | }
--------------------------------------------------------------------------------
/home/src/main/res/layout/item_daily_question.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
20 |
21 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
16 |
17 |
22 |
23 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/common/src/main/java/com/fuusy/common/support/BnvMediator.kt:
--------------------------------------------------------------------------------
1 | package com.fuusy.common.support
2 |
3 | import android.view.MenuItem
4 | import androidx.core.view.forEach
5 | import androidx.core.view.forEachIndexed
6 | import androidx.core.view.get
7 | import androidx.viewpager2.widget.ViewPager2
8 | import com.google.android.material.bottomnavigation.BottomNavigationView
9 |
10 | /**
11 | *BottomNavigationView和ViewPager2关联
12 | */
13 | class BnvMediator(
14 | private val bnv: BottomNavigationView,
15 | private val vp2: ViewPager2,
16 | private val config: ((bnv: BottomNavigationView, vp2: ViewPager2) -> Unit)? = null
17 |
18 | ) {
19 |
20 | private val map = mutableMapOf