Skip to content

Commit

Permalink
#176 [ui] 루틴 추가 리스트 뷰 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
pump9918 committed Jun 21, 2024
1 parent 66ac027 commit 70c458b
Show file tree
Hide file tree
Showing 6 changed files with 229 additions and 0 deletions.
24 changes: 24 additions & 0 deletions app/src/main/res/drawable/ic_maker_chip.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="50dp"
android:height="20dp"
android:viewportWidth="50"
android:viewportHeight="20">
<path
android:pathData="M10,0L40,0A10,10 0,0 1,50 10L50,10A10,10 0,0 1,40 20L10,20A10,10 0,0 1,0 10L0,10A10,10 0,0 1,10 0z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="3"
android:startY="11"
android:endX="47.694"
android:endY="7.3"
android:type="linear">
<item android:offset="0" android:color="#FFAE9CFF"/>
<item android:offset="1" android:color="#FFE09EFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M8.718,6.928H10.027L12.271,12.408H12.354L14.595,6.928H15.904V14H14.878V8.896H14.813L12.734,13.99H11.885L9.806,8.886H9.747V14H8.718V6.928ZM17.946,14H16.806L19.347,6.928H20.594L23.135,14H21.993L21.347,12.132H18.591L17.946,14ZM18.902,11.231H21.036L19.997,8.22H19.941L18.902,11.231ZM24.031,14V6.928H25.105V10.302H25.198L28.154,6.928H29.504L26.655,10.112L29.514,14H28.216L25.944,10.844L25.105,11.807V14H24.031ZM30.388,14V6.928H34.829V7.854H31.462V9.998H34.597V10.92H31.462V13.075H34.867V14H30.388ZM36.13,14V6.928H38.658C40.298,6.928 41.106,7.843 41.106,9.145C41.106,10.095 40.678,10.82 39.815,11.144L41.375,14H40.153L38.717,11.331H38.654H37.204V14H36.13ZM37.204,10.405H38.548C39.59,10.405 40.025,9.943 40.025,9.145C40.025,8.347 39.59,7.85 38.544,7.85H37.204V10.405Z"
android:fillColor="#ffffff"/>
</vector>
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/ic_maker_help.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="38dp"
android:height="38dp"
android:viewportWidth="38"
android:viewportHeight="38">
<path
android:pathData="M13,9L25,9A4,4 0,0 1,29 13L29,25A4,4 0,0 1,25 29L13,29A4,4 0,0 1,9 25L9,13A4,4 0,0 1,13 9z"
android:fillColor="#E9EBED"/>
<path
android:pathData="M18.263,20.9C18.266,20.49 18.307,20.158 18.385,19.904C18.466,19.647 18.579,19.442 18.722,19.289C18.865,19.133 19.057,18.98 19.298,18.83C19.78,18.537 20.021,18.163 20.021,17.707C20.021,17.508 19.973,17.334 19.879,17.185C19.788,17.032 19.661,16.914 19.498,16.833C19.338,16.752 19.161,16.711 18.966,16.711C18.784,16.711 18.613,16.75 18.453,16.828C18.294,16.903 18.162,17.019 18.058,17.175C17.954,17.331 17.895,17.525 17.882,17.756H16.827C16.84,17.352 16.941,17.006 17.13,16.716C17.322,16.426 17.577,16.206 17.896,16.057C18.215,15.907 18.572,15.832 18.966,15.832C19.382,15.832 19.75,15.912 20.069,16.071C20.392,16.228 20.641,16.447 20.816,16.73C20.995,17.014 21.085,17.339 21.085,17.707C21.085,18.085 21,18.412 20.831,18.688C20.662,18.962 20.414,19.198 20.089,19.396C19.887,19.52 19.728,19.647 19.61,19.777C19.493,19.904 19.405,20.057 19.347,20.236C19.291,20.415 19.262,20.637 19.259,20.9V20.959H18.263V20.9ZM18.106,22.385C18.106,22.258 18.137,22.141 18.199,22.033C18.261,21.926 18.344,21.841 18.448,21.779C18.556,21.714 18.673,21.682 18.8,21.682C18.924,21.682 19.037,21.713 19.142,21.774C19.249,21.836 19.334,21.921 19.396,22.028C19.461,22.136 19.493,22.251 19.493,22.375C19.493,22.499 19.461,22.614 19.396,22.722C19.334,22.826 19.249,22.91 19.142,22.976C19.037,23.037 18.924,23.068 18.8,23.068C18.676,23.068 18.56,23.037 18.453,22.976C18.349,22.914 18.264,22.831 18.199,22.727C18.137,22.622 18.106,22.508 18.106,22.385Z"
android:fillColor="#73787E"/>
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<corners android:radius="10dp" />
<solid android:color="@color/gray0" />
<stroke
android:width="1dp"
android:color="@color/gray200" />

</shape>
107 changes: 107 additions & 0 deletions app/src/main/res/layout/activity_add_list.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?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">

<data>

</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_add_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background"
android:fitsSystemWindows="true">

<ImageView
android:id="@+id/iv_add_list_back_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:padding="7dp"
android:src="@drawable/ic_back_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_add_list_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="@string/add_list_title"
android:textAppearance="@style/body1"
app:layout_constraintBottom_toBottomOf="@id/iv_add_list_back_arrow"
app:layout_constraintStart_toEndOf="@id/iv_add_list_back_arrow"
app:layout_constraintTop_toTopOf="@id/iv_add_list_back_arrow" />

<TextView
android:id="@+id/tv_add_list_maker_recommend"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="29dp"
android:text="@string/add_list_maker_recommend"
android:textAppearance="@style/body1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_add_list_title" />

<ImageView
android:id="@+id/iv_add_list_maker_chip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:src="@drawable/ic_maker_chip"
app:layout_constraintBottom_toBottomOf="@id/tv_add_list_maker_recommend"
app:layout_constraintStart_toEndOf="@id/tv_add_list_maker_recommend"
app:layout_constraintTop_toTopOf="@id/tv_add_list_maker_recommend" />

<ImageView
android:id="@+id/iv_add_list_maker_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:padding="9dp"
android:src="@drawable/ic_maker_help"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="@id/iv_add_list_maker_chip"
app:layout_constraintTop_toTopOf="@id/iv_add_list_maker_chip" />

<androidx.viewpager2.widget.ViewPager2
android:id="@+id/vp_add_list_maker_card"
android:layout_width="match_parent"
android:layout_height="196dp"
android:layout_marginTop="15dp"
android:clipToPadding="false"
app:layout_constraintBottom_toTopOf="@id/tv_add_list_theme_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_add_list_maker_recommend" />

<TextView
android:id="@+id/tv_add_list_theme_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="@string/add_list_theme_title"
android:textAppearance="@style/body1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/rv_happy_add_list"
app:layout_constraintTop_toBottomOf="@id/vp_add_list_maker_card" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_happy_add_list"
android:layout_width="0dp"
android:layout_height="0dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_add_list_theme_title"
tools:listitem="@layout/item_add_list" />

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
66 changes: 66 additions & 0 deletions app/src/main/res/layout/item_add_list.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?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">

<data>

</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/chip_add_list_component"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_marginHorizontal="20dp"
android:background="@drawable/shape_gray0_fill_gray200_stroke_10_rect">

<ImageView
android:id="@+id/iv_add_list_item_icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:src="@drawable/ic_bear_base"
app:layout_constraintBottom_toBottomOf="@id/chip_add_list_component"
app:layout_constraintStart_toStartOf="@id/chip_add_list_component"
app:layout_constraintTop_toTopOf="@id/chip_add_list_component" />

<TextView
android:id="@+id/tv_add_list_item_content"
style="@style/caption2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="20dp"
android:text="@string/chip_add_list_item_content"
android:textColor="@color/gray500"
app:layout_constraintBottom_toTopOf="@id/tv_add_list_item_title"
app:layout_constraintStart_toEndOf="@id/iv_add_list_item_icon"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_add_list_item_title"
style="@style/head3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginBottom="20dp"
android:text="@string/chip_add_list_item_title"
android:textColor="@color/gray700"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_add_list_item_icon"
app:layout_constraintTop_toBottomOf="@id/tv_add_list_item_content" />

<ImageView
android:id="@+id/iv_add_list_item_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:src="@drawable/ic_next"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

9 changes: 9 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@
<string name="story_telling_main">어? 집 앞에 이건 뭐지?</string>
<string name="story_telling_conclusion">한 번 열어볼까?</string>


<!-- add list -->
<string name="add_list_title">루틴 추가</string>
<string name="add_list_maker_recommend">이런 루틴은 어때요?</string>
<string name="add_list_theme_title">전체 루틴 테마</string>
<string name="chip_add_list_item_content">사람들과 어울리는</string>
<string name="chip_add_list_item_title">관계 쌓기</string>


<!-- happy routine -->
<string name="happy_title">행복 루틴</string>
<string name="happy_default_mention">행복 루틴은 행복한 나를 매일\n조금씩 만들어 가는 특별한 루틴이야</string>
Expand Down

0 comments on commit 70c458b

Please sign in to comment.