Skip to content

Commit e3e4314

Browse files
committed
[feat] #336 - image detail fragment에서 imageview를 photoview로 변경
1 parent 7b40a71 commit e3e4314

File tree

5 files changed

+27
-14
lines changed

5 files changed

+27
-14
lines changed

app/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ dependencies {
7272
implementation(Dep.Firebase.crashlyticsKtx)
7373
implementation(Dep.Firebase.analyticsKtx)
7474
implementation(project(mapOf("path" to ":data")))
75+
implementation("com.github.chrisbanes:PhotoView:2.3.0")
7576
kapt(Dep.AndroidX.roomCompiler)
7677
kapt(Dep.Libs.hiltCompiler)
7778
kapt(Dep.Libs.hiltViewModelCompiler)

app/src/main/res/layout/fragment_image_detail.xml

+10-13
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,32 @@
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools">
55

6-
<data>
7-
8-
</data>
9-
106
<androidx.constraintlayout.widget.ConstraintLayout
117
android:id="@+id/cl_image"
128
android:layout_width="match_parent"
139
android:layout_height="match_parent"
1410
android:background="@color/black"
1511
tools:context=".ui.main.friend_detail.ImageDetailFragment">
1612

13+
<com.github.chrisbanes.photoview.PhotoView
14+
android:id="@+id/iv_profile_image"
15+
android:layout_width="match_parent"
16+
android:layout_height="match_parent"
17+
android:transitionName="secondTransitionName"
18+
app:layout_constraintBottom_toBottomOf="parent"
19+
app:layout_constraintTop_toTopOf="parent" />
20+
1721
<ImageView
1822
android:id="@+id/iv_btn_close"
1923
android:layout_width="36dp"
2024
android:layout_height="36dp"
2125
android:layout_margin="8dp"
26+
android:elevation="2dp"
27+
android:contentDescription="@string/fragment_image_detail_close_button"
2228
android:padding="4dp"
2329
android:src="@drawable/ic_baseline_close_24"
2430
app:layout_constraintStart_toStartOf="parent"
2531
app:layout_constraintTop_toTopOf="parent" />
2632

27-
<ImageView
28-
android:id="@+id/iv_profile_image"
29-
android:layout_width="match_parent"
30-
android:layout_height="match_parent"
31-
android:transitionName="secondTransitionName"
32-
app:layout_constraintBottom_toBottomOf="parent"
33-
app:layout_constraintTop_toTopOf="parent" />
34-
35-
3633
</androidx.constraintlayout.widget.ConstraintLayout>
3734
</layout>

app/src/main/res/values/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -176,4 +176,5 @@
176176
<string name="open_source_license">오픈소스 라이선스</string>
177177
<string name="image_license">이미지 라이선스</string>
178178
<string name="image_license_detail" translatable="false">Icon made by Freepik from www.flaticon.com/authors/freepik</string>
179+
<string name="fragment_image_detail_close_button" translatable="false">close button</string>
179180
</resources>

build.gradle.kts

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ buildscript {
22
repositories {
33
google()
44
mavenCentral()
5+
maven {
6+
setUrl("https://www.jitpack.io")
7+
}
58
}
69
dependencies {
710
classpath(Dep.androidGradlePlugin)
@@ -18,6 +21,14 @@ tasks.register("clean", Delete::class) {
1821
delete(rootProject.buildDir)
1922
}
2023

24+
allprojects {
25+
repositories {
26+
maven {
27+
setUrl("https://www.jitpack.io")
28+
}
29+
}
30+
}
31+
2132
subprojects {
2233
afterEvaluate {
2334
project.apply("$rootDir/gradle/common.gradle")

settings.gradle.kts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
dependencyResolutionManagement {
2-
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
2+
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
33
repositories {
44
google()
55
mavenCentral()
6+
maven {
7+
setUrl("https://www.jitpack.io")
8+
}
69
}
710
}
811
include(":app")

0 commit comments

Comments
 (0)