Search in sources :

Example 1 with PostAdapter

use of me.yluo.ruisiapp.adapter.PostAdapter in project Ruisi by freedom10086.

the class PostActivity method initCommentList.

private void initCommentList() {
    topicList = findViewById(R.id.topic_list);
    LinearLayoutManager mLayoutManager = new LinearLayoutManager(this);
    topicList.setLayoutManager(mLayoutManager);
    adapter = new PostAdapter(this, this, datas);
    topicList.addItemDecoration(new MyListDivider(this, MyListDivider.VERTICAL));
    topicList.addOnScrollListener(new LoadMoreListener(mLayoutManager, this, 8));
    topicList.setAdapter(adapter);
}
Also used : MyListDivider(me.yluo.ruisiapp.widget.MyListDivider) LoadMoreListener(me.yluo.ruisiapp.listener.LoadMoreListener) PostAdapter(me.yluo.ruisiapp.adapter.PostAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 PostAdapter (me.yluo.ruisiapp.adapter.PostAdapter)1 LoadMoreListener (me.yluo.ruisiapp.listener.LoadMoreListener)1 MyListDivider (me.yluo.ruisiapp.widget.MyListDivider)1