Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

멍개 상세 UI 구현 #55

Merged
merged 6 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.woowacourse.friendogly.presentation.ui.group.detail

import androidx.fragment.app.viewModels
import com.woowacourse.friendogly.R
import com.woowacourse.friendogly.databinding.FragmentGroupDetailBinding
import com.woowacourse.friendogly.presentation.base.BaseFragment

class GroupDetailFragment :
BaseFragment<FragmentGroupDetailBinding>(R.layout.fragment_group_detail) {
private val viewModel: GroupDetailViewModel by viewModels()

override fun initViewCreated() {
binding.vm = viewModel
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.woowacourse.friendogly.presentation.ui.group.detail

import com.woowacourse.friendogly.presentation.base.BaseViewModel

class GroupDetailViewModel : BaseViewModel()
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white" />
<corners android:radius="10dp" />
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white" />
<corners android:radius="8dp" />
</shape>
198 changes: 198 additions & 0 deletions android/app/src/main/res/layout/fragment_group_detail.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".presentation.ui.group.detail.GroupDetailFragment">

<data>

<variable
name="vm"
type="com.woowacourse.friendogly.presentation.ui.group.detail.GroupDetailViewModel" />
</data>

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<ImageView
android:id="@+id/iv_group_detail_poster"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/black"
android:scaleType="centerCrop"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:src="@drawable/ic_arrow_left"
app:layout_constraintStart_toStartOf="@id/iv_group_detail_poster"
app:layout_constraintTop_toTopOf="@id/iv_group_detail_poster"
app:tint="@color/white" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:src="@drawable/ic_more_vertical"
app:layout_constraintEnd_toEndOf="@id/iv_group_detail_poster"
app:layout_constraintTop_toTopOf="@id/iv_group_detail_poster"
app:tint="@color/white" />

<View
android:id="@+id/view_group_detail_top_bar"
android:layout_width="match_parent"
android:layout_height="68dp"
app:layout_constraintTop_toBottomOf="@id/iv_group_detail_poster" />

<ImageView
android:id="@+id/iv_group_detail_user_image"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="10dp"
android:src="@drawable/ic_dog"
app:layout_constraintBottom_toBottomOf="@id/view_group_detail_top_bar"
app:layout_constraintStart_toStartOf="@id/view_group_detail_top_bar"
app:layout_constraintTop_toTopOf="@id/view_group_detail_top_bar" />

<TextView
android:id="@+id/tv_group_detail_user_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
app:layout_constraintBottom_toTopOf="@id/ll_group_detail_group_info"
app:layout_constraintStart_toEndOf="@id/iv_group_detail_user_image"
app:layout_constraintTop_toTopOf="@id/view_group_detail_top_bar"
tools:text="이름" />

<LinearLayout
android:id="@+id/ll_group_detail_group_info"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="@id/view_group_detail_top_bar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_group_detail_user_image"
app:layout_constraintTop_toBottomOf="@id/tv_group_detail_user_name">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="잠실6동" />

<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="1일 전" />
</LinearLayout>

<View
android:id="@+id/view_group_detail_line"
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_marginTop="10dp"
android:background="@color/gray04"
app:layout_constraintTop_toBottomOf="@id/view_group_detail_top_bar" />

<!--TODO:listitem 추가-->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rcv_group_detail_filter_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintTop_toBottomOf="@id/view_group_detail_line" />

<TextView
android:id="@+id/tv_group_detail_subject"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:ellipsize="end"
android:maxLines="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/rcv_group_detail_filter_list"
tools:text="모임 이름이에요~" />

<TextView
android:id="@+id/tv_group_detail_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_group_detail_subject"
tools:text="모임 내용입니다." />

<TextView
android:id="@+id/tv_group_detail_user_list_subject"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:paddingTop="10dp"
android:text="@string/group_user_list_subject"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_group_detail_content" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rcv_group_detail_user_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintTop_toBottomOf="@id/tv_group_detail_user_list_subject"
tools:listitem="@layout/item_detail_profile" />

<TextView
android:id="@+id/tv_group_list_dog_list_subject"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="@string/group_dog_list_subject"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/rcv_group_detail_user_list" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rcv_group_detail_dog_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintTop_toBottomOf="@id/tv_group_list_dog_list_subject"
tools:listitem="@layout/item_detail_profile" />

<Button
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="30dp"
android:layout_marginBottom="24dp"
android:background="@drawable/rect_white_fill_radius10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/rcv_group_detail_dog_list"
tools:text="참여하기" />
</androidx.constraintlayout.widget.ConstraintLayout>

</ScrollView>
</layout>
13 changes: 13 additions & 0 deletions android/app/src/main/res/layout/item_detail_profile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">

<data>

</data>

<ImageView
android:layout_marginEnd="10dp"
android:background="@drawable/rect_white_fill_radius8"
android:layout_width="80dp"
android:layout_height="80dp"/>
</layout>
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@
<!--이미지 크롭-->
<string name="image_cropper_done">확인</string>

<!--멍개-->
<string name="group_user_list_subject">참여 견주</string>
<string name="group_dog_list_subject">댕댕이들</string>

</resources>
Loading