Skip to content

Commit

Permalink
[UI] #116 보관함 레이아웃 구현 (#121)
Browse files Browse the repository at this point in the history
* [REFACTOR] 정책 url 수정

* [REFACTOR] 마이 프로필 UX 수정 및 dimens 적용

* [REFACTOR] 검색바 ripple 제거

* [REFACTOR] 검색화면 UX 개선

* [REFACTOR] ktlint 반영

* [UI] 보관함 레이아웃 구현

* [UI] xml id, iv_chevron_left 추가

* [UI] iv_chevron_left margin 추가

* [UI] 보관함 RecyclerView Item 구현

* [UI] 보관함 Empty 레이아웃 구현

* [REFACTOR] ktlint 적용

* [REFACTOR] 리뷰 반영
  • Loading branch information
jiwon2724 authored Oct 14, 2023
1 parent 8e1f472 commit 8fbb758
Show file tree
Hide file tree
Showing 9 changed files with 232 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/ui/src/main/res/layout/layout_user_review.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout 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"
android:id="@+id/layout_user_review"
android:layout_width="match_parent"
android:layout_height="106dp"
android:background="@drawable/bg_white_outline_radius_10dp">
Expand Down
15 changes: 15 additions & 0 deletions feature/storage/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
plugins {
id("peonlee.android.feature")
}

android {
namespace = "com.peonlee.storage"
viewBinding { enable = true }
}

dependencies {
implementation(project(":core:ui"))
implementation(project(":core:common"))
implementation(project(":core:data"))
implementation(libs.androidx.cardview)
}
8 changes: 8 additions & 0 deletions feature/storage/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<activity
android:name=".StorageActivity">
</activity>
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.peonlee.storage

import com.peonlee.core.ui.base.BaseActivity
import com.peonlee.storage.databinding.ActivityStorageBinding

class StorageActivity : BaseActivity<ActivityStorageBinding>() {
override fun bindingFactory() = ActivityStorageBinding.inflate(layoutInflater)

override fun initViews() {
}
}
89 changes: 89 additions & 0 deletions feature/storage/src/main/res/layout/activity_storage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".StorageActivity">

<TextView
android:id="@+id/tv_storage"
style="@style/Text.Body02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="보관함" />

<ImageView
android:id="@+id/iv_chevron_left"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="18dp"
android:background="@drawable/ic_chevron_left"
app:layout_constraintBottom_toBottomOf="@+id/tv_storage"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_storage" />

<include
android:id="@+id/include_user_review"
layout="@layout/layout_user_review"
android:layout_width="match_parent"
android:layout_height="78dp"
android:layout_marginTop="18dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_storage" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_storage_list"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/include_user_review" />

<LinearLayout
android:id="@+id/layout_storage_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<TextView
style="@style/Text.Subtitle01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/empty_text"
app:layout_constraintVertical_chainStyle="packed" />

<TextView
style="@style/Text.Body03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/space_s_large"
android:gravity="center"
android:lineSpacingExtra="@dimen/space_x_small"
android:text="@string/empty_description"
android:textColor="@color/bg50" />

<TextView
android:id="@+id/tv_move_evaluate"
android:layout_width="154dp"
android:layout_height="46dp"
android:layout_marginTop="24dp"
android:background="@drawable/bg_white_outline_radius_10dp"
android:gravity="center"
android:text="@string/action_evaluate" />
</LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
95 changes: 95 additions & 0 deletions feature/storage/src/main/res/layout/list_item_storage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
android:layout_width="match_parent"
android:layout_height="144dp">

<ImageView
android:id="@+id/iv_storage_product"
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_marginStart="18dp"
android:layout_marginTop="@dimen/space_s_large"
android:background="@drawable/bg_white_outline_radius_10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@drawable/ic_test_product" />

<androidx.cardview.widget.CardView
android:id="@+id/cv_storage_thumbs_bg"
android:layout_width="24dp"
android:layout_height="24dp"
app:cardCornerRadius="8dp"
app:cardElevation="0dp"
app:layout_constraintBottom_toBottomOf="@+id/iv_storage_product"
app:layout_constraintEnd_toEndOf="@+id/iv_storage_product"
app:layout_constraintStart_toStartOf="@+id/iv_storage_product"
app:layout_constraintTop_toBottomOf="@+id/iv_storage_product"
tools:backgroundTint="@color/brand40">

<ImageView
android:id="@+id/iv_storage_thumbs"
android:layout_width="@dimen/space_s_large"
android:layout_height="@dimen/space_s_large"
android:layout_gravity="center"
tools:background="@drawable/ic_thumbs_up"
tools:backgroundTint="@color/brand40" />
</androidx.cardview.widget.CardView>

<ImageView
android:id="@+id/iv_storage_more"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="18dp"
android:background="@drawable/ic_more"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/iv_storage_product" />

<TextView
android:id="@+id/iv_storage_title"
style="@style/Text.Body01"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/space_x_medium"
android:layout_marginEnd="@dimen/space_x_medium"
app:layout_constraintBottom_toTopOf="@+id/iv_storage_price"
app:layout_constraintEnd_toStartOf="@+id/iv_storage_more"
app:layout_constraintStart_toEndOf="@+id/iv_storage_product"
app:layout_constraintTop_toTopOf="@+id/iv_storage_product"
app:layout_constraintVertical_chainStyle="packed"
tools:text="코카)코카제로레몬캔355ml" />

<TextView
android:id="@+id/iv_storage_price"
style="@style/Text.Body06"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/space_small"
android:textColor="@color/bg40"
app:layout_constraintBottom_toBottomOf="@+id/iv_storage_product"
app:layout_constraintStart_toStartOf="@+id/iv_storage_title"
app:layout_constraintTop_toBottomOf="@+id/iv_storage_title"
tools:text="2,000원" />

<TextView
android:id="@+id/tv_storage_review_content"
style="@style/Text.Body03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/space_x_medium"
app:layout_constraintStart_toStartOf="@+id/iv_storage_price"
app:layout_constraintTop_toBottomOf="@+id/iv_storage_price"
tools:text="완전 존맛이에요. 가성비 최고입니다! 완전 존\n맛이에요. 가성비 최고입니다!" />

<TextView
android:id="@+id/tv_storage_latest_time"
style="@style/Text.Body06"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/space_x_small"
android:textColor="@color/bg40"
app:layout_constraintStart_toStartOf="@+id/tv_storage_review_content"
app:layout_constraintTop_toBottomOf="@+id/tv_storage_review_content"
tools:text="10분 전" />
</androidx.constraintlayout.widget.ConstraintLayout>
6 changes: 6 additions & 0 deletions feature/storage/src/main/res/values/string.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="empty_text">아직 리뷰와 평가가 없어요</string>
<string name="empty_description">빠르고 간편하게 편의점 음식을\n평가해 보세요</string>
<string name="action_evaluate">평가하러 가기</string>
</resources>
6 changes: 6 additions & 0 deletions feature/user/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="edit_nickname_icon_size">28dp</dimen>
<dimen name="divider_margin_top">34dp</dimen>
<dimen name="user_space_large">18dp</dimen>
</resources>
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ include(":feature:terms")
include(":feature:settings")
include(":feature:termsdetail")
include(":feature:withdrawal")
include(":feature:storage")

0 comments on commit 8fbb758

Please sign in to comment.