Hi Guys, Maybe you all are expert in terms of using RecyclerView in android. This blog is simple example for using filter option with RecyclerView adapter. As for now you will instantiate RecyclerView and set the adapter to RecyclerView as following way. RecyclerView list = (RecyclerView) findViewById(R.id.list); list.setLayoutManager(new LinearLayoutManager(this)); list.setHasFixedSize(true); ArrayList<Number> numbers = new ArrayList<>(); String ONEs[] = {"ZERO", "ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN"}; String TENs[] = {"ZERO", "TEN", "TWENTY", "THIRTY", "FOURTY", "FIFTY", "SIXTY", "SEVENTY", "EIGHTY", "NINETY", "HUNDRED"}; String HUNDREDS[] = {"ZERO", "HUNDRED", "TWO HUND...
A Fragment represents a behavior of user interface in an Activity. A activity can have more than one fragments and also a fragment can be used in more than one activities. You can use Fragment instead of Activity , TabActivity, ListActivity etc., Why Fragments? TabActivity was deprecated in API Level 13 Because it is a subclass of ActivityGroup And ActivityGroup was deprecated because of slow performance. You can use the Fragment and FragmentManager APIs instead. When compared to activity the Fragment is much faster. This post is an example of ListFragment in android. A Fragment that displays a list of items by binding to a data source such as an array or Cursor, and exposes event handlers when the user selects an item. ...