Search in sources :

Example 1 with NewsListAdapter

use of forpdateam.ru.forpda.ui.fragments.news.main.timeline.NewsListAdapter in project ForPDA by RadiationX.

the class NewsMainFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    viewsReady();
    setCardsBackground();
    refreshLayout.setOnRefreshListener(this::loadData);
    recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
    recyclerView.addItemDecoration(new BrandFragment.SpacingItemDecoration(App.px8, true));
    PauseOnScrollListener pauseOnScrollListener = new PauseOnScrollListener(ImageLoader.getInstance(), true, true);
    recyclerView.addOnScrollListener(pauseOnScrollListener);
    adapter = new NewsListAdapter();
    adapter.setOnClickListener(this);
    recyclerView.setAdapter(adapter);
}
Also used : BrandFragment(forpdateam.ru.forpda.ui.fragments.devdb.BrandFragment) PauseOnScrollListener(forpdateam.ru.forpda.ui.views.PauseOnScrollListener) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) NewsListAdapter(forpdateam.ru.forpda.ui.fragments.news.main.timeline.NewsListAdapter)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 BrandFragment (forpdateam.ru.forpda.ui.fragments.devdb.BrandFragment)1 NewsListAdapter (forpdateam.ru.forpda.ui.fragments.news.main.timeline.NewsListAdapter)1 PauseOnScrollListener (forpdateam.ru.forpda.ui.views.PauseOnScrollListener)1