Skip to content

Commit

Permalink
[feat] : #15 친구 기록에 감정리스트 뷰 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
SsongSik committed May 27, 2023
1 parent 21ffecb commit e12e0a0
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 35 deletions.
5 changes: 5 additions & 0 deletions app/src/debug/res/drawable/rect27_white.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF"/>
<corners android:radius="27dp"/>
</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.teampome.pome.R
import com.teampome.pome.databinding.ItemFriendDetailCardBinding
import com.teampome.pome.databinding.ItemFriendsListBinding
import com.teampome.pome.model.response.GetFriendRecord
import com.teampome.pome.model.response.GetFriends

//친구 기록 조회
class FriendRecordGetAdapter(
Expand Down Expand Up @@ -69,6 +67,14 @@ class FriendRecordGetAdapter(
Glide.with(context).load(R.drawable.emoji_mint_28).into(friendDetailCardFirstFriendEmotionAiv)
}
}

friendDetailCardFirstFriendEmotionAiv.setOnClickListener {
if(friendEmojiRegisterCl.visibility == View.VISIBLE) {
friendEmojiRegisterCl.visibility = View.GONE
} else {
friendEmojiRegisterCl.visibility = View.VISIBLE
}
}
}
}

Expand Down
Binary file added app/src/main/res/drawable/emoji_mint_38.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/emoji_mint_38_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/emoji_mint_38_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/emoji_mint_38_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/emoji_mint_38_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/emoji_mint_38_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/emoji_mint_38_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
145 changes: 112 additions & 33 deletions app/src/main/res/layout/item_friend_detail_card.xml
Original file line number Diff line number Diff line change
@@ -1,51 +1,50 @@
<?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"
xmlns:bind="http://schemas.android.com/tools">
xmlns:bind="http://schemas.android.com/tools"
xmlns:tools="http://schemas.android.com/tools">

<data>

<variable
name="getFriendRecord"
type="com.teampome.pome.model.response.GetFriendRecord" />

<import type="com.teampome.pome.util.common.CommonUtil" />

<import type="android.view.View" />
</data>

<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="@color/white"
app:cardPreventCornerOverlap="true"
>
app:cardPreventCornerOverlap="true">

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

<ImageView
android:id="@+id/friend_detail_profile_iv"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginLeft="24dp"
android:layout_marginTop="20dp"
android:src="@drawable/ic_friend_all_on"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginTop="20dp"
android:layout_marginLeft="24dp"
/>
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/friend_detail_name_tv"
android:text="@{getFriendRecord.nickname}"
tools:text="성식"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:text="@{getFriendRecord.nickname}"
android:textColor="@color/grey_7"
app:layout_constraintTop_toTopOf="@id/friend_detail_profile_iv"
app:layout_constraintLeft_toRightOf="@id/friend_detail_profile_iv"
android:layout_marginLeft="8dp"/>
app:layout_constraintTop_toTopOf="@id/friend_detail_profile_iv"
tools:text="성식" />

<TextView
android:id="@+id/friend_detail_content_name_time_tv"
Expand Down Expand Up @@ -74,23 +73,23 @@
android:layout_width="14dp"
android:layout_height="14dp"
android:scaleType="fitXY"
bind:remindFirstEmotionDrawable="@{CommonUtil.INSTANCE.numToEmotion(getFriendRecord.emotionResponse.firstEmotion)}"
tools:src="@drawable/emoji_mint_fiter_sad"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
bind:remindFirstEmotionDrawable="@{CommonUtil.INSTANCE.numToEmotion(getFriendRecord.emotionResponse.firstEmotion)}"
tools:src="@drawable/emoji_mint_fiter_sad" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/friend_detail_content_first_emotion_tv"
style="@style/Pome.Medium.12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
tools:text="후회해요"
android:text="@{CommonUtil.INSTANCE.numToEmotion(getFriendRecord.emotionResponse.firstEmotion).emotion}"
android:textColor="@color/grey_7"
app:layout_constraintBottom_toBottomOf="@id/friend_detail_content_first_emotion_aiv"
app:layout_constraintStart_toEndOf="@id/friend_detail_content_first_emotion_aiv"
app:layout_constraintTop_toTopOf="@id/friend_detail_content_first_emotion_aiv" />
app:layout_constraintTop_toTopOf="@id/friend_detail_content_first_emotion_aiv"
tools:text="후회해요" />
</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.appcompat.widget.AppCompatImageView
Expand Down Expand Up @@ -120,23 +119,23 @@
android:layout_width="14dp"
android:layout_height="14dp"
android:scaleType="fitXY"
bind:remindFirstEmotionDrawable="@{CommonUtil.INSTANCE.numToEmotion(getFriendRecord.emotionResponse.secondEmotion)}"
tools:src="@drawable/emoji_pink_fiter_happy"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
bind:remindFirstEmotionDrawable="@{CommonUtil.INSTANCE.numToEmotion(getFriendRecord.emotionResponse.secondEmotion)}"
tools:src="@drawable/emoji_pink_fiter_happy" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/friend_detail_card_last_emotion_tv"
style="@style/Pome.Medium.12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
tools:text="행복해요"
android:text="@{CommonUtil.INSTANCE.numToEmotion(getFriendRecord.emotionResponse.secondEmotion).emotion}"
android:textColor="@color/grey_7"
app:layout_constraintBottom_toBottomOf="@id/friend_detail_card_last_emotion_aiv"
app:layout_constraintStart_toEndOf="@id/friend_detail_card_last_emotion_aiv"
app:layout_constraintTop_toTopOf="@id/friend_detail_card_last_emotion_aiv" />
app:layout_constraintTop_toTopOf="@id/friend_detail_card_last_emotion_aiv"
tools:text="행복해요" />

</androidx.constraintlayout.widget.ConstraintLayout>

Expand All @@ -146,13 +145,13 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
tools:text="16,000원"
android:layout_marginRight="24dp"
android:text="@{@string/use_price_text(CommonUtil.INSTANCE.makePriceStyle(String.valueOf(getFriendRecord.usePrice)))}"
android:textColor="@color/grey_8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/friend_detail_content_first_emotion_cl"
app:layout_constraintTop_toBottomOf="@id/friend_detail_content_first_emotion_cl"
android:layout_marginRight="24dp"/>
tools:text="16,000원" />

<TextView
android:id="@+id/friend_detail_card_content_tv"
Expand All @@ -167,22 +166,21 @@
android:paddingStart="0dp"
android:paddingEnd="16dp"
android:text="@{getFriendRecord.useComment}"
tools:text="아휴 힘빠져 이젠 진짜 포기다 포기 도대체 뭐가 문제일까 현실을 되돌아볼 필요를 느낀다ㅠ 이정도 노력했으면 된거 아닌가 진짜 개 힘빠지네 그래서 오늘은 물 대신 라떼 한잔을 마셨습니다 ㅋ 라뗴 존맛탱~~ 다들 나흐바 시그니쳐 커피를 마셔주세요 설탕 솔솔 뿌려서 개맛있음"
android:textColor="@color/grey_7"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/friend_detail_card_title_tv"
app:layout_constraintTop_toBottomOf="@id/friend_detail_card_title_tv" />
app:layout_constraintTop_toBottomOf="@id/friend_detail_card_title_tv"
tools:text="아휴 힘빠져 이젠 진짜 포기다 포기 도대체 뭐가 문제일까 현실을 되돌아볼 필요를 느낀다ㅠ 이정도 노력했으면 된거 아닌가 진짜 개 힘빠지네 그래서 오늘은 물 대신 라떼 한잔을 마셨습니다 ㅋ 라뗴 존맛탱~~ 다들 나흐바 시그니쳐 커피를 마셔주세요 설탕 솔솔 뿌려서 개맛있음" />


<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/friend_detail_friends_emotion_container_cl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="20dp"
app:layout_constraintStart_toStartOf="@id/friend_detail_card_content_tv"
app:layout_constraintTop_toBottomOf="@id/friend_detail_card_content_tv"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="20dp">
app:layout_constraintTop_toBottomOf="@id/friend_detail_card_content_tv">

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/friend_detail_card_first_friend_emotion_aiv"
Expand Down Expand Up @@ -224,14 +222,15 @@
android:id="@+id/friend_detail_more_setting_iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="24dp"
android:padding="6dp"
android:src="@drawable/ic_more_24"
app:layout_constraintBottom_toBottomOf="@+id/friend_detail_friends_emotion_container_cl"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginRight="24dp"
app:layout_constraintTop_toTopOf="@+id/friend_detail_friends_emotion_container_cl"/>
app:layout_constraintTop_toTopOf="@+id/friend_detail_friends_emotion_container_cl" />

<View
android:id="@+id/friend_detail_line_v"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="23dp"
Expand All @@ -240,6 +239,86 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/friend_detail_more_setting_iv" />

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/friend_emoji_register_cl"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="-10dp"
android:visibility="gone"
android:background="@drawable/rect27_white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/friend_detail_line_v">

<ImageView
android:id="@+id/friend_emoji"
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_marginVertical="10dp"
android:layout_marginStart="16dp"
android:src="@drawable/emoji_mint_38_7"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/friend_emoji_2"
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_marginVertical="10dp"
android:src="@drawable/emoji_mint_38_2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/friend_emoji_3"
app:layout_constraintStart_toEndOf="@+id/friend_emoji"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/friend_emoji_3"
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_marginVertical="10dp"
android:src="@drawable/emoji_mint_38_3"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/friend_emoji_4"
app:layout_constraintStart_toEndOf="@+id/friend_emoji_2"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/friend_emoji_4"
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_marginVertical="10dp"
android:src="@drawable/emoji_mint_38_4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/friend_emoji_5"
app:layout_constraintStart_toEndOf="@+id/friend_emoji_3"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/friend_emoji_5"
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_marginVertical="10dp"
android:src="@drawable/emoji_mint_38_5"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/friend_emoji_6"
app:layout_constraintStart_toEndOf="@+id/friend_emoji_4"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/friend_emoji_6"
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_marginVertical="10dp"
android:layout_marginEnd="16dp"
android:src="@drawable/emoji_mint_38_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</layout>

0 comments on commit e12e0a0

Please sign in to comment.