-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from raikwaramit/dev
[Added new feature] Added support for all other screen
- Loading branch information
Showing
71 changed files
with
29,756 additions
and
377 deletions.
There are no files selected for viewing
This file contains 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
Binary file not shown.
This file contains 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
Binary file not shown.
Binary file not shown.
This file contains 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
3 changes: 3 additions & 0 deletions
3
app/src/main/java/com/raikwaramit/cryptoatlas/common/Constants.kt
This file contains 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
13 changes: 13 additions & 0 deletions
13
app/src/main/java/com/raikwaramit/cryptoatlas/data/local/AppDataBase.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.raikwaramit.cryptoatlas.data.local | ||
|
||
import androidx.room.Database | ||
import androidx.room.RoomDatabase | ||
|
||
/** | ||
* Room database abstract class for creating the data base. | ||
*/ | ||
@Database(entities = [FavoriteCoin::class], version = 1, exportSchema = false) | ||
abstract class AppDatabase : RoomDatabase() { | ||
abstract fun favoriteDao(): FavoriteDao | ||
} | ||
|
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/raikwaramit/cryptoatlas/data/local/FavoriteCoin.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.raikwaramit.cryptoatlas.data.local | ||
|
||
import androidx.room.ColumnInfo | ||
import androidx.room.Entity | ||
import androidx.room.PrimaryKey | ||
|
||
/** | ||
* Data class representing the room data base table. | ||
* | ||
* @property coinId Id of the crypto coin. | ||
* @property coinName Name of the crypto coin. | ||
* @property symbol Symbol of the crypto coin. | ||
* @property isActive Tells if the coin is active or not. | ||
*/ | ||
@Entity | ||
data class FavoriteCoin( | ||
@PrimaryKey @ColumnInfo(name = "coin_id") val coinId: String, | ||
@ColumnInfo(name = "coin_name") val coinName: String?, | ||
@ColumnInfo(name = "coin_symbol") val symbol: String?, | ||
@ColumnInfo(name = "is_active") val isActive: Boolean?, | ||
) |
18 changes: 18 additions & 0 deletions
18
app/src/main/java/com/raikwaramit/cryptoatlas/data/local/FavoriteDao.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.raikwaramit.cryptoatlas.data.local | ||
|
||
import androidx.room.Dao | ||
import androidx.room.Delete | ||
import androidx.room.Query | ||
import androidx.room.Upsert | ||
|
||
@Dao | ||
interface FavoriteDao { | ||
@Query("SELECT * FROM favoritecoin") | ||
suspend fun getAll(): List<FavoriteCoin> | ||
|
||
@Upsert | ||
suspend fun insert(favoriteCoin: FavoriteCoin) | ||
|
||
@Delete | ||
suspend fun delete(favoriteCoin: FavoriteCoin) | ||
} |
This file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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
6 changes: 0 additions & 6 deletions
6
app/src/main/java/com/raikwaramit/cryptoatlas/presentation/Screen.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.