Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

Commit

Permalink
HomeFragment: Add snap helper to homepage recyclerviews
Browse files Browse the repository at this point in the history
Signed-off-by: Shinjo Akane <akane@akanework.org>
  • Loading branch information
AkaneTan committed Jul 18, 2023
1 parent fa0803e commit c77e18b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import android.view.ViewGroup
import android.widget.ImageView
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearSnapHelper
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.StaggeredGridLayoutManager
import com.google.android.material.appbar.AppBarLayout
Expand Down Expand Up @@ -192,6 +193,7 @@ class HomeFragment : Fragment() {
recentRecyclerView.layoutManager = recentLayoutManager
recentAdapter = SongHorizontalRecyclerViewAdapter(recentList)
recentRecyclerView.adapter = recentAdapter
LinearSnapHelper().attachToRecyclerView(recentRecyclerView)

loadingPrompt = rootView.findViewById(R.id.loading_prompt_list)

Expand Down

0 comments on commit c77e18b

Please sign in to comment.