From c8100b55d752d80a2d0b272d0b252621697cccb6 Mon Sep 17 00:00:00 2001 From: neslihanturan Date: Wed, 16 Oct 2019 16:45:59 +0300 Subject: [PATCH] Add divider to recyclerview --- .../nrw/commons/nearby/fragments/NearbyParentFragment.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java b/app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java index b2a52377f..0d5b6af92 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java +++ b/app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java @@ -27,6 +27,7 @@ import androidx.annotation.NonNull; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; +import androidx.recyclerview.widget.DividerItemDecoration; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -210,6 +211,8 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment }); recyclerView.setHasFixedSize(true); + recyclerView.addItemDecoration(new DividerItemDecoration(getContext(), + DividerItemDecoration.VERTICAL)); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity()); linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);