From ee2cfc9b529ce3d10a038225397ee7e232d1d074 Mon Sep 17 00:00:00 2001
From: SeongHoonC <108349655+SeongHoonC@users.noreply.github.com>
Date: Wed, 6 Mar 2024 19:14:22 +0900
Subject: [PATCH] =?UTF-8?q?[AN/USER]=20feat:=20=EC=95=8C=EB=A6=BC=20?=
=?UTF-8?q?=ED=99=94=EB=A9=B4=EC=9D=84=20=EA=B5=AC=ED=98=84=ED=95=9C?=
=?UTF-8?q?=EB=8B=A4(#771)=20(#772)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* feat(NotificationList): 알림 목록 화면 생성
* feat(NotificationList): 뒤로가기 클릭 시 알림 목록 종료
* feat(NotificationList): 알림 목록 뷰모델 생성
* reactor(NotificationList): 뒤로가기 클릭 함수 분리
---
.../presentation/src/main/AndroidManifest.xml | 5 +-
.../home/festivallist/FestivalListFragment.kt | 8 +++
.../NotificationListActivity.kt | 35 ++++++++++
.../NotificationListViewModel.kt | 5 ++
.../res/layout/activity_notification_list.xml | 69 +++++++++++++++++++
.../src/main/res/values/strings.xml | 5 ++
6 files changed, 126 insertions(+), 1 deletion(-)
create mode 100644 android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/notificationlist/NotificationListActivity.kt
create mode 100644 android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/notificationlist/NotificationListViewModel.kt
create mode 100644 android/festago/presentation/src/main/res/layout/activity_notification_list.xml
diff --git a/android/festago/presentation/src/main/AndroidManifest.xml b/android/festago/presentation/src/main/AndroidManifest.xml
index 971514f53..4fa2771c1 100644
--- a/android/festago/presentation/src/main/AndroidManifest.xml
+++ b/android/festago/presentation/src/main/AndroidManifest.xml
@@ -2,6 +2,10 @@
+
-
diff --git a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/festivallist/FestivalListFragment.kt b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/festivallist/FestivalListFragment.kt
index 47ebe1b2d..89105b822 100644
--- a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/festivallist/FestivalListFragment.kt
+++ b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/festivallist/FestivalListFragment.kt
@@ -21,6 +21,7 @@ import com.festago.festago.presentation.ui.home.festivallist.festival.FestivalLi
import com.festago.festago.presentation.ui.home.festivallist.uistate.FestivalListUiState
import com.festago.festago.presentation.ui.home.festivallist.uistate.FestivalMoreItemUiState
import com.festago.festago.presentation.ui.home.festivallist.uistate.FestivalTabUiState
+import com.festago.festago.presentation.ui.notificationlist.NotificationListActivity
import com.festago.festago.presentation.ui.schooldetail.SchoolDetailFragment
import com.festago.festago.presentation.util.repeatOnStarted
import com.festago.festago.presentation.util.setOnApplyWindowInsetsCompatListener
@@ -82,6 +83,9 @@ class FestivalListFragment : Fragment() {
binding.ivSearch.setOnClickListener { // 임시 연결
showSchoolDetail()
}
+ binding.ivAlarm.setOnClickListener {
+ showNotificationList()
+ }
}
private fun initViewPager() {
@@ -178,6 +182,10 @@ class FestivalListFragment : Fragment() {
.commit()
}
+ private fun showNotificationList() {
+ startActivity(NotificationListActivity.getIntent(requireContext()))
+ }
+
override fun onDestroyView() {
_binding = null
super.onDestroyView()
diff --git a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/notificationlist/NotificationListActivity.kt b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/notificationlist/NotificationListActivity.kt
new file mode 100644
index 000000000..5706c9d02
--- /dev/null
+++ b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/notificationlist/NotificationListActivity.kt
@@ -0,0 +1,35 @@
+package com.festago.festago.presentation.ui.notificationlist
+
+import android.content.Context
+import android.content.Intent
+import android.os.Bundle
+import androidx.activity.viewModels
+import androidx.appcompat.app.AppCompatActivity
+import com.festago.festago.presentation.databinding.ActivityNotificationListBinding
+
+class NotificationListActivity : AppCompatActivity() {
+
+ private val binding: ActivityNotificationListBinding by lazy {
+ ActivityNotificationListBinding.inflate(layoutInflater)
+ }
+
+ private val vm: NotificationListViewModel by viewModels()
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(binding.root)
+ initBackPressed()
+ }
+
+ private fun initBackPressed() {
+ binding.ivBack.setOnClickListener {
+ onBackPressedDispatcher.onBackPressed()
+ }
+ }
+
+ companion object {
+ fun getIntent(context: Context): Intent {
+ return Intent(context, NotificationListActivity::class.java)
+ }
+ }
+}
diff --git a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/notificationlist/NotificationListViewModel.kt b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/notificationlist/NotificationListViewModel.kt
new file mode 100644
index 000000000..e00cd54e6
--- /dev/null
+++ b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/notificationlist/NotificationListViewModel.kt
@@ -0,0 +1,5 @@
+package com.festago.festago.presentation.ui.notificationlist
+
+import androidx.lifecycle.ViewModel
+
+class NotificationListViewModel : ViewModel()
diff --git a/android/festago/presentation/src/main/res/layout/activity_notification_list.xml b/android/festago/presentation/src/main/res/layout/activity_notification_list.xml
new file mode 100644
index 000000000..c637ebb1a
--- /dev/null
+++ b/android/festago/presentation/src/main/res/layout/activity_notification_list.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/festago/presentation/src/main/res/values/strings.xml b/android/festago/presentation/src/main/res/values/strings.xml
index 031392955..1af05206f 100644
--- a/android/festago/presentation/src/main/res/values/strings.xml
+++ b/android/festago/presentation/src/main/res/values/strings.xml
@@ -22,4 +22,9 @@
D%1$s
+
+ 알림
+ 아직 도착한 알림이 없어요
+ 새로운 소식이 도착하면 알려드릴게요
+