package com.xxrv.coupon;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout;
import com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshView;
import com.xxrv.coupon.adapter.CarCouponAdapter;
import com.xxrv.coupon.adapter.UsedCouponAdapter;
import com.xxrv.coupon.presenter.CouponAllPresenter;

import butterknife.BindView;

/**
 * 租车优惠券
 */
public class CarCouponActivity extends BaseStatusActivity<CouponAllPresenter>implements BaseQuickAdapter.RequestLoadMoreListener, SimpleRefreshLayout.OnSimpleRefreshListener {
    @BindView(R2.id.rv_content)
    RecyclerView rvContent;
    @BindView(R2.id.refresh)
    SimpleRefreshLayout mSimpleRefreshLayout;

    private CarCouponAdapter mAdapter;

    @Override
    protected int setLayout() {
        return R.layout.activity_car_coupon;
    }

    @Override
    protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
        titleView.setTitle("优惠券");

        mSimpleRefreshLayout.setHeaderView(new SimpleRefreshView(mActivity));
        mSimpleRefreshLayout.setOnSimpleRefreshListener(this);


        mAdapter = new CarCouponAdapter();
        rvContent.setLayoutManager(new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false));
        rvContent.setAdapter(mAdapter);
    }

    @Override
    public void onShowResult(int requestType, BaseBean result) {

    }

    @Override
    public void onLoadMoreRequested() {

    }

    @Override
    public void onRefresh() {

    }
}
