siralam / LoopingViewPager

A ViewPager and PagerAdapter combination that support auto scroll, infinite loop and page indicators.
532 stars 64 forks source link

Replace unnecessary ArrayList with 'List' interface #4

Closed Namolem closed 6 years ago

Namolem commented 6 years ago

Good practice is to use interfaces instead of realizations.

In this case we are forced to use ArrayList, so in my code I have to do such thing:

fun showVouchers(items: List<VoucherItem>) {
    voucherAdapter.setItemList(ArrayList(items))
}
siralam commented 6 years ago

Indeed. Thanks!