Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/team-winey/Winey-AOS int…
Browse files Browse the repository at this point in the history
…o feature/chore-set-amplitude
  • Loading branch information
leeeha committed Aug 28, 2023
2 parents 197fa98 + 4a0d99a commit 3954800
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class NotificationActivity :
initNotificationAdapter()
viewModel.getNotification()
initBackButtonClickListener()
initSwipeRefreshListener()
setupGetNotificationStateObserver()
}

Expand Down Expand Up @@ -65,6 +66,13 @@ class NotificationActivity :
}
}

private fun initSwipeRefreshListener() {
binding.layoutNotificationRefresh.setOnRefreshListener {
viewModel.getNotification()
binding.layoutNotificationRefresh.isRefreshing = false
}
}

private fun navigateToDetail(feedId: Int?) {
val intent = Intent(this, DetailActivity::class.java)
intent.putExtra("feedId", feedId)
Expand Down
27 changes: 19 additions & 8 deletions app/src/main/res/layout/activity_notification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,28 @@

</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_notification_post"
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/layout_notification_refresh"
android:layout_width="match_parent"
android:layout_height="0dp"
android:nestedScrollingEnabled="false"
android:orientation="vertical"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_notification_appbar"
tools:listitem="@layout/item_notification_post" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_notification_appbar">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_notification_post"
android:layout_width="match_parent"
android:layout_height="0dp"
android:nestedScrollingEnabled="false"
android:orientation="vertical"
android:clipToPadding="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_notification_post" />

</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>



</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

0 comments on commit 3954800

Please sign in to comment.