ankushsachdeva / emojicon

Android library to show emojicon dialog box over soft keyboard
283 stars 149 forks source link

Fix for efficient way to add emoji in recent page #10

Closed madhurtewani closed 9 years ago

madhurtewani commented 9 years ago

Instead of removing emoji object from current index in array list & then adding it to 0 index, rotate sub array list by 1. Sub array list starts from index 0 to current index of emoji object in the main/super array list.

ankushsachdeva commented 9 years ago

Thanks for bringing this up. This FIXME tag was carried along from the previous library. I am not sure why its there. We need random access in the EmojiAdapter so using a LinkedList based Deque wont be a good idea. An array backed Deque would require linear time in removeFirstOccurrence . Also, rotating the ArrayList does not improve efficiency. I think this FIXME tag should be dropped.