Skip to content

Commit

Permalink
[MERGE] KKUMI-96 #73: 홈 화면 UI 디자인 적용
Browse files Browse the repository at this point in the history
[UI/FEAT] KKUMI-96 #73: 홈 화면 UI 디자인 적용
  • Loading branch information
jung0115 authored Aug 16, 2024
2 parents 84e2156 + 730494c commit 534b3df
Show file tree
Hide file tree
Showing 87 changed files with 1,200 additions and 528 deletions.
11 changes: 10 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,22 @@
android:theme="@style/Theme.MyKkumi_AOS"
tools:targetApi="31">

<!-- Splash -->
<activity
android:name=".MainActivity"
android:name=".SplashActivity"
android:theme="@style/SplashTheme"
android:exported="true">

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

</activity>

<activity
android:name=".MainActivity"
android:exported="true">
<nav-graph android:value="@navigation/nav_graph"/>
</activity>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ class MainActivity : AppCompatActivity() {
else { // 로그인 안 됨
startActivity(intent)
}
true

if(viewModel.currentMenu.value != null) binding.bottomNav.selectedItemId = viewModel.currentMenu.value!!
false
}
else -> {
viewModel.selectMenu(item.itemId)
NavigationUI.onNavDestinationSelected(item, navController)
true
}
Expand Down
13 changes: 13 additions & 0 deletions app/src/main/java/com/swmarastro/mykkumi/android/MainViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,28 @@ import android.content.Intent
import android.net.Uri
import androidx.core.net.toUri
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import androidx.navigation.NavController
import com.swmarastro.mykkumi.domain.datastore.AuthTokenDataStore
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
import javax.inject.Inject

@HiltViewModel
class MainViewModel @Inject constructor(
private val authTokenDataStore: AuthTokenDataStore,
) : ViewModel() {
private val _currentMenu = MutableStateFlow<Int?>(null)
val currentMenu: StateFlow<Int?> get() = _currentMenu

fun selectMenu(selectMenu: Int) {
viewModelScope.launch {
_currentMenu.emit(selectMenu)
}
}

// 로그인 페이지 이동
fun navigateLogin() : Intent? {
if(authTokenDataStore.isLogin()) return null
Expand Down
25 changes: 25 additions & 0 deletions app/src/main/java/com/swmarastro/mykkumi/android/SplashActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.swmarastro.mykkumi.android

import android.content.Intent
import android.os.Bundle
import android.os.PersistableBundle
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch

@AndroidEntryPoint
class SplashActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

lifecycleScope.launch {
delay(300)
val intent = Intent(this@SplashActivity, MainActivity::class.java)
startActivity(intent)
finish()
}
}
}
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/background_splash.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">

<item android:drawable="@color/background_navy"/>
<item
android:drawable="@drawable/img_splash"
android:gravity="center"/>

</layer-list>
75 changes: 75 additions & 0 deletions app/src/main/res/drawable/img_splash.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="160dp"
android:height="194dp"
android:viewportWidth="160"
android:viewportHeight="194">
<path
android:pathData="M24.34,179.46C24.26,181.04 24.14,182.36 23.98,183.94C23.81,185.74 22.8,187.16 20.81,187.16C18.77,187.16 17.78,185.74 17.62,183.94C17.14,179.38 17.14,174.37 17.62,169.83C17.78,168.06 18.77,166.64 20.81,166.64C21.96,166.64 22.78,167.1 23.3,167.82C24.7,169.81 26.06,172.78 27.19,175.28C27.36,175.59 27.6,175.59 27.77,175.28C28.9,172.78 30.24,169.81 31.66,167.82C32.16,167.1 33,166.64 34.15,166.64C36.19,166.64 37.15,168.06 37.34,169.83C37.8,174.37 37.8,179.38 37.34,183.94C37.15,185.74 36.19,187.16 34.15,187.16C32.16,187.16 31.15,185.74 30.98,183.94C30.82,182.36 30.7,181.04 30.62,179.46C31.15,178.3 31.54,177.44 31.82,176.36C31.97,175.81 31.39,175.69 31.27,176.14C30.72,177.87 29.81,179.79 28.97,181.33C28.3,182.55 26.66,182.55 25.99,181.33C25.15,179.79 24.24,177.87 23.69,176.14C23.57,175.69 22.99,175.81 23.14,176.36C23.42,177.44 23.81,178.3 24.34,179.46ZM44.83,180.06C41.92,178.21 39.88,173.82 39.33,170.1C38.97,167.5 40.91,166.64 42.93,166.64C45.55,166.64 46.79,167.82 46.99,170.48C47.08,171.87 47.39,174.13 47.97,175.95C48.16,176.55 48.83,176.29 48.71,175.81C48.38,174.42 48.07,171.99 47.95,170.74C47.61,167.46 49.65,166.64 52.55,166.64C55.96,166.64 57.43,168.25 56.83,170.96C55.96,174.87 54.02,178.64 51.81,180.06C51.74,180.94 51.69,183.1 51.59,183.94C51.4,185.74 50.32,187.16 48.33,187.16C46.27,187.16 45.21,185.72 45.02,183.94C44.9,182.6 44.9,181.4 44.83,180.06ZM65.54,180.15C65.51,181.45 65.39,182.7 65.27,183.94C65.1,185.74 64.1,187.16 62.1,187.16C60.06,187.16 59.08,185.74 58.91,183.94C58.43,179.38 58.43,174.37 58.91,169.83C59.08,168.06 60.06,166.64 62.1,166.64C64.1,166.64 65.1,168.06 65.27,169.83C65.42,171.39 65.46,172.78 65.56,174.42C66.23,172.47 67.24,170.58 67.98,169.21C68.97,167.41 70.62,166.21 72.9,167.17C74.82,167.98 75.5,169.52 74.78,171.37C73.79,173.91 71.9,176.62 70.12,178.04C69.81,178.26 70.1,178.74 70.46,178.47C70.82,178.18 71.15,177.9 71.46,177.56C72.9,179.1 74.01,181.23 74.61,182.91C75.14,184.52 74.39,186.1 72.52,186.87C70.55,187.64 68.78,186.85 67.67,185C67.07,183.97 66.16,181.88 65.54,180.15ZM83.44,180.15C83.42,181.45 83.3,182.7 83.18,183.94C83.01,185.74 82,187.16 80.01,187.16C77.97,187.16 76.99,185.74 76.82,183.94C76.34,179.38 76.34,174.37 76.82,169.83C76.99,168.06 77.97,166.64 80.01,166.64C82,166.64 83.01,168.06 83.18,169.83C83.32,171.39 83.37,172.78 83.47,174.42C84.14,172.47 85.15,170.58 85.89,169.21C86.87,167.41 88.53,166.21 90.81,167.17C92.73,167.98 93.4,169.52 92.68,171.37C91.7,173.91 89.8,176.62 88.03,178.04C87.71,178.26 88,178.74 88.36,178.47C88.72,178.18 89.06,177.9 89.37,177.56C90.81,179.1 91.91,181.23 92.51,182.91C93.04,184.52 92.3,186.1 90.43,186.87C88.46,187.64 86.68,186.85 85.58,185C84.98,183.97 84.07,181.88 83.44,180.15ZM102.96,187.35C96.17,187.35 94.37,182.84 94.37,177.1C94.37,174.63 94.41,171.99 94.51,169.62C94.63,167.79 95.97,166.64 97.82,166.64C99.67,166.64 101.04,167.79 101.13,169.62C101.25,171.99 101.3,174.63 101.3,177.1C101.3,178.52 101.52,179.62 102.96,179.62C104.4,179.62 104.61,178.52 104.61,177.1C104.61,174.63 104.66,171.99 104.78,169.62C104.85,167.79 106.25,166.64 108.07,166.64C109.92,166.64 111.33,167.79 111.4,169.62C111.53,171.99 111.57,174.63 111.57,177.1C111.57,182.84 109.75,187.35 102.96,187.35ZM120.48,179.46C120.4,181.04 120.28,182.36 120.12,183.94C119.95,185.74 118.94,187.16 116.95,187.16C114.91,187.16 113.92,185.74 113.76,183.94C113.28,179.38 113.28,174.37 113.76,169.83C113.92,168.06 114.91,166.64 116.95,166.64C118.1,166.64 118.92,167.1 119.44,167.82C120.84,169.81 122.2,172.78 123.33,175.28C123.5,175.59 123.74,175.59 123.91,175.28C125.04,172.78 126.38,169.81 127.8,167.82C128.3,167.1 129.14,166.64 130.29,166.64C132.33,166.64 133.29,168.06 133.48,169.83C133.94,174.37 133.94,179.38 133.48,183.94C133.29,185.74 132.33,187.16 130.29,187.16C128.3,187.16 127.29,185.74 127.12,183.94C126.96,182.36 126.84,181.04 126.76,179.46C127.29,178.3 127.68,177.44 127.96,176.36C128.11,175.81 127.53,175.69 127.41,176.14C126.86,177.87 125.95,179.79 125.11,181.33C124.44,182.55 122.8,182.55 122.13,181.33C121.29,179.79 120.38,177.87 119.83,176.14C119.71,175.69 119.13,175.81 119.28,176.36C119.56,177.44 119.95,178.3 120.48,179.46ZM136.02,183.94C135.54,179.38 135.54,174.37 136.02,169.83C136.19,168.06 137.17,166.64 139.21,166.64C141.21,166.64 142.21,168.06 142.38,169.83C142.86,174.37 142.86,179.38 142.38,183.94C142.21,185.74 141.21,187.16 139.21,187.16C137.17,187.16 136.19,185.74 136.02,183.94Z"
android:fillColor="#12D6E3"/>
<group>
<clip-path
android:pathData="M0,0h160v160h-160z"/>
<path
android:pathData="M103.49,24C97.68,24 92.29,25.93 87.91,29.19C83.18,32.71 76.82,32.71 72.09,29.19C67.71,25.93 62.32,24 56.51,24C41.93,24 30,36.14 30,50.99V94.71C30,108.07 40.74,119 53.86,119H106.14C119.26,119 130,108.07 130,94.71V50.99C130,36.14 118.07,24 103.49,24Z"
android:fillColor="#25F2FF"/>
<path
android:pathData="M67.5,67.75C70.26,67.75 72.5,65.51 72.5,62.75C72.5,59.99 70.26,57.75 67.5,57.75C64.74,57.75 62.5,59.99 62.5,62.75C62.5,65.51 64.74,67.75 67.5,67.75Z"
android:fillColor="#191D22"/>
<path
android:pathData="M92.92,67.75C95.68,67.75 97.92,65.51 97.92,62.75C97.92,59.99 95.68,57.75 92.92,57.75C90.16,57.75 87.92,59.99 87.92,62.75C87.92,65.51 90.16,67.75 92.92,67.75Z"
android:fillColor="#191D22"/>
<path
android:pathData="M102.5,75.67m-8.33,0a8.33,8.33 0,1 1,16.67 0a8.33,8.33 0,1 1,-16.67 0"
android:fillColor="#FFF493"/>
<path
android:pathData="M57.5,75.67m-8.33,0a8.33,8.33 0,1 1,16.67 0a8.33,8.33 0,1 1,-16.67 0"
android:fillColor="#FFF493"/>
<path
android:pathData="M101.67,76.71C98.83,85.87 90.2,92.54 80,92.54C69.8,92.54 61.18,85.88 58.33,76.71"
android:strokeWidth="6.66667"
android:fillColor="#00000000"
android:strokeColor="#191D22"
android:strokeLineCap="round"/>
<path
android:pathData="M60.71,111.08C64.78,111.08 68.08,114.38 68.08,118.46V124.41C71.72,124.87 74.53,127.97 74.53,131.73C74.53,134.17 72.55,136.15 70.11,136.15H61.26C61.2,136.15 61.14,136.15 61.08,136.14C60.96,136.15 60.83,136.15 60.71,136.15C56.63,136.15 53.33,132.85 53.33,128.78V118.46C53.33,114.38 56.63,111.08 60.71,111.08Z"
android:fillColor="#25F2FF"
android:fillType="evenOdd"/>
<path
android:pathData="M100.63,118.46C100.63,114.38 97.33,111.08 93.26,111.08C89.19,111.08 85.89,114.38 85.89,118.46V128.78C85.89,132.85 89.19,136.15 93.26,136.15C97.33,136.15 100.63,132.85 100.63,128.78V118.46Z"
android:fillColor="#25F2FF"/>
<path
android:pathData="M93.81,124.36H99.71C103.78,124.36 107.08,127.66 107.08,131.73C107.08,134.17 105.1,136.15 102.66,136.15H93.81C92.83,136.15 92.04,135.36 92.04,134.38V126.12C92.04,125.15 92.83,124.36 93.81,124.36Z"
android:fillColor="#25F2FF"/>
<path
android:pathData="M103.49,24C97.68,24 92.29,25.93 87.91,29.19C83.18,32.71 76.82,32.71 72.09,29.19C67.71,25.93 62.32,24 56.51,24C41.93,24 30,36.14 30,50.99V94.71C30,108.07 40.74,119 53.86,119H106.14C119.26,119 130,108.07 130,94.71V50.99C130,36.14 118.07,24 103.49,24Z"
android:fillColor="#25F2FF"/>
<path
android:pathData="M67.5,67.75C70.26,67.75 72.5,65.51 72.5,62.75C72.5,59.99 70.26,57.75 67.5,57.75C64.74,57.75 62.5,59.99 62.5,62.75C62.5,65.51 64.74,67.75 67.5,67.75Z"
android:fillColor="#191D22"/>
<path
android:pathData="M92.92,67.75C95.68,67.75 97.92,65.51 97.92,62.75C97.92,59.99 95.68,57.75 92.92,57.75C90.16,57.75 87.92,59.99 87.92,62.75C87.92,65.51 90.16,67.75 92.92,67.75Z"
android:fillColor="#191D22"/>
<path
android:pathData="M102.5,75.67m-8.33,0a8.33,8.33 0,1 1,16.67 0a8.33,8.33 0,1 1,-16.67 0"
android:fillColor="#FFF493"/>
<path
android:pathData="M57.5,75.67m-8.33,0a8.33,8.33 0,1 1,16.67 0a8.33,8.33 0,1 1,-16.67 0"
android:fillColor="#FFF493"/>
<path
android:pathData="M101.67,76.71C98.83,85.87 90.2,92.54 80,92.54C69.8,92.54 61.18,85.88 58.33,76.71"
android:strokeWidth="6.66667"
android:fillColor="#00000000"
android:strokeColor="#191D22"
android:strokeLineCap="round"/>
<path
android:pathData="M60.71,111.08C64.78,111.08 68.08,114.38 68.08,118.46V124.41C71.72,124.87 74.53,127.97 74.53,131.73C74.53,134.17 72.55,136.15 70.11,136.15H61.26C61.2,136.15 61.14,136.15 61.08,136.14C60.96,136.15 60.83,136.15 60.71,136.15C56.63,136.15 53.33,132.85 53.33,128.78V118.46C53.33,114.38 56.63,111.08 60.71,111.08Z"
android:fillColor="#25F2FF"
android:fillType="evenOdd"/>
<path
android:pathData="M100.63,118.46C100.63,114.38 97.33,111.08 93.26,111.08C89.19,111.08 85.89,114.38 85.89,118.46V128.78C85.89,132.85 89.19,136.15 93.26,136.15C97.33,136.15 100.63,132.85 100.63,128.78V118.46Z"
android:fillColor="#25F2FF"/>
<path
android:pathData="M93.81,124.36H99.71C103.78,124.36 107.08,127.66 107.08,131.73C107.08,134.17 105.1,136.15 102.66,136.15H93.81C92.83,136.15 92.04,135.36 92.04,134.38V126.12C92.04,125.15 92.83,124.36 93.81,124.36Z"
android:fillColor="#25F2FF"/>
</group>
</vector>
7 changes: 0 additions & 7 deletions app/src/main/res/mipmap-anydpi/ic_launcher.xml

This file was deleted.

7 changes: 0 additions & 7 deletions app/src/main/res/mipmap-anydpi/ic_launcher_round.xml

This file was deleted.

Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
<item name="android:statusBarColor" tools:targetApi="l">@color/white</item>
<item name="android:windowLightStatusBar">true</item>

<item name="android:windowIsTranslucent">true</item>
</style>
</resources>
8 changes: 0 additions & 8 deletions app/src/main/res/values-v31/themes.xml

This file was deleted.

6 changes: 6 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
<item name="android:statusBarColor" tools:targetApi="l">@color/white</item>
<item name="android:windowLightStatusBar">true</item>

<item name="android:windowIsTranslucent">true</item>

</style>

<style name="Theme.MyKkumi_AOS" parent="Base.Theme.MyKkumi_AOS" />
<style name="SplashTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="android:windowBackground">@drawable/background_splash</item>
<item name="android:windowIsTranslucent">true</item>
</style>
</resources>
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ buildscript {

// LifeCycle
lifecycle_compose_version = "2.8.4"

// Skeleton - facebook shimmer
facebook_shimer_version = "0.5.0"
}
dependencies {
// Safe Args
Expand Down
3 changes: 3 additions & 0 deletions core/common-ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,7 @@ dependencies {

// Coil
implementation("io.coil-kt:coil:$coil_version")

// Skeleton - facebook shimmer
implementation("com.facebook.shimmer:shimmer:$facebook_shimer_version")
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class PostImageIndicator: LinearLayout {
imageDot.add(
ImageView(mContext)
.apply {
setPadding(2)
setPadding(6)
}
)
this.addView(imageDot[i])
Expand Down
Loading

0 comments on commit 534b3df

Please sign in to comment.