-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat(NotificationList): 알림 목록 화면 생성 * feat(NotificationList): 뒤로가기 클릭 시 알림 목록 종료 * feat(NotificationList): 알림 목록 뷰모델 생성 * reactor(NotificationList): 뒤로가기 클릭 함수 분리
- Loading branch information
1 parent
1f3cf51
commit ee2cfc9
Showing
6 changed files
with
126 additions
and
1 deletion.
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
35 changes: 35 additions & 0 deletions
35
...ain/java/com/festago/festago/presentation/ui/notificationlist/NotificationListActivity.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,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) | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...in/java/com/festago/festago/presentation/ui/notificationlist/NotificationListViewModel.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,5 @@ | ||
package com.festago.festago.presentation.ui.notificationlist | ||
|
||
import androidx.lifecycle.ViewModel | ||
|
||
class NotificationListViewModel : ViewModel() |
69 changes: 69 additions & 0 deletions
69
android/festago/presentation/src/main/res/layout/activity_notification_list.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,69 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<data> | ||
|
||
</data> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".ui.notificationlist.NotificationListActivity"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/clAppBar" | ||
android:layout_width="match_parent" | ||
android:layout_height="56dp" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<ImageView | ||
android:id="@+id/ivBack" | ||
android:layout_width="wrap_content" | ||
android:layout_height="24dp" | ||
android:layout_marginStart="16dp" | ||
android:contentDescription="@null" | ||
android:src="@drawable/ic_arrow_back_ios_new_24" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:tint="@color/contents_gray_07" /> | ||
|
||
<TextView | ||
style="@style/H4Bold16Lh20" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/notification_list_tv_notification_app_bar" | ||
android:textColor="@color/contents_gray_07" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
<TextView | ||
android:id="@+id/tvNoNotification" | ||
style="@style/H5Bold14Lh16" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/notification_list_tv_no_notification" | ||
android:textColor="@color/contents_gray_06" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/clAppBar" /> | ||
|
||
<TextView | ||
android:id="@+id/tvNoNotificationExplain" | ||
style="@style/B4Medium12Lh14" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/notification_list_tv_no_notification_explain" | ||
android:textColor="@color/contents_gray_05" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tvNoNotification" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
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