Search in sources :

Example 1 with GanKAdapter

use of com.ivy.baseproject.test.adapter.GanKAdapter in project BaseProject by fly803.

the class GirlListActivity method initView.

private void initView() {
    Toolbar toolbar = (Toolbar) findViewById(R.id.tool_bar);
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            finish();
        }
    });
    toolbar.setTitle(R.string.award_list);
    mRecyuclerView = (RecyclerView) findViewById(R.id.gank_recycler_view);
    StaggeredGridLayoutManager manager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
    mRecyuclerView.setLayoutManager(manager);
    mRecyuclerView.addItemDecoration(new MyItemDecoration());
    mAdapter = new GanKAdapter();
    mRecyuclerView.setAdapter(mAdapter);
}
Also used : StaggeredGridLayoutManager(androidx.recyclerview.widget.StaggeredGridLayoutManager) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) GanKAdapter(com.ivy.baseproject.test.adapter.GanKAdapter) Toolbar(androidx.appcompat.widget.Toolbar)

Aggregations

View (android.view.View)1 Toolbar (androidx.appcompat.widget.Toolbar)1 RecyclerView (androidx.recyclerview.widget.RecyclerView)1 StaggeredGridLayoutManager (androidx.recyclerview.widget.StaggeredGridLayoutManager)1 GanKAdapter (com.ivy.baseproject.test.adapter.GanKAdapter)1