-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update README and arts * Add abstract api remote paging data source class Migrate movie list API to this abstract class Migrate movie review list API to this abstract class * Add page keyed data source factory abstract class * Set snap and padding for movie detail * Remove home category header holder epoxy group model * Integrate movie home showcase * Fix Timber and logger will not show log issue * Add image full path formatter * Setup singleton image loader, error and placeholder drawable for Coil
- Loading branch information
Showing
43 changed files
with
407 additions
and
357 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
package com.enginebai.moviehunt | ||
|
||
import coil.Coil | ||
import coil.ImageLoader | ||
import com.enginebai.base.BaseApplication | ||
import com.enginebai.moviehunt.di.* | ||
import org.koin.android.ext.android.get | ||
|
||
class AppContext : BaseApplication() { | ||
|
||
override fun defineDependencies() = listOf( | ||
loggingModule, | ||
gsonModule, | ||
errorHandleModule, | ||
networkModule, | ||
appModule, | ||
viewModelModule, | ||
apiModule, | ||
dbModule, | ||
daoModule, | ||
repoModule | ||
loggingModule, | ||
gsonModule, | ||
errorHandleModule, | ||
networkModule, | ||
appModule, | ||
viewModelModule, | ||
apiModule, | ||
dbModule, | ||
daoModule, | ||
repoModule | ||
) | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
Coil.setImageLoader(get<ImageLoader>()) | ||
} | ||
} |
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
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/enginebai/moviehunt/data/remote/ImageApi.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,19 @@ | ||
package com.enginebai.moviehunt.data.remote | ||
|
||
import com.enginebai.moviehunt.BuildConfig | ||
|
||
object ImageApi { | ||
fun getFullUrl(path: String?, size: ImageSize? = ImageSize.ORIGINAL) = | ||
"${BuildConfig.IMAGE_API_KEY}${size}/${path}" | ||
} | ||
|
||
enum class ImageSize(val path: String) { | ||
W500("w500"), | ||
W780("w780"), | ||
W45("w45"), | ||
W185("w185"), | ||
H632("h632"), | ||
ORIGINAL("original"); | ||
|
||
override fun toString() = path | ||
} |
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
Oops, something went wrong.