Search in sources :

Example 1 with SubmissionAdapter

use of me.ccrama.redditslide.Adapters.SubmissionAdapter in project Slide by ccrama.

the class SubmissionsView method doAdapter.

public void doAdapter(boolean force18) {
    mSwipeRefreshLayout.post(new Runnable() {

        @Override
        public void run() {
            mSwipeRefreshLayout.setRefreshing(true);
        }
    });
    posts = new SubredditPosts(id, getContext(), force18);
    adapter = new SubmissionAdapter(getActivity(), posts, rv, id, this);
    adapter.setHasStableIds(true);
    rv.setAdapter(adapter);
    posts.loadMore(getActivity(), this, true);
    mSwipeRefreshLayout.setOnRefreshListener(this::refresh);
}
Also used : SubmissionAdapter(me.ccrama.redditslide.Adapters.SubmissionAdapter) SubredditPosts(me.ccrama.redditslide.Adapters.SubredditPosts)

Example 2 with SubmissionAdapter

use of me.ccrama.redditslide.Adapters.SubmissionAdapter in project Slide by ccrama.

the class SubmissionsView method doAdapter.

public void doAdapter() {
    if (!MainActivity.isRestart) {
        mSwipeRefreshLayout.post(new Runnable() {

            @Override
            public void run() {
                mSwipeRefreshLayout.setRefreshing(true);
            }
        });
    }
    posts = new SubredditPosts(id, getContext());
    adapter = new SubmissionAdapter(getActivity(), posts, rv, id, this);
    adapter.setHasStableIds(true);
    rv.setAdapter(adapter);
    posts.loadMore(getActivity(), this, true);
    mSwipeRefreshLayout.setOnRefreshListener(this::refresh);
}
Also used : SubmissionAdapter(me.ccrama.redditslide.Adapters.SubmissionAdapter) SubredditPosts(me.ccrama.redditslide.Adapters.SubredditPosts)

Aggregations

SubmissionAdapter (me.ccrama.redditslide.Adapters.SubmissionAdapter)2 SubredditPosts (me.ccrama.redditslide.Adapters.SubredditPosts)2