times-news

所属分类:collect
开发工具:kotlin
文件大小:0KB
下载次数:0
上传日期:2023-02-10 08:46:11
上 传 者sh-1993
说明:  时代新闻,,
(times-news,,)

文件列表:
.idea/ (0, 2023-02-10)
.idea/.name (10, 2023-02-10)
.idea/androidTestResultsUserPreferences.xml (2544, 2023-02-10)
.idea/compiler.xml (169, 2023-02-10)
.idea/gradle.xml (737, 2023-02-10)
.idea/misc.xml (444, 2023-02-10)
.idea/vcs.xml (180, 2023-02-10)
app/ (0, 2023-02-10)
app/build.gradle (3008, 2023-02-10)
app/proguard-rules.pro (750, 2023-02-10)
app/src/ (0, 2023-02-10)
app/src/androidTest/ (0, 2023-02-10)
app/src/androidTest/java/ (0, 2023-02-10)
app/src/androidTest/java/fr/ (0, 2023-02-10)
app/src/androidTest/java/fr/martinflorian/ (0, 2023-02-10)
app/src/androidTest/java/fr/martinflorian/timesnews/ (0, 2023-02-10)
app/src/androidTest/java/fr/martinflorian/timesnews/DatabaseTests.kt (3787, 2023-02-10)
app/src/androidTest/java/fr/martinflorian/timesnews/LiveDataUtilAndroidTest.kt (1993, 2023-02-10)
app/src/main/ (0, 2023-02-10)
app/src/main/AndroidManifest.xml (1409, 2023-02-10)
app/src/main/app_icon-playstore.png (30818, 2023-02-10)
app/src/main/java/ (0, 2023-02-10)
app/src/main/java/fr/ (0, 2023-02-10)
app/src/main/java/fr/martinflorian/ (0, 2023-02-10)
app/src/main/java/fr/martinflorian/timesnews/ (0, 2023-02-10)
app/src/main/java/fr/martinflorian/timesnews/data/ (0, 2023-02-10)
app/src/main/java/fr/martinflorian/timesnews/data/Resource.kt (429, 2023-02-10)
app/src/main/java/fr/martinflorian/timesnews/data/State.kt (223, 2023-02-10)
app/src/main/java/fr/martinflorian/timesnews/data/local/ (0, 2023-02-10)
app/src/main/java/fr/martinflorian/timesnews/data/local/AppDatabase.kt (905, 2023-02-10)
app/src/main/java/fr/martinflorian/timesnews/data/local/ArticlesDao.kt (844, 2023-02-10)
app/src/main/java/fr/martinflorian/timesnews/data/remote/ (0, 2023-02-10)
app/src/main/java/fr/martinflorian/timesnews/data/remote/BaseArticle.kt (240, 2023-02-10)
app/src/main/java/fr/martinflorian/timesnews/data/remote/CategorizedArticles.kt (2245, 2023-02-10)
app/src/main/java/fr/martinflorian/timesnews/data/remote/NewsWireArticles.kt (1623, 2023-02-10)
app/src/main/java/fr/martinflorian/timesnews/data/remote/Service.kt (1467, 2023-02-10)
... ...

# Times News :newspaper: **Times News** is a sample press articles Android application built to demonstrate use of *Modern Android development* tools. ![](https://github.com/Florian-Martin/times-news/blob/master/medias/times_news_multiscreens_preview.png) ## About The application works with New York Times API to fetch and display different kinds of articles : Newswire, categorized articles and also trending articles. User can navigate through all kinds of articles via a BottomNavigationView. To ensure a better user experience, articles are cached in device's database after having been fetched from New York Times API. This means that user never faces a blank screen if he's experiencing network connection problems, as data is synchronized and loaded only from device's database. ## Download - Download latest release [here](https://github.com/Florian-Martin/times-news/blob/master/https://github.com/Florian-Martin/times-news/releases/tag/v1.0.0/times-news.apk) ## Built with - [Kotlin](https://github.com/Florian-Martin/times-news/blob/master/https://kotlinlang.org/) - First class and official programming language for Android development. - [Coroutines](https://github.com/Florian-Martin/times-news/blob/master/https://kotlinlang.org/docs/reference/coroutines-overview.html) - For asynchronous and more.. - [Flow](https://github.com/Florian-Martin/times-news/blob/master/https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/) - A cold asynchronous data stream that sequentially emits values and completes normally or with an exception. - [Android Architecture Components](https://github.com/Florian-Martin/times-news/blob/master/https://developer.android.com/topic/libraries/architecture) - Collection of libraries that help you design robust, testable, and maintainable apps. - [LiveData](https://github.com/Florian-Martin/times-news/blob/master/https://developer.android.com/topic/libraries/architecture/livedata) - Data objects that notify views when the underlying database changes. - [ViewModel](https://github.com/Florian-Martin/times-news/blob/master/https://developer.android.com/topic/libraries/architecture/viewmodel) - Stores UI-related data that isn't destroyed on UI changes. - [ViewBinding](https://github.com/Florian-Martin/times-news/blob/master/https://developer.android.com/topic/libraries/view-binding) - Generates a binding class for each XML layout file present in that module and allows you to more easily write code that interacts with views. - [Room](https://github.com/Florian-Martin/times-news/blob/master/https://developer.android.com/topic/libraries/architecture/room) - SQLite object mapping library. - [RecyclerView + ListAdapter](https://github.com/Florian-Martin/times-news/blob/master/https://developer.android.com/reference/androidx/recyclerview/widget/ListAdapter) - Presenting List data in a RecyclerView, including computing diffs between Lists on a background thread - [Retrofit](https://github.com/Florian-Martin/times-news/blob/master/https://square.github.io/retrofit/) - A type-safe HTTP client for Android and Java. - [Moshi](https://github.com/Florian-Martin/times-news/blob/master/https://github.com/square/moshi) - A modern JSON library for Kotlin and Java. - [Moshi Converter](https://github.com/Florian-Martin/times-news/blob/master/https://github.com/square/retrofit/tree/master/retrofit-converters/moshi) - A Converter which uses Moshi for serialization to and from JSON. - [Coil-kt](https://github.com/Florian-Martin/times-news/blob/master/https://coil-kt.github.io/coil/) - An image loading library for Android backed by Kotlin Coroutines. - [Safe Args](https://github.com/Florian-Martin/times-news/blob/master/https://developer.android.com/guide/navigation/navigation-pass-data) - To pass data through destinations - [Unit tests](https://github.com/Florian-Martin/times-news/blob/master/https://developer.android.com/training/testing/local-tests) - [Instrumented tests](https://github.com/Florian-Martin/times-news/blob/master/https://developer.android.com/training/testing/instrumented-tests) ## Architecture :construction_worker: The application is built following MVVM pattern, additionally a repository serves as a single source of truth for the app's data, and abstracts the source of the data (network, cache, etc.) out of the view model. ![](https://github.com/Florian-Martin/times-news/blob/master/medias/architecture.png) ## Structure ``` ├───data │ │ AppDatabase.kt │ │ Resource.kt │ │ State.kt │ │ │ ├───local │ │ ArticlesDao.kt │ │ │ ├───remote │ │ BaseArticle.kt │ │ CategorizedArticles.kt │ │ NewsWireArticles.kt │ │ Service.kt │ │ TopStoriesArticles.kt │ │ │ └───repository │ ArticlesRepository.kt │ ├───model │ Article.kt │ ArticleCategory.kt │ ├───ui │ │ ArticlesAdapter.kt │ │ MainActivity.kt │ │ │ ├───bookmarks │ │ BookmarksFragment.kt │ │ BookmarksViewModel.kt │ │ │ ├───categories │ │ CategoriesAdapter.kt │ │ CategorizedArticlesFragment.kt │ │ CategorizedArticlesViewModel.kt │ │ │ ├───detail │ │ ArticleDetailFragment.kt │ │ ArticleDetailViewModel.kt │ │ │ ├───newswire │ │ NewswireFragment.kt │ │ NewswireViewModel.kt │ │ │ ├───splash │ │ SplashActivity.kt │ │ SplashViewModel.kt │ │ │ └───trending │ TrendingFragment.kt │ TrendingViewModel.kt │ └───utils BaseUtils.kt Constants.kt SwipeToDeleteCallback.kt ```

近期下载者

相关文件


收藏者