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-188 feat: 상세 기록 페이지 제작 #56

Merged
merged 10 commits into from
Dec 9, 2022
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ plugins {
}

android {
compileSdk 32
compileSdk 33

defaultConfig {
applicationId "com.depromeet.threedays"
minSdk 26
targetSdk 32
targetSdk 33
versionCode 2
versionName "1.0"

Expand Down Expand Up @@ -45,6 +45,7 @@ dependencies {
implementation(project(":navigator"))
implementation(project(":presentation:home"))
implementation(project(":presentation:create"))
implementation(project(":presentation:history"))

implementation(jetpackDeps)
implementation(coroutines)
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
<activity
android:name="com.depromeet.threedays.create.update.HabitUpdateActivity"
android:exported="false"/>

<activity
android:name="com.depromeet.threedays.history.detail.DetailHistoryActivity"
android:exported="false"/>

</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?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_200" />
<corners android:radius="5dp" />
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?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_10" />
<corners android:radius="5dp" />
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?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_50" />
<corners android:radius="5dp" />
</shape>
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="25dp"
android:height="24dp"
android:viewportWidth="25"
android:viewportHeight="24">
<path
android:pathData="M12.5,12m-11,0a11,11 0,1 1,22 0a11,11 0,1 1,-22 0"
android:fillColor="#353C49"/>
<path
android:pathData="M11.594,15.365C11.4,15.365 11.206,15.3 11.076,15.106L8.1,12.129C7.777,11.806 7.777,11.353 8.1,11.029C8.424,10.706 8.877,10.706 9.2,11.029L11.594,13.423L15.865,9.153C16.188,8.829 16.641,8.829 16.965,9.153C17.288,9.476 17.288,9.929 16.965,10.253L12.177,15.041C11.982,15.3 11.788,15.365 11.594,15.365V15.365Z"
android:fillColor="#ffffff"/>
</vector>
9 changes: 9 additions & 0 deletions core-design-system/src/main/res/drawable/ic_clap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M21.088,8.232C20.479,8.006 19.78,8.194 19.369,8.69C18.974,9.166 18.745,9.834 18.477,10.389C18.139,11.092 17.81,11.799 17.498,12.513C17.357,12.834 16.886,12.815 16.778,12.482C16.664,12.132 16.602,11.693 16.672,11.165L17.698,4.512C17.808,3.679 17.211,2.907 16.369,2.797C15.528,2.688 14.749,3.279 14.638,4.113L13.68,10.256C13.665,10.374 13.557,10.458 13.437,10.445H13.429C13.317,10.432 13.232,10.338 13.232,10.226V2.528C13.232,1.688 12.538,1 11.689,1C10.84,1 10.146,1.687 10.146,2.528V10.218C10.146,10.323 10.068,10.413 9.963,10.428C9.845,10.446 9.735,10.364 9.719,10.246L8.762,4.113C8.652,3.279 7.872,2.688 7.031,2.797C6.189,2.907 5.592,3.679 5.703,4.512L6.762,11.418C6.77,11.477 6.745,11.535 6.697,11.571C6.609,11.637 6.482,11.602 6.441,11.499L4.98,7.792C4.671,7.009 3.772,6.619 2.981,6.925C2.191,7.23 1.796,8.121 2.105,8.904C2.105,8.904 2.782,10.621 2.783,10.624C3.803,13.218 4.206,16.047 5.568,18.509C6.883,20.885 9.351,22.005 12.139,22C16.09,21.992 19.185,19.115 20.032,15.487C20.032,15.487 20.927,12.65 21.046,12.345C21.262,11.798 21.191,11.889 21.442,11.358C21.922,10.347 22.559,8.783 21.085,8.233L21.088,8.232Z"
android:fillColor="#353C49"/>
</vector>
17 changes: 11 additions & 6 deletions core-design-system/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@

<color name="main">#1A1E27</color>

<color name="green_sub_color">#34C185</color>
<color name="light_green_sub_color">#DFF5EC</color>
<color name="blue_sub_color">#3F80FF</color>
<color name="light_blue_sub_color">#E3ECFF</color>
<color name="pink_sub_color">#FF70D7</color>
<color name="light_pink_sub_color">#FFE0F6</color>
<!-- sub color -->
<color name="green_50">#34C185</color>
<color name="green_10">#DFF5EC</color>
<color name="blue_50">#3F80FF</color>
<color name="blue_10">#E3ECFF</color>
<color name="pink_50">#FF70D7</color>
<color name="pink_10">#FFE0F6</color>

<!-- gray -->
<color name="white">#FFFFFF</color>
<color name="gray_background">#F6F7F9</color>
<color name="gray_100">#F4F6F8</color>
Expand All @@ -29,6 +31,9 @@
<color name="gray_800">#1A1E27</color>
<color name="black">#121213</color>

<!-- system color -->
<color name="green_system_color">#09BC7B</color>
<color name="red_system_color">#FF4D4D</color>

<color name="transparency_color">#FF000000</color>
</resources>
26 changes: 24 additions & 2 deletions core-design-system/src/main/res/values/typography.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<item name="android:includeFontPadding">false</item>
</style>

<!-- H1 -->
<style name="Typography.H1">
<!-- Heading -->
<style name="Typography.Heading">
<item name="android:textSize" tools:ignore="SpUsage">20dp</item>
<item name="fontFamily">@font/suit_bold</item>
</style>
Expand All @@ -19,6 +19,12 @@
<item name="fontFamily">@font/suit_bold</item>
</style>

<!-- Title2 -->
<style name="Typography.Title2">
<item name="android:textSize" tools:ignore="SpUsage">15dp</item>
<item name="fontFamily">@font/suit_bold</item>
</style>

<!-- Sub Title -->
<style name="Typography.SubTitle">
<item name="android:textSize" tools:ignore="SpUsage">14dp</item>
Expand Down Expand Up @@ -104,4 +110,20 @@
<item name="android:textSize" tools:ignore="SpUsage">14dp</item>
<item name="fontFamily">@font/suit_bold</item>
</style>

<!-- Calendar -->
<style name="Typography.Calendar">
<item name="fontFamily">@font/suit_semi_bold</item>
</style>
<style name="Typography.Calendar.11dp">
<item name="android:textSize" tools:ignore="SpUsage">11dp</item>
</style>
<style name="Typography.Calendar.10dp">
<item name="android:textSize" tools:ignore="SpUsage">10dp</item>
</style>

<style name="Typography.CalendarDay">
<item name="android:textSize" tools:ignore="SpUsage">10dp</item>
<item name="fontFamily">@font/suit_extra_bold</item>
</style>
</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.depromeet.threedays.core.extensions

import android.content.Context
import android.graphics.drawable.Drawable
import android.util.TypedValue
import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import androidx.core.content.ContextCompat

fun Context.getDrawableCompat(@DrawableRes drawable: Int): Drawable =
requireNotNull(ContextCompat.getDrawable(this, drawable))

fun Context.getColorCompat(@ColorRes color: Int) =
ContextCompat.getColor(this, color)

fun Context.dpToPx(dp: Float): Int = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, resources.displayMetrics).toInt()
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,3 @@ inline fun <reified T : ViewGroup.LayoutParams> View.layoutParams(block: T.() ->
}

fun View.dpToPx(dp: Float): Int = context.dpToPx(dp)

fun Context.dpToPx(dp: Float): Int = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, resources.displayMetrics).toInt()
6 changes: 3 additions & 3 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ext {
"recyclerView" : "1.2.1",
"timber" : "5.0.1",
"coroutines" : "1.6.1",
"calendar" : "1.0.4",
"calendar" : "2.0.1",
"hilt" : "2.42",
"deepLink" : "6.1.0",
"splashscreen" : "1.0.0-rc01",
Expand All @@ -27,7 +27,7 @@ ext {
"chucker" : "3.5.2",
"google" : "20.2.0",
"room" : "2.4.3",
"emoji" : "1.0.0-alpha03"
"emoji" : "1.0.0-alpha03",
]
deps = [
"kotlin" : [
Expand Down Expand Up @@ -93,7 +93,7 @@ ext {
],
"inject" : "javax.inject:javax.inject:1",
"jodaTime" : "joda-time:joda-time:${versions.jodaTime}",
"calendar" : "com.github.kizitonwose:CalendarView:${versions.calendar}",
"calendar" : "com.kizitonwose.calendar:view:${versions.calendar}",
"login" : [
"kakao" : "com.kakao.sdk:v2-user:${versions.kakao}",
"google" : "com.google.android.gms:play-services-auth:${versions.google}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/blue_sub_color" />
<solid android:color="@color/blue_50" />
<corners android:radius="10dp" />
</shape>
</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/green_sub_color" />
<solid android:color="@color/green_50" />
<corners android:radius="10dp" />
</shape>
</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/pink_sub_color" />
<solid android:color="@color/pink_50" />
<corners android:radius="10dp" />
</shape>
</item>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/blue_sub_color" />
<solid android:color="@color/blue_50" />
<corners android:radius="10dp" />
</shape>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/pink_sub_color" />
<solid android:color="@color/pink_50" />
<corners android:radius="10dp" />
</shape>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?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" />
<solid android:color="@color/green_50" />
<corners android:radius="10dp" />
</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
android:layout_marginVertical="24dp"
android:layout_marginStart="20dp"
android:text="@string/suggestion_habit_create"
android:textAppearance="@style/Typography.H1"
android:textAppearance="@style/Typography.Heading"
android:textColor="@color/gray_800"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
android:layout_marginVertical="24dp"
android:layout_marginStart="20dp"
android:text="@string/suggestion_habit_create"
android:textAppearance="@style/Typography.H1"
android:textAppearance="@style/Typography.Heading"
android:textColor="@color/gray_800"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
2 changes: 2 additions & 0 deletions presentation/history/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ dependencies {
implementation deps.hilt.core
kapt deps.hilt.compiler

implementation deps.calendar

testImplementation(testDeps)
androidTestImplementation(androidTestDeps)
}
10 changes: 10 additions & 0 deletions presentation/history/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.depromeet.threedays.history">

<application>
<activity
android:name=".DetailHistoryActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
</application>

</manifest>
Loading