I've made recyclerview view and also added it a header. Other contains text and images and header contains only text. In vertical it was good but in gridlayout header is also added with grid layout.
I want to be it in top and only other come in grid layout. how can i do that?
this is main acitivity:
recyclerView = (RecyclerView)findViewById(R.id.recycler);
LinearLayoutManager(getApplicationContext());
recyclerView.setLayoutManager(new GridLayoutManager(this, 2));
adapter = new DataAdapter(items);
recyclerView.setAdapter(adapter);
items.add(new Header("Header 1"));
items.add(new Item(R.drawable.ic_launcher_background, "fa"));
items.add(new Item(R.drawable.ic_launcher_background, "fa"));
items.add(new Item(R.drawable.ic_launcher_background, "fa"));
items.add(new Item(R.drawable.ic_launcher_background, "fa"));
items.add(new Item(R.drawable.ic_launcher_background, "fa"));
adapter.notifyDataSetChanged();