Bearded Beast Bearded Beast - 1 year ago 238
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

Answer Source
  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".
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download