Skip to content
Snippets Groups Projects
Commit 618cd585 authored by Baryshnikov Oleg's avatar Baryshnikov Oleg
Browse files

Add the apk-file.

Add readme.
Add back button to the detail character screen.
parent 85d12419
No related branches found
No related tags found
No related merge requests found
## Ackee android test task
This test task that was written based on the following description: https://github.com/AckeeCZ/android-task-rick-and-morty#readme.
In this project, I used the Compose toolkit for defining the UI layer and Coroutines for handling asynchronous tasks. It is the first time I have used these libraries in a project.
Normally, I use default XML layouts and RxJava. You can find an example of my "study" e-shop application with XML/RxJava on https://gitlab.fel.cvut.cz/barysole/pda-sw-e-shop.
The application uses the modern Material Design 3 component library, and because of that, some elements look different from the design. I have decided that it is not a problem for this test task.
## APPLICATION APK
## KNOWING ISSUES
- Problem: The characters list doesn't save its scrolling position after navigating to the character detail screen and back.
Analysis: LazyColumn gets the characters list from the ViewModel flow by using the ".collectAsLazyPagingItems()" method, and this method retrieves only part of the characters list after navigation.
\ No newline at end of file
File added
...@@ -34,7 +34,8 @@ sealed class Screen( ...@@ -34,7 +34,8 @@ sealed class Screen(
"characterdetail/{characterId}", "characterdetail/{characterId}",
routeWithoutArgument = "characterdetail", routeWithoutArgument = "characterdetail",
actionList = listOf(ScreenAction.AddToFavoriteScreenAction), actionList = listOf(ScreenAction.AddToFavoriteScreenAction),
showBottomBar = false showBottomBar = false,
isBackButtonShowing = true
) )
} }
......
...@@ -33,7 +33,7 @@ fun CharacterListScreen( ...@@ -33,7 +33,7 @@ fun CharacterListScreen(
color = MaterialTheme.colorScheme.background color = MaterialTheme.colorScheme.background
) { ) {
val characterItems = characterListViewModel.charactersPDFlow.collectAsLazyPagingItems() val characterItems = characterListViewModel.charactersPDFlow.collectAsLazyPagingItems()
if (characterItems.loadState.mediator?.refresh is LoadState.Error || characterItems.loadState.mediator?.append is LoadState.Error) { if (characterItems.loadState.source.append is LoadState.Error) {
characterListViewModel.showLoadingError(true) characterListViewModel.showLoadingError(true)
} else { } else {
characterListViewModel.showLoadingError(false) characterListViewModel.showLoadingError(false)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment