graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package fr.ippon.androidaacsample.coinsentinel.vm | |
| import androidx.lifecycle.LiveData | |
| import androidx.lifecycle.ViewModel | |
| import fr.ippon.androidaacsample.coinsentinel.db.Coin | |
| import fr.ippon.androidaacsample.coinsentinel.repository.CoinRepository | |
| import fr.ippon.androidaacsample.coinsentinel.repository.Resource | |
| import javax.inject.Inject | |
| import javax.inject.Singleton |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package fr.ippon.androidaacsample.coinsentinel.repository | |
| import androidx.lifecycle.LiveData | |
| import androidx.lifecycle.MediatorLiveData | |
| import awaitObjectResult | |
| import com.github.kittinunf.fuel.Fuel | |
| import fr.ippon.androidaacsample.coinsentinel.api.CoinResultDeserializer | |
| import fr.ippon.androidaacsample.coinsentinel.api.CoinRouting | |
| import fr.ippon.androidaacsample.coinsentinel.db.Coin | |
| import fr.ippon.androidaacsample.coinsentinel.db.CoinDao |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package fr.ippon.androidaacsample.coinsentinel.di | |
| import android.app.Application | |
| import androidx.room.Room | |
| import com.google.gson.Gson | |
| import com.google.gson.GsonBuilder | |
| import dagger.Module | |
| import dagger.Provides | |
| import fr.ippon.androidaacsample.coinsentinel.api.CoinResultDeserializer | |
| import fr.ippon.androidaacsample.coinsentinel.api.CoinTypeAdapter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package fr.ippon.androidaacsample.coinsentinel.db | |
| import androidx.room.Database | |
| import androidx.room.RoomDatabase | |
| @Database(entities = [Coin::class], version = 1, exportSchema = false) | |
| abstract class AppDatabase : RoomDatabase() { | |
| abstract fun coinDao(): CoinDao | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package fr.ippon.androidaacsample.coinsentinel.db | |
| import androidx.lifecycle.LiveData | |
| import androidx.room.Dao | |
| import androidx.room.Insert | |
| import androidx.room.OnConflictStrategy | |
| import androidx.room.Query | |
| @Dao | |
| interface CoinDao { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package fr.ippon.androidaacsample.coinsentinel.db | |
| import androidx.room.Entity | |
| import androidx.room.PrimaryKey | |
| @Entity(tableName = "COIN") | |
| data class Coin ( | |
| @PrimaryKey | |
| val id: Long, | |
| val name: String, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ... | |
| // Room | |
| implementation "androidx.room:room-runtime:$lifecycle_version" | |
| kapt "androidx.room:room-compiler:$lifecycle_version" | |
| // ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ... | |
| this.coinViewModel.coins.observe(this, this.updateCoins) | |
| // ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ... | |
| @Inject | |
| lateinit var coinViewModel: CoinViewModel | |
| // ... |
NewerOlder