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

#6 [ui] happy empty view xml #9

Merged
merged 12 commits into from
Jan 9, 2024
Merged
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/rect_gray_gray_stroke_radius_20.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="1dp"
android:color="@color/gray000" />
<solid android:color="@color/white" />
<corners android:radius="20dp" />
</shape>
64 changes: 64 additions & 0 deletions app/src/main/res/drawable/svg_face_red.xml

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions app/src/main/res/drawable/svg_happy_add.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="98dp"
android:height="90dp"
android:viewportWidth="98"
android:viewportHeight="90">
<path
android:pathData="M86.842,19.763L87.164,19.208C90.706,13.106 88.585,5.231 82.451,1.706C76.834,-1.521 69.724,-0.02 65.847,4.941C60.595,3.027 54.92,1.983 49.002,1.983C43.085,1.983 37.348,3.04 32.07,4.973C28.196,-0.012 21.068,-1.528 15.439,1.706C9.305,5.231 7.183,13.106 10.726,19.208L11.095,19.843C4.16,28.253 0,39.008 0,50.73C0,77.651 21.939,90 49,90C76.061,90 98,77.654 98,50.73C98,38.971 93.812,28.183 86.842,19.763Z"
android:fillColor="#EFEFEF"/>
<group>
<clip-path
android:pathData="M49,21l24.301,24.301l-24.301,24.301l-24.301,-24.301z"/>
<path
android:strokeWidth="1"
android:pathData="M33.22,47.557L46.752,47.557L46.752,61.093H46.752L46.752,61.102C46.762,61.693 47.004,62.256 47.426,62.671C47.847,63.085 48.415,63.317 49.006,63.317C49.597,63.317 50.165,63.085 50.586,62.671C51.008,62.256 51.25,61.693 51.26,61.102L51.26,61.102L51.26,61.093V47.557L64.796,47.557V47.557L64.805,47.557C65.396,47.547 65.959,47.305 66.374,46.883C66.788,46.461 67.02,45.894 67.02,45.303C67.02,44.712 66.788,44.144 66.374,43.723C65.959,43.301 65.396,43.059 64.805,43.049L64.805,43.049L64.796,43.049L51.26,43.049L51.26,29.513L51.26,29.504L51.26,29.497C51.241,28.911 50.995,28.356 50.575,27.949C50.154,27.542 49.591,27.314 49.006,27.314C48.42,27.315 47.858,27.543 47.438,27.95C47.017,28.358 46.772,28.913 46.753,29.498L46.753,29.506L46.753,29.514L46.752,43.049L33.22,43.049C32.922,43.044 32.626,43.098 32.35,43.209L32.535,43.673L32.35,43.209C32.072,43.32 31.819,43.485 31.605,43.695C31.392,43.905 31.222,44.155 31.106,44.431C30.99,44.707 30.931,45.003 30.931,45.303C30.931,45.602 30.99,45.898 31.106,46.175C31.222,46.451 31.392,46.701 31.605,46.911C31.819,47.121 32.072,47.286 32.35,47.397C32.626,47.507 32.922,47.562 33.22,47.557Z"
android:fillColor="#ffffff"
android:strokeColor="#ffffff"/>
</group>
</vector>
18 changes: 18 additions & 0 deletions app/src/main/res/drawable/svg_speech_long.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="249dp"
android:height="60dp"
android:viewportWidth="249"
android:viewportHeight="60">
<path
android:pathData="M8.77,36.64L0.5,31.87C-0.17,31.48 -0.17,30.52 0.5,30.13L8.36,25.6C10.49,11.12 22.96,0 38.04,0H218.04C234.6,0 248.04,13.43 248.04,30C248.04,46.57 234.6,60 218.04,60H38.04C23.75,60 11.8,50.02 8.77,36.64Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<group>
<clip-path
android:pathData="M8.77,36.64L0.5,31.87C-0.17,31.48 -0.17,30.52 0.5,30.13L8.36,25.6C10.49,11.12 22.96,0 38.04,0H218.04C234.6,0 248.04,13.43 248.04,30C248.04,46.57 234.6,60 218.04,60H38.04C23.75,60 11.8,50.02 8.77,36.64Z"
android:fillType="evenOdd"/>
<path
android:pathData="M8.77,36.64L9.75,36.42L9.65,36L9.27,35.78L8.77,36.64ZM0.5,31.87L1,31H1L0.5,31.87ZM0.5,30.13L1,31H1L0.5,30.13ZM8.36,25.6L8.86,26.46L9.28,26.22L9.35,25.74L8.36,25.6ZM9.27,35.78L1,31L-0,32.73L8.27,37.51L9.27,35.78ZM1,31L1,31L-0,29.27C-1.33,30.04 -1.33,31.96 -0,32.73L1,31ZM1,31L8.86,26.46L7.86,24.73L-0,29.27L1,31ZM9.35,25.74C11.4,11.74 23.47,1 38.04,1V-1C22.46,-1 9.57,10.49 7.37,25.45L9.35,25.74ZM38.04,1H218.04V-1H38.04V1ZM218.04,1C234.05,1 247.04,13.98 247.04,30H249.04C249.04,12.88 235.16,-1 218.04,-1V1ZM247.04,30C247.04,46.02 234.05,59 218.04,59V61C235.16,61 249.04,47.12 249.04,30H247.04ZM218.04,59H38.04V61H218.04V59ZM38.04,59C24.23,59 12.67,49.35 9.75,36.42L7.8,36.86C10.92,50.68 23.27,61 38.04,61V59Z"
android:fillColor="#4A4A4A"/>
</group>
</vector>
98 changes: 98 additions & 0 deletions app/src/main/res/layout/fragment_happy_empty.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data binding μ“Έ κ±°λ‹ˆκΉŒ layout으둜 바꿔도 쒋을 것 κ°™μ•„μš”!


<TextView
android:id="@+id/tv_happy_title"
style="@style/head3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="43dp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μœ„μ— μƒνƒœλ°”μ˜ 크기λ₯Ό λΉΌμ„œ 43dpκ°€ μ•„λ‹ˆλΌ 16dp κ°™μ•„μš”! ν™•μΈν•΄μ£Όμ„Έμš”!

android:text="@string/happy_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/iv_happy_character"
android:layout_width="50dp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ν”Όκ·Έλ§ˆ λ³΄λ‹ˆκΉŒ λ„ˆλΉ„λŠ” 53dp 같은데 ν™•μΈν•΄μ£Όμ„Έμš”!

android:layout_height="50dp"
android:layout_marginStart="22dp"
android:layout_marginTop="28dp"
android:src="@drawable/svg_face_red"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_happy_title" />

<ImageView
android:id="@+id/iv_happy_default_mention"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:src="@drawable/svg_speech_long"
app:layout_constraintBottom_toBottomOf="@id/iv_happy_character"
app:layout_constraintStart_toEndOf="@id/iv_happy_character"
app:layout_constraintTop_toTopOf="@id/iv_happy_character" />

<TextView
android:id="@+id/tv_happy_default_mention"
style="@style/bubble14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/happy_default_mention"
app:layout_constraintBottom_toBottomOf="@+id/iv_happy_default_mention"
app:layout_constraintEnd_toEndOf="@+id/iv_happy_default_mention"
app:layout_constraintStart_toStartOf="@+id/iv_happy_default_mention"
app:layout_constraintTop_toTopOf="@+id/iv_happy_default_mention" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μš”λŸ°κ±° + μ§€μ›Œμ €λ„ 쒋을듯?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ°˜μ˜ν•˜κ² μŠ΅λ‹ˆλ‹€~


<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/rl_happy_empty_card"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μš”κ±°λŠ” μ™œ rlμΌκΉŒμš”?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이전에 묢은 λ‹€λ₯Έ λ ˆμ΄μ•„μ›ƒ 이름을 λͺ»λ°”κΏ¨λ„€μš”! μˆ˜μ •ν•˜κ² μŠ΅λ‹ˆλ‹€

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="40dp"
android:layout_marginTop="53dp"
android:layout_marginEnd="40dp"
android:layout_marginBottom="200dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_happy_default_mention">

<ImageView
android:id="@+id/iv_happy_empty_card"
android:layout_width="280dp"
android:layout_height="398dp"
android:src="@drawable/rect_gray_gray_stroke_radius_20"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_happy_empty_card"
style="@style/body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="82dp"
android:gravity="center"
android:text="@string/happy_empty_card"
android:textColor="@color/gray300"
app:layout_constraintEnd_toEndOf="@+id/iv_happy_empty_card"
app:layout_constraintStart_toStartOf="@+id/iv_happy_empty_card"
app:layout_constraintTop_toTopOf="@+id/iv_happy_empty_card"
app:layout_constraintBottom_toTopOf="@+id/iv_happy_empty_card_bear" />

<ImageView
android:id="@+id/iv_happy_empty_card_bear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="62dp"
android:src="@drawable/svg_happy_add"
app:layout_constraintEnd_toEndOf="@+id/iv_happy_empty_card"
app:layout_constraintStart_toStartOf="@+id/iv_happy_empty_card"
app:layout_constraintTop_toBottomOf="@+id/tv_happy_empty_card" />

</androidx.constraintlayout.widget.ConstraintLayout>


</androidx.constraintlayout.widget.ConstraintLayout>
7 changes: 6 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<resources>
<string name="app_name">Softie</string>
</resources>

<!-- happy -->
<string name="happy_title">행볡루틴</string>
<string name="happy_default_mention">행볡 루틴은 맀일 μ‘°κΈˆμ”© λ„ˆμ— λŒ€ν•΄\nμ•Œμ•„κ°ˆ 수 μžˆλŠ” νŠΉλ³„ν•œ μ΄λ²€νŠΈν˜• 루틴이야!</string>
<string name="happy_empty_card">진행 쀑인 행볡루틴이 μ—†μ–΄μš”.\n루틴을 μΆ”κ°€ν• κΉŒμš”?</string>
</resources>