Search in sources :

Example 1 with HistoryAdapter

use of com.dante.adapter.HistoryAdapter in project 91Pop by DanteAndroid.

the class HistoryActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_history);
    ButterKnife.bind(this);
    initToolBar(toolbar);
    mUnLimit91PornItemList = new ArrayList<>();
    mUnLimit91Adapter = new HistoryAdapter(R.layout.item_unlimit_91porn, mUnLimit91PornItemList);
    recyclerView.setLayoutManager(new LinearLayoutManager(this));
    recyclerView.setAdapter(mUnLimit91Adapter);
    mUnLimit91Adapter.setEmptyView(R.layout.empty_view, recyclerView);
    mUnLimit91Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {

        @Override
        public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
            goToPlayVideo((UnLimit91PornItem) adapter.getItem(position));
        }
    });
    mUnLimit91Adapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {

        @Override
        public void onLoadMoreRequested() {
            presenter.loadHistoryData(false);
        }
    }, recyclerView);
    presenter.loadHistoryData(false);
}
Also used : BaseQuickAdapter(com.chad.library.adapter.base.BaseQuickAdapter) HistoryAdapter(com.dante.adapter.HistoryAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) BindView(butterknife.BindView) SwipeMenuRecyclerView(com.aitsuki.swipe.SwipeMenuRecyclerView) View(android.view.View) UnLimit91PornItem(com.dante.data.model.UnLimit91PornItem)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 View (android.view.View)1 BindView (butterknife.BindView)1 SwipeMenuRecyclerView (com.aitsuki.swipe.SwipeMenuRecyclerView)1 BaseQuickAdapter (com.chad.library.adapter.base.BaseQuickAdapter)1 HistoryAdapter (com.dante.adapter.HistoryAdapter)1 UnLimit91PornItem (com.dante.data.model.UnLimit91PornItem)1