Skip to content

Commit

Permalink
Merge pull request #113 from YAPP-Github/feature/flash159483/#110
Browse files Browse the repository at this point in the history
#110: 아이콘 및 Splash 수정
  • Loading branch information
flash159483 authored Aug 19, 2024
2 parents cbadb29 + fe55923 commit 8409dba
Show file tree
Hide file tree
Showing 31 changed files with 117 additions and 237 deletions.
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
android:name=".splash.SplashActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.WeSpot"
android:theme="@style/Theme.Wespot.Starting"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Expand Down
Binary file added app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ class PushNotificationService : FirebaseMessagingService() {
val defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)

val notificationBuilder = NotificationCompat.Builder(this, CHANNEL_ID)
// TODO Set AppIcon
.setSmallIcon(R.drawable.ic_launcher_background)
.setSmallIcon(R.mipmap.ic_launcher_round)
.setContentTitle(title)
.setContentText(content)
.setAutoCancel(true)
Expand Down
51 changes: 31 additions & 20 deletions app/src/main/kotlin/com/bff/wespot/splash/SplashActivity.kt
Original file line number Diff line number Diff line change
@@ -1,41 +1,52 @@
package com.bff.wespot.splash

import android.animation.ObjectAnimator
import android.os.Build
import android.os.Bundle
import android.view.View
import android.view.animation.DecelerateInterpolator
import androidx.activity.ComponentActivity
import androidx.activity.viewModels
import androidx.core.animation.doOnEnd
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import com.bff.wespot.R
import com.bff.wespot.auth.AuthActivity
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch


@AndroidEntryPoint
class SplashActivity : ComponentActivity() {
private val viewModel: SplashViewModel by viewModels()

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
installSplashScreen().apply {
setKeepOnScreenCondition {
return@setKeepOnScreenCondition viewModel.start.value.not()
}
setOnExitAnimationListener { splashScreen ->
ObjectAnimator.ofFloat(
splashScreen.view,
View.TRANSLATION_Y,
0f, splashScreen.view.height.toFloat()
).apply {
interpolator = DecelerateInterpolator()
duration = 500L

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
installSplashScreen().apply {
setKeepOnScreenCondition {
return@setKeepOnScreenCondition viewModel.start.value.not()
}
setOnExitAnimationListener {
val intent = AuthActivity.intent(this@SplashActivity)
startActivity(intent)
doOnEnd {
splashScreen.remove()
finish()
finish()
}
}
} else {
setContentView(R.layout.activity_splash)
actionBar?.hide()

lifecycleScope.launch {
repeatOnLifecycle(Lifecycle.State.CREATED) {
viewModel.start.collect {
if (it) {
delay(500)
val intent = AuthActivity.intent(this@SplashActivity)
startActivity(intent)
finish()
}
}
start()
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/kotlin/com/bff/wespot/splash/SplashViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.bff.wespot.splash
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.bff.wespot.domain.repository.RemoteConfigRepository
import com.bff.wespot.domain.util.RemoteConfigKey
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
Expand All @@ -16,9 +17,15 @@ class SplashViewModel @Inject constructor(
private val _start = MutableStateFlow(false)
val start = _start.asStateFlow()

private val _minVersion = MutableStateFlow("")
val minVersion = _minVersion.asStateFlow()

init {
viewModelScope.launch {
_start.value = dataSource.startRemoteConfig()
if (_start.value) {
_minVersion.emit(dataSource.fetchFromRemoteConfig(RemoteConfigKey.MIN_VERSION))
}
}
}
}
170 changes: 0 additions & 170 deletions app/src/main/res/drawable/ic_launcher_background.xml

This file was deleted.

30 changes: 0 additions & 30 deletions app/src/main/res/drawable/ic_launcher_foreground.xml

This file was deleted.

24 changes: 24 additions & 0 deletions app/src/main/res/drawable/icon.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"
android:width="450dp"
android:height="450dp"
android:viewportWidth="450"
android:viewportHeight="450">
<path
android:pathData="M229.32,260.06L232.85,258.82V221.44L229.32,220.51V220.2L242.91,215.48H242.98V222.62C245,220.42 246.93,218.69 248.75,217.4C250.61,216.12 252.6,215.48 254.71,215.48C256.66,215.48 258.48,216.06 260.17,217.22C261.87,218.33 263.24,220.03 264.27,222.31C265.35,224.54 265.89,227.27 265.89,230.5C265.89,234.31 265.14,237.6 263.65,240.38C262.2,243.15 260.22,245.26 257.69,246.71C255.21,248.16 252.41,248.88 249.31,248.88C248.15,248.88 247.09,248.78 246.14,248.57C245.19,248.41 244.13,248.16 242.98,247.83V258.82L247.69,260.06V260.37H229.32V260.06ZM242.98,244.47C243.85,245.59 244.76,246.5 245.71,247.21C246.66,247.87 247.74,248.2 248.94,248.2C250.1,248.2 251.19,247.74 252.23,246.83C253.26,245.88 254.09,244.43 254.71,242.49C255.33,240.5 255.64,238.06 255.64,235.16C255.64,232.06 255.25,229.49 254.46,227.46C253.72,225.43 252.72,223.94 251.48,222.99C250.24,222.04 248.91,221.56 247.51,221.56C245.89,221.56 244.38,222.18 242.98,223.43V244.47Z"
android:fillColor="#F6FE8C"/>
<path
android:pathData="M208.98,248.88C207.2,248.88 205.53,248.74 203.95,248.45C202.42,248.2 201.18,247.93 200.23,247.64L197.68,232.37H198.05C198.8,235.18 200,237.66 201.66,239.82C203.31,241.97 205.28,243.65 207.55,244.85C209.83,246.01 212.23,246.59 214.76,246.59C216.99,246.59 218.67,246.15 219.79,245.28C220.95,244.37 221.52,243.15 221.52,241.62C221.52,239.92 220.68,238.31 218.98,236.77C217.32,235.24 214.22,233.44 209.67,231.37C206.02,229.72 203.17,228.14 201.1,226.65C199.03,225.12 197.56,223.61 196.69,222.12C195.82,220.59 195.38,218.91 195.38,217.09C195.38,214.52 196.17,212.17 197.74,210.01C199.36,207.82 201.59,206.08 204.45,204.8C207.31,203.47 210.56,202.81 214.2,202.81C217.18,202.81 220.28,203.24 223.51,204.11L224.88,200.14H225.19V215.79H224.88C224.13,212.23 222.58,209.33 220.22,207.1C217.9,204.86 215.11,203.74 211.84,203.74C209.44,203.74 207.49,204.3 206,205.42C204.55,206.54 203.83,208.05 203.83,209.95C203.83,211.9 204.66,213.7 206.31,215.35C207.97,216.97 210.76,218.64 214.7,220.38C219.21,222.37 222.41,224.42 224.32,226.53C226.22,228.6 227.18,231.12 227.18,234.1C227.18,236.84 226.45,239.32 225,241.55C223.55,243.79 221.44,245.57 218.67,246.9C215.94,248.22 212.71,248.88 208.98,248.88Z"
android:fillColor="#F6FE8C"/>
<path
android:pathData="M177.91,248.88C174.85,248.88 172.1,248.22 169.66,246.9C167.26,245.57 165.37,243.71 164.01,241.31C162.68,238.91 162.02,236.13 162.02,232.99C162.02,229.51 162.79,226.45 164.32,223.8C165.85,221.15 167.92,219.1 170.53,217.65C173.13,216.2 175.99,215.48 179.09,215.48C182.86,215.48 185.86,216.33 188.1,218.02C190.37,219.68 191.64,221.75 191.88,224.23H172.33C172.24,225.23 172.2,226.01 172.2,226.59C172.2,231.77 173.26,235.64 175.37,238.2C177.48,240.77 180.46,242.05 184.31,242.05C186.79,242.05 188.68,241.54 189.96,240.5C191.24,239.42 192.26,237.79 193,235.6L193.38,235.72C190.85,244.49 185.7,248.88 177.91,248.88ZM182.14,223.24C181.93,221.21 181.39,219.53 180.52,218.21C179.65,216.88 178.6,216.22 177.36,216.22C176.03,216.22 174.93,216.86 174.07,218.15C173.2,219.43 172.62,221.27 172.33,223.67L182.14,223.24Z"
android:fillColor="#F6FE8C"/>
<path
android:pathData="M103.23,205.29L100,204.05V203.74H119.81V204.05L114.65,205.29L125.71,235.1L136.07,202.25H136.26L152.4,235.53L155.2,227.71C156.69,223.69 157.79,220.38 158.49,217.77C159.19,215.13 159.54,212.95 159.54,211.26C159.54,209.06 158.99,207.49 157.87,206.54C156.75,205.54 155.01,204.82 152.65,204.36L151.23,204.05V203.74H167.99V204.05L164.82,205.29L147.75,249.44H147.56L132.97,219.14L120.37,249.44H120.18L103.23,205.29Z"
android:fillColor="#F6FE8C"/>
<path
android:pathData="M338.58,248.88C336.17,248.88 334.27,248.2 332.86,246.83C331.45,245.43 330.75,243.5 330.75,241.06V220.2H327.4V219.82C330.38,218.96 333.13,217.34 335.66,214.98C338.18,212.62 339.8,210.22 340.5,207.78H340.87V216.41H348.88V220.2H340.87V240.44C340.87,241.64 341.24,242.57 341.99,243.23C342.73,243.85 343.79,244.16 345.16,244.16C345.98,244.16 346.75,244.04 347.45,243.79C348.16,243.54 348.92,243.13 349.75,242.55L350,242.86C346.94,245.26 344.66,246.88 343.17,247.7C341.72,248.49 340.19,248.88 338.58,248.88Z"
android:fillColor="#F6FE8C"/>
<path
android:pathData="M268.52,245.71L287.27,233.98L270.49,221.27L291.22,228.12L286.28,210.52L298.13,225.18L323.79,190L308.98,226.16L323.79,227.14L307.01,233L332.67,253.53L304.05,242.78L305.04,254.51L298.13,243.76L286.28,260.37L288.26,241.8L268.52,245.71Z"
android:fillColor="#F6FE8C"/>
</vector>
13 changes: 13 additions & 0 deletions app/src/main/res/layout/activity_splash.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#1C1B1E">

<ImageView
android:id="@+id/splash_image"
android:layout_width="250dp"
android:layout_height="250dp"
android:layout_centerInParent="true"
android:src="@drawable/icon" />
</RelativeLayout>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
6 changes: 0 additions & 6 deletions app/src/main/res/mipmap-anydpi/ic_launcher.xml

This file was deleted.

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

This file was deleted.

Binary file modified app/src/main/res/mipmap-hdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file modified app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary file not shown.
Binary file modified app/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file modified app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary file not shown.
Binary file modified app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file modified app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file modified app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file modified app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file modified app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file modified app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Binary file not shown.
Loading

0 comments on commit 8409dba

Please sign in to comment.