Skip to content

Commit

Permalink
refactpr: 펫 상세화면 이미지 연결 및 툴바 터치 안되는 이슈
Browse files Browse the repository at this point in the history
  • Loading branch information
junjange committed Aug 4, 2024
1 parent 9aa72ea commit 0425efb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.happy.friendogly.presentation.ui.petdetail

import android.util.Log
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.SavedStateHandle
Expand Down Expand Up @@ -50,6 +51,7 @@ class PetDetailViewModel(
}

fun navigateToBack() {
Log.d("ttt", "hihi")
_navigateAction.emit(PetProfileNavigationAction.NavigateToBack)
}

Expand Down
41 changes: 21 additions & 20 deletions android/app/src/main/res/layout/activity_pet_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rect_black_gradient_start"
app:layout_constraintTop_toTopOf="parent" />


<ImageView
android:id="@+id/iv_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
app:tint="@color/white"
onSingleClick="@{() -> vm.navigateToBack()}"
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_arrow_left" />


<androidx.viewpager2.widget.ViewPager2
android:id="@+id/vp_pet_detail"
Expand Down Expand Up @@ -67,5 +47,26 @@
app:setUpIndicator="@{vm.uiState.petsDetail.data.size()}" />


<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rect_black_gradient_start"
app:layout_constraintTop_toTopOf="parent" />


<ImageView
android:id="@+id/iv_arrow"
onSingleClick="@{() -> vm.navigateToBack()}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_arrow_left"
app:tint="@color/white" />


</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
2 changes: 1 addition & 1 deletion android/app/src/main/res/layout/item_pet_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

<ImageView
android:id="@+id/iv_dog_profile"
urlToImage="@{petDetail.imageUrl}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:src="@drawable/img_acorm"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
Expand Down

0 comments on commit 0425efb

Please sign in to comment.