Search in sources :

Example 1 with VideoBean

use of com.xxx.ency.model.bean.VideoBean in project Ency by xiarunhao123.

the class EyepetizerHotActivity method initialize.

@Override
protected void initialize() {
    setSupportActionBar(mToolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    setTitle("热门排行");
    Intent intent = getIntent();
    Bundle bundle = intent.getExtras();
    VideoBean hotVideoBean = (VideoBean) bundle.getSerializable("data");
    hotAdapter = new EyepetizerAdapter();
    recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
    recyclerView.setAdapter(hotAdapter);
    hotAdapter.setNewData(hotVideoBean.getItemList());
    hotAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {

        @Override
        public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
            VideoBean.ItemListBean bean = (VideoBean.ItemListBean) adapter.getData().get(position);
            VideoBean.ItemListBean.DataBeanX beanX = bean.getData();
            Intent intent = new Intent(mContext, EyepetizerDetailActivity.class);
            intent.putExtra("data", beanX);
            mContext.startActivity(intent);
        }
    });
}
Also used : Bundle(android.os.Bundle) Intent(android.content.Intent) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) RecyclerView(android.support.v7.widget.RecyclerView) View(android.view.View) BindView(butterknife.BindView) VideoBean(com.xxx.ency.model.bean.VideoBean) BaseQuickAdapter(com.chad.library.adapter.base.BaseQuickAdapter) EyepetizerAdapter(com.xxx.ency.view.eyepetizer.adapter.EyepetizerAdapter)

Aggregations

Intent (android.content.Intent)1 Bundle (android.os.Bundle)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 View (android.view.View)1 BindView (butterknife.BindView)1 BaseQuickAdapter (com.chad.library.adapter.base.BaseQuickAdapter)1 VideoBean (com.xxx.ency.model.bean.VideoBean)1 EyepetizerAdapter (com.xxx.ency.view.eyepetizer.adapter.EyepetizerAdapter)1