Bearded Beast Bearded Beast - 6 months ago 112
Android Question

Display Namelist In Recyclerview under each letter in alphabetic Order Android

I have list of contacts which has to be displayed in alphabetic under each alphabet as shown in the image shownRequired answer

How can I do this in RecyclerView, please suggest a solution.thanks

  1. Sort list with data by name
  2. Iterate via list with data, and in place when current's item first letter != first letter of next item, insert special kind of object.
  3. Inside your Adapter place special view when item is "special".