-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from TelePigeon/feat-splash-login
[feat] 스플래시, 로그인, 알림 권한 구현
- Loading branch information
Showing
28 changed files
with
535 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 61 additions & 27 deletions
88
core/designsystem/src/main/res/drawable/ic_launcher_foreground.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,64 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:aapt="http://schemas.android.com/aapt" | ||
android:width="108dp" | ||
android:height="108dp" | ||
android:viewportWidth="108" | ||
android:viewportHeight="108"> | ||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> | ||
<aapt:attr name="android:fillColor"> | ||
<gradient | ||
android:endX="85.84757" | ||
android:endY="92.4963" | ||
android:startX="42.9492" | ||
android:startY="49.59793" | ||
android:type="linear"> | ||
<item | ||
android:color="#44000000" | ||
android:offset="0.0" /> | ||
<item | ||
android:color="#00000000" | ||
android:offset="1.0" /> | ||
</gradient> | ||
</aapt:attr> | ||
</path> | ||
<path | ||
android:fillColor="#FFFFFF" | ||
android:fillType="nonZero" | ||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" | ||
android:strokeWidth="1" | ||
android:strokeColor="#00000000" /> | ||
</vector> | ||
android:viewportWidth="146" | ||
android:viewportHeight="146"> | ||
<group android:scaleX="0.57" | ||
android:scaleY="0.57" | ||
android:translateX="31.39" | ||
android:translateY="31.39"> | ||
<path | ||
android:pathData="M22.08,0L123.92,0A22.08,22.08 0,0 1,146 22.08L146,123.92A22.08,22.08 0,0 1,123.92 146L22.08,146A22.08,22.08 0,0 1,0 123.92L0,22.08A22.08,22.08 0,0 1,22.08 0z" | ||
android:fillColor="#FFC142"/> | ||
<path | ||
android:pathData="M106.29,45.57C90.4,21.52 59.49,15.51 39.52,45.57C26.97,64.46 29.21,84.21 32.86,94.3C35.5,101.58 41.94,108.31 54.76,111.49C58.49,112.41 62.77,113.04 67.64,113.29C69.23,113.37 70.87,113.41 72.58,113.41C74.27,113.41 75.92,113.39 77.52,113.35C82.52,113.23 87.12,112.88 91.26,112.05C101.22,110.05 108.57,105.29 112.73,94.3C118.74,78.41 116.81,61.49 106.29,45.57Z" | ||
android:strokeWidth="2.5" | ||
android:fillColor="#ffffff" | ||
android:strokeColor="#000000"/> | ||
<path | ||
android:pathData="M39.52,45.57C58.63,14.96 90.4,21.52 106.29,45.57C116.31,60.73 116.31,70.3 116.31,79.32C113.59,79.75 107.25,79.45 103.64,74.81C104.5,79.32 99.99,81.68 95.7,78.25C94.41,82.32 90.11,83.83 85.61,81.04C83.46,84.04 77.02,86.83 72.29,82.32C69.29,84.69 62.85,85.54 59.41,81.25C56.41,84.47 51.68,82.11 49.32,78.67C46.75,79.53 41.59,79.96 41.59,74.81C39.25,78.43 35.22,80.15 30.13,79.34C30.11,79.54 30.07,79.55 30,79.32C30.04,79.33 30.09,79.33 30.13,79.34C30.34,77.61 29.66,61.35 39.52,45.57Z" | ||
android:fillColor="#E2E2E2"/> | ||
<path | ||
android:pathData="M106.29,45.57C90.4,21.52 59.49,15.51 39.52,45.57C26.97,64.46 29.21,84.21 32.86,94.3C35.5,101.58 41.94,108.31 54.76,111.49C58.49,112.41 62.77,113.04 67.64,113.29C69.23,113.37 70.87,113.41 72.58,113.41C74.27,113.41 75.92,113.39 77.52,113.35C82.52,113.23 87.12,112.88 91.26,112.05C101.22,110.05 108.57,105.29 112.73,94.3C118.74,78.41 116.81,61.49 106.29,45.57Z" | ||
android:strokeWidth="2.5" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#000000"/> | ||
<path | ||
android:pathData="M66.79,71.97C67.64,66.18 77.95,66.61 78.81,71.97C78.81,76.7 66.79,76.7 66.79,71.97Z" | ||
android:fillColor="#FCB62A"/> | ||
<path | ||
android:pathData="M57.34,115.77C56.05,117.06 50.68,118.13 54.76,111.49C58.49,112.41 62.77,113.04 67.64,113.29C68.5,122.43 63.35,120.71 62.49,117.06C61.85,119.21 57.34,120.92 57.34,115.77Z" | ||
android:fillColor="#FCB62A"/> | ||
<path | ||
android:pathData="M82.89,117.06C80.74,121.35 76.88,121.57 77.52,113.35C82.52,113.23 87.12,112.88 91.26,112.05C92.55,115.77 91.9,119.21 87.61,115.77C87.61,119.64 85.03,120.71 82.89,117.06Z" | ||
android:fillColor="#FCB62A"/> | ||
<path | ||
android:pathData="M41.67,74.55C41.67,80.35 46.82,80.99 49.61,77.99C52.19,83.78 57.12,84.21 59.49,80.78C62.49,86.14 69.36,85.07 72.37,82.06C76.45,86.14 82.89,85.28 85.68,80.78C90.83,84 94.27,82.06 95.55,77.99C101.14,82.06 103.71,79.49 103.71,74.55M66.79,71.97C67.64,66.18 77.95,66.61 78.81,71.97M66.79,71.97C66.79,76.7 78.81,76.7 78.81,71.97M66.79,71.97H78.81M54.76,111.49C50.68,118.13 56.05,117.06 57.34,115.77C57.34,120.92 61.85,119.21 62.49,117.06C63.35,120.71 68.5,122.43 67.64,113.29C62.77,113.04 58.49,112.41 54.76,111.49ZM77.52,113.35C76.88,121.57 80.74,121.35 82.89,117.06C85.03,120.71 87.61,119.64 87.61,115.77C91.9,119.21 92.55,115.77 91.26,112.05C87.12,112.88 82.52,113.23 77.52,113.35Z" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="2.5" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#000000" | ||
android:strokeLineCap="round"/> | ||
<path | ||
android:pathData="M65.07,60.38a2.15,2.36 0,1 0,4.29 0a2.15,2.36 0,1 0,-4.29 0z" | ||
android:fillColor="#000000"/> | ||
<path | ||
android:pathData="M75.8,60.38a2.15,2.36 0,1 0,4.29 0a2.15,2.36 0,1 0,-4.29 0z" | ||
android:fillColor="#000000"/> | ||
<path | ||
android:pathData="M53.62,74.81L54.47,92.63L91.19,90.27L91.83,71.16L53.62,74.81Z" | ||
android:fillColor="#ffffff"/> | ||
<path | ||
android:pathData="M53.62,74.81L54.47,92.63L91.19,90.27L91.83,71.16M53.62,74.81L91.83,71.16M53.62,74.81L68.64,83.18M91.83,71.16L77.88,81.68" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="2.5" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#000000"/> | ||
<path | ||
android:pathData="M72.08,80.82C72.08,75.24 86.25,77.17 74.01,88.77C60.06,82.75 67.36,76.1 72.08,80.82Z" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="2" | ||
android:fillColor="#C70000" | ||
android:strokeColor="#C70000"/> | ||
</group> | ||
</vector> |
Large diffs are not rendered by default.
Oops, something went wrong.
5 changes: 2 additions & 3 deletions
5
...rc/main/res/mipmap-anydpi/ic_launcher.xml → ...ain/res/mipmap-anydpi-v26/ic_launcher.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<background android:drawable="@drawable/ic_launcher_background" /> | ||
<foreground android:drawable="@drawable/ic_launcher_foreground" /> | ||
<monochrome android:drawable="@drawable/ic_launcher_foreground" /> | ||
<background android:drawable="@color/ic_launcher_background"/> | ||
<foreground android:drawable="@drawable/ic_launcher_foreground"/> | ||
</adaptive-icon> |
5 changes: 2 additions & 3 deletions
5
...n/res/mipmap-anydpi/ic_launcher_round.xml → ...s/mipmap-anydpi-v26/ic_launcher_round.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<background android:drawable="@drawable/ic_launcher_background" /> | ||
<foreground android:drawable="@drawable/ic_launcher_foreground" /> | ||
<monochrome android:drawable="@drawable/ic_launcher_foreground" /> | ||
<background android:drawable="@color/ic_launcher_background"/> | ||
<foreground android:drawable="@drawable/ic_launcher_foreground"/> | ||
</adaptive-icon> |
Binary file modified
BIN
+326 Bytes
(120%)
core/designsystem/src/main/res/mipmap-hdpi/ic_launcher.webp
Binary file not shown.
Binary file modified
BIN
+632 Bytes
(120%)
core/designsystem/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary file not shown.
Binary file modified
BIN
+190 Bytes
(120%)
core/designsystem/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary file not shown.
Binary file modified
BIN
+422 Bytes
(120%)
core/designsystem/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary file not shown.
Binary file modified
BIN
+544 Bytes
(130%)
core/designsystem/src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary file not shown.
Binary file modified
BIN
+1.2 KB
(130%)
core/designsystem/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file modified
BIN
+828 Bytes
(130%)
core/designsystem/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary file not shown.
Binary file modified
BIN
+2.12 KB
(140%)
core/designsystem/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file modified
BIN
+1.38 KB
(140%)
core/designsystem/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary file not shown.
Binary file modified
BIN
+3.66 KB
(150%)
core/designsystem/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Binary file not shown.
4 changes: 4 additions & 0 deletions
4
core/designsystem/src/main/res/values/ic_launcher_background.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="ic_launcher_background">#FEC44D</color> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
feature/src/main/java/com/dongguk/telepigeon/feature/login/LoginFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.dongguk.telepigeon.feature.login | ||
|
||
import android.os.Bundle | ||
import android.view.View | ||
import androidx.navigation.fragment.findNavController | ||
import com.dongguk.telepigeon.feature.R | ||
import com.dongguk.telepigeon.feature.databinding.FragmentLoginBinding | ||
import com.dongguk.telpigeon.core.ui.base.BindingFragment | ||
|
||
class LoginFragment : BindingFragment<FragmentLoginBinding>({ FragmentLoginBinding.inflate(it) }) { | ||
override fun onViewCreated( | ||
view: View, | ||
savedInstanceState: Bundle?, | ||
) { | ||
super.onViewCreated(view, savedInstanceState) | ||
|
||
setLayoutLoginKakaoClickListener() | ||
} | ||
|
||
private fun setLayoutLoginKakaoClickListener() { | ||
binding.layoutLoginKakao.setOnClickListener { | ||
navigateToNotification() | ||
} | ||
} | ||
|
||
private fun navigateToNotification() { | ||
findNavController().navigate(R.id.action_login_to_notification) | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
feature/src/main/java/com/dongguk/telepigeon/feature/notification/NotificationFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package com.dongguk.telepigeon.feature.notification | ||
|
||
import android.Manifest | ||
import android.content.pm.PackageManager | ||
import android.os.Build | ||
import android.os.Bundle | ||
import android.view.View | ||
import androidx.activity.result.contract.ActivityResultContracts | ||
import androidx.core.content.ContextCompat | ||
import androidx.navigation.fragment.findNavController | ||
import com.dongguk.telepigeon.feature.R | ||
import com.dongguk.telepigeon.feature.databinding.FragmentNotificationBinding | ||
import com.dongguk.telpigeon.core.ui.base.BindingFragment | ||
|
||
class NotificationFragment : BindingFragment<FragmentNotificationBinding>({ FragmentNotificationBinding.inflate(it) }) { | ||
private val postNotificationPermissionRequest = | ||
registerForActivityResult( | ||
ActivityResultContracts.RequestPermission(), | ||
) { | ||
navigateToHome() | ||
} | ||
|
||
override fun onViewCreated( | ||
view: View, | ||
savedInstanceState: Bundle?, | ||
) { | ||
super.onViewCreated(view, savedInstanceState) | ||
|
||
initLayout() | ||
setBtnNotificationNoApplyClickListener() | ||
setBtnNotificationApplyClickListener() | ||
} | ||
|
||
private fun initLayout() { | ||
if (ContextCompat.checkSelfPermission(requireContext().applicationContext, Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED) { | ||
navigateToHome() | ||
} | ||
} | ||
|
||
private fun setBtnNotificationNoApplyClickListener() { | ||
binding.btnNotificationNoApply.setOnClickListener { | ||
navigateToHome() | ||
} | ||
} | ||
|
||
private fun setBtnNotificationApplyClickListener() { | ||
binding.btnNotificationApply.setOnClickListener { | ||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { | ||
postNotificationPermissionRequest.launch(Manifest.permission.POST_NOTIFICATIONS) | ||
} | ||
} | ||
} | ||
|
||
private fun navigateToHome() { | ||
findNavController().navigate(R.id.action_notification_to_home) | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
feature/src/main/java/com/dongguk/telepigeon/feature/splash/SplashActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.dongguk.telepigeon.feature.splash | ||
|
||
import android.content.Intent | ||
import android.os.Bundle | ||
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen | ||
import androidx.lifecycle.lifecycleScope | ||
import com.dongguk.telepigeon.feature.MainActivity | ||
import com.dongguk.telepigeon.feature.databinding.ActivitySplashBinding | ||
import com.dongguk.telpigeon.core.ui.base.BindingActivity | ||
import kotlinx.coroutines.delay | ||
import kotlinx.coroutines.launch | ||
|
||
class SplashActivity : BindingActivity<ActivitySplashBinding>({ ActivitySplashBinding.inflate(it) }) { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
installSplashScreen() | ||
super.onCreate(savedInstanceState) | ||
loadSplashScreen() | ||
} | ||
|
||
private fun loadSplashScreen() { | ||
lifecycleScope.launch { | ||
delay(SPLASH_SCREEN_DELAY_TIME) | ||
navigateToMain() | ||
} | ||
} | ||
|
||
private fun navigateToMain() { | ||
Intent(this@SplashActivity, MainActivity::class.java).apply { | ||
startActivity(this) | ||
finish() | ||
} | ||
} | ||
|
||
companion object { | ||
const val SPLASH_SCREEN_DELAY_TIME = 1500L | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@color/lemon" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<ImageView | ||
android:id="@+id/iv_splash" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:src="@drawable/ic_splash" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:layout_constraintBottom_toBottomOf="parent" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |
Oops, something went wrong.