- We are here to practice the usage of Architecture Jetpack components.
- We are going to use Kotlin.
- We are going to practice pair programming.
This repository contains an Android application to show Super Heroes information:
This Application is based on three Activities:
MainActivity
showing a list of super heroes with name, photo and a special badge if it is part of the Avengers Team.
SuperHeroDetailActivity
showing detailed information about a super hero like his or her name, photo and description.
EditSuperHeroActivity
: Display options to change some attributes of a superhero like their Avengers badge, their name and their description.
The application architecture, dependencies and configuration is ready to just start migrating code to Jetpack.
To verify the correct behaviour of your code you can execute:
./gradlew executeScreenshotTests
To be able to get a deterministic test scenario all our tests will be executed on the same emulated device. Run the following to create an emulator like the one we used to get all the reference screenshots:
./scripts/start_emulator.sh
Your task as Android Developer is to migrate the application to Jetpack components. You will do so step by step and always using tests to verify everything is still working.
Our recommendation for this exercise is:
- Before starting
- Fork this repository.
- Checkout
00-start
branch. - Execute the application, explore it manually and make yourself familiar with the code.
- Execute
MainActivityTest
,SuperHeroDetailActivityTest
andEditSuperHeroActivityTest
to see tests run.
- Feel free to migrate at your own pace and order but if you want to make it a bit easier, follow this order:
If you get stuck, master
branch contains the finished kata using all architecture components. There are also tags for every single new component following the above order.
There are some links which can be useful to finish these tasks:
- Screenshot Kata in Kotlin
- Android Room with a View - Codelab
- Android Data Binding - Codelab
- Android Paging - Codelab
- Android lifecycle-aware components - Codelab
- Background Work with WorkManager - Codelab
Data provided by Marvel. © 2019 MARVEL
Copyright 2019 Karumi
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.