Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added hero information screen with navigation component in module - f…
…eature:avengers
- Loading branch information
dksung
committed
Feb 5, 2023
1 parent
cb4a38d
commit 4c164d9
Showing
15 changed files
with
240 additions
and
123 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 was deleted.
Oops, something went wrong.
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,9 +1,41 @@ | ||
// TODO: Remove once https://youtrack.jetbrains.com/issue/KTIJ-19369 is fixed | ||
@Suppress("DSL_SCOPE_VIOLATION") | ||
plugins { | ||
id("java-library") | ||
id("kotlin") | ||
alias(libs.plugins.android.library) | ||
kotlin("android") | ||
kotlin("kapt") | ||
id("kotlin-parcelize") | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
android { | ||
|
||
namespace = "com.turtle.multimodulehilt.core.model" | ||
compileSdk = libs.versions.compileSdkVersion.get().toInt() | ||
|
||
defaultConfig { | ||
|
||
minSdk = libs.versions.minSdkVersion.get().toInt() | ||
targetSdk = libs.versions.targetSdkVersion.get().toInt() | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility(JavaVersion.VERSION_1_8) | ||
targetCompatibility(JavaVersion.VERSION_1_8) | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_1_8.toString() | ||
} | ||
} |
130 changes: 72 additions & 58 deletions
130
core/model/src/main/java/com/turtle/multimodulehilt/core/model/Hero.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
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
28 changes: 28 additions & 0 deletions
28
...ngers/src/main/java/com/turtle/multimodulehilt/feature/avengers/AvengersDetailFragment.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,28 @@ | ||
package com.turtle.multimodulehilt.feature.avengers | ||
|
||
import androidx.navigation.fragment.navArgs | ||
import com.bumptech.glide.Glide | ||
import com.turtle.multimodulehilt.core.common.base.BaseFragment | ||
import com.turtle.multimodulehilt.core.model.Hero | ||
import com.turtle.multimodulehilt.feature.avengers.databinding.FragmentAvengersDetailBinding | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
class AvengersDetailFragment : | ||
BaseFragment<FragmentAvengersDetailBinding>(R.layout.fragment_avengers_detail) { | ||
|
||
private val args: AvengersDetailFragmentArgs by navArgs() | ||
private val hero: Hero by lazy { | ||
args.hero | ||
} | ||
|
||
// TODO: 공유 요소를 사용하여 이미지뷰를 출력 | ||
override fun init() { | ||
Glide.with(binding.imageviewAvengersDetailFragmentCenter) | ||
.load("${hero.thumbnail.path}.${hero.thumbnail.extension}") | ||
.error(R.drawable.whoishe) | ||
.placeholder(R.drawable.whoishe) | ||
.into(binding.imageviewAvengersDetailFragmentCenter) | ||
} | ||
|
||
} |
16 changes: 0 additions & 16 deletions
16
...vengers/src/main/java/com/turtle/multimodulehilt/feature/avengers/AvengersDiffCallback.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.