diff --git a/app/src/main/kotlin/jackall/overlaymulticounter/viewmodel/OverlayCounterViewModel.kt b/app/src/main/kotlin/jackall/overlaymulticounter/viewmodel/OverlayCounterViewModel.kt index b17683b..e226cbc 100644 --- a/app/src/main/kotlin/jackall/overlaymulticounter/viewmodel/OverlayCounterViewModel.kt +++ b/app/src/main/kotlin/jackall/overlaymulticounter/viewmodel/OverlayCounterViewModel.kt @@ -2,6 +2,7 @@ import android.databinding.BaseObservable import android.databinding.BindingAdapter +import android.support.v7.widget.DividerItemDecoration import android.support.v7.widget.LinearLayoutManager import android.support.v7.widget.RecyclerView import android.view.View @@ -9,6 +10,7 @@ import io.realm.RealmResults import jackall.overlaymulticounter.App import jackall.overlaymulticounter.CounterAdapter +import jackall.overlaymulticounter.R import jackall.overlaymulticounter.contract.CounterContract import jackall.overlaymulticounter.db.CounterRealmHelper import jackall.overlaymulticounter.vo.Counter @@ -88,6 +90,9 @@ return recyclerView.layoutManager = LinearLayoutManager(App.get()) recyclerView.adapter = counterAdapter + val dividerItemDecoration = DividerItemDecoration(recyclerView.context, LinearLayoutManager.VERTICAL) + dividerItemDecoration.setDrawable(recyclerView.context.resources.getDrawable(R.drawable.divider)) + recyclerView.addItemDecoration(dividerItemDecoration) } } } \ No newline at end of file