Search in sources :

Example 1 with FilterAdapter

use of com.rvfilter.widget.filter.FilterAdapter in project AndroidDevelop by 7449.

the class FilterActivity method onCreate.

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_filter);
    RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
    recyclerView.setHasFixedSize(true);
    recyclerView.setLayoutManager(new GridLayoutManager(recyclerView.getContext(), 3));
    filterAdapter = new FilterAdapter(RVUtils.initFilterData());
    recyclerView.setAdapter(filterAdapter);
    findViewById(R.id.ok).setOnClickListener(this);
    textView = (AppCompatTextView) findViewById(R.id.tv);
}
Also used : GridLayoutManager(android.support.v7.widget.GridLayoutManager) FilterAdapter(com.rvfilter.widget.filter.FilterAdapter) RecyclerView(android.support.v7.widget.RecyclerView)

Aggregations

GridLayoutManager (android.support.v7.widget.GridLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 FilterAdapter (com.rvfilter.widget.filter.FilterAdapter)1