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

DEP-148 ui: 나의 기록 ui 구현 #43

Merged
merged 4 commits into from
Nov 16, 2022
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,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<solid android:color="@color/gray_700" />
<corners android:radius="10dp" />

</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<solid android:color="@color/green_sub_color" />
<corners android:radius="10dp" />

</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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>
237 changes: 233 additions & 4 deletions presentation/history/src/main/res/layout/fragment_history.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,249 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">

<data>

</data>

<FrameLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".HistoryFragment">

<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_begin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="20dp" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_end="20dp" />

<ImageView
android:id="@+id/iv_prev_month"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="20dp"
android:src="@drawable/ic_left_arrow_default"
app:layout_constraintTop_toTopOf="@+id/tv_this_month"
app:layout_constraintBottom_toBottomOf="@+id/tv_this_month"
app:layout_constraintEnd_toStartOf="@+id/tv_this_month"/>

<TextView
android:id="@+id/tv_this_month"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:textAppearance="@style/Typography.H2"
android:textSize="20dp"
android:text="10월 기록"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>

<ImageView
android:id="@+id/iv_next_month"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="20dp"
android:src="@drawable/ic_right_arrow_disable"
app:layout_constraintTop_toTopOf="@+id/tv_this_month"
app:layout_constraintBottom_toBottomOf="@+id/tv_this_month"
app:layout_constraintStart_toEndOf="@+id/tv_this_month"/>

<ImageView
android:id="@+id/iv_tooltip"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_tooltip"
app:layout_constraintTop_toTopOf="@+id/iv_next_month"
app:layout_constraintBottom_toBottomOf="@+id/iv_next_month"
app:layout_constraintEnd_toEndOf="@id/gl_end"/>

<Space
android:id="@+id/space_bottom_of_toolbar"
android:layout_width="match_parent"
android:layout_height="35dp"
app:layout_constraintTop_toBottomOf="@+id/tv_this_month"/>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_this_month_clap"
android:layout_width="0dp"
android:layout_height="100dp"
android:background="@drawable/bg_rect_gray700_r10"
app:layout_constraintEnd_toStartOf="@id/gl_middle"
app:layout_constraintStart_toStartOf="@id/gl_begin"
app:layout_constraintTop_toBottomOf="@+id/space_bottom_of_toolbar">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:fontFamily="@font/suit_medium"
android:text="10월 박수"
android:textAppearance="@style/Typography.Body3.13dp"
android:textColor="@color/gray_300"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_clap_emoji"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="👏🏻"
android:textAppearance="@style/Typography.Title2.Bold"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="@+id/tv_this_month_clap"
app:layout_constraintEnd_toStartOf="@+id/tv_this_month_clap"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent" />

<TextView
android:id="@+id/tv_this_month_clap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:layout_marginStart="8dp"
android:text="4"
android:textAppearance="@style/Typography.Title2.Bold"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/tv_clap_emoji" />
</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_this_month_achieve_days"
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_marginTop="12dp"
android:background="@drawable/bg_rect_gray700_r10"
app:layout_constraintStart_toStartOf="@id/gl_begin"
app:layout_constraintEnd_toStartOf="@id/gl_middle"
app:layout_constraintTop_toBottomOf="@+id/cl_this_month_clap">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:fontFamily="@font/suit_medium"
android:text="10월 습관 실천일"
android:textAppearance="@style/Typography.Body3.13dp"
android:textColor="@color/gray_300"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_watch_emoji"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="🕖"
android:textAppearance="@style/Typography.Title2.Bold"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="@+id/tv_this_month_achieve_days"
app:layout_constraintEnd_toStartOf="@+id/tv_this_month_achieve_days"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent" />

<TextView
android:id="@+id/tv_this_month_achieve_days"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:layout_marginStart="8dp"
android:text="26"
android:textAppearance="@style/Typography.Title2.Bold"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/tv_watch_emoji" />
</androidx.constraintlayout.widget.ConstraintLayout>

<Space
android:id="@+id/gl_middle"
android:layout_width="12dp"
android:layout_height="match_parent"
android:text="history fragment" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="212dp"
android:background="@drawable/bg_rect_green_sub_color_r10"
app:layout_constraintEnd_toEndOf="@id/gl_end"
app:layout_constraintStart_toEndOf="@+id/gl_middle"
app:layout_constraintTop_toTopOf="@+id/cl_this_month_clap">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="17dp"
android:fontFamily="@font/suit_medium"
android:gravity="center"
android:text="이번달,\n가장 많이 달성한 습관"
android:textAppearance="@style/Typography.Body3.12dp"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="💊"
android:textAppearance="@style/Typography.Title3.Medium"
android:textSize="48dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:fontFamily="@font/suit_extra_bold"
android:gravity="center"
android:text="점심먹은 직후\n종합 비타민 호다닥"
android:textAppearance="@style/Typography.Body2"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

<TextView
android:id="@+id/tv_in_progress_object"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="36dp"
android:fontFamily="@font/suit_semi_bold"
android:text="진행중인 습관"
android:textAppearance="@style/Typography.Body2"
android:textColor="@color/gray_500"
app:layout_constraintStart_toStartOf="@id/gl_begin"
app:layout_constraintTop_toBottomOf="@+id/cl_this_month_achieve_days" />

</FrameLayout>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="12dp"
app:layout_constraintStart_toStartOf="@id/gl_begin"
app:layout_constraintEnd_toEndOf="@id/gl_end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_in_progress_object" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
42 changes: 42 additions & 0 deletions presentation/history/src/main/res/layout/item_objective.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingHorizontal="20dp"
android:paddingVertical="16dp"
android:background="@drawable/bg_rect_white_r10">

<TextView
android:id="@+id/tv_object_emoji"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="👏🏻"
android:fontFamily="@font/suit_medium"
android:textAppearance="@style/Typography.Body1"
android:textColor="@color/gray_700"
app:layout_constraintTop_toTopOf="@+id/iv_arrow_in"
app:layout_constraintBottom_toBottomOf="@+id/iv_arrow_in"
app:layout_constraintStart_toStartOf="parent"/>

<TextView
android:id="@+id/tv_object_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="아침 챙겨먹기"
android:fontFamily="@font/suit_medium"
android:textAppearance="@style/Typography.Body1"
android:textColor="@color/gray_700"
app:layout_constraintTop_toTopOf="@+id/iv_arrow_in"
app:layout_constraintBottom_toBottomOf="@+id/iv_arrow_in"
app:layout_constraintStart_toEndOf="@+id/tv_object_emoji"/>

<ImageView
android:id="@+id/iv_arrow_in"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_arrow_in"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
12 changes: 6 additions & 6 deletions presentation/home/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@
app:layout_constraintTop_toBottomOf="@id/tv_date">

<ImageView
android:id="@+id/imageView3"
android:id="@+id/iv_add_object"
android:layout_width="24dp"
android:layout_height="24dp"
app:layout_constraintBottom_toBottomOf="@+id/textView3"
app:layout_constraintEnd_toStartOf="@+id/textView3"
app:layout_constraintBottom_toBottomOf="@+id/tv_add_object"
app:layout_constraintEnd_toStartOf="@+id/tv_add_object"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView3"
app:layout_constraintTop_toTopOf="@+id/tv_add_object"
app:srcCompat="@drawable/ic_add_default" />

<TextView
android:id="@+id/textView3"
android:id="@+id/tv_add_object"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
Expand All @@ -82,7 +82,7 @@
app:layout_constraintBottom_toBottomOf="@+id/cl_no_goal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/imageView3" />
app:layout_constraintStart_toEndOf="@+id/iv_add_object" />
</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.recyclerview.widget.RecyclerView
Expand Down
Loading