So I am trying to take advantage of RecyclerView animations by using notifyItemRemoved / Added on the adapter, as opposed to just notifyDataSetChanged, which appears to refresh the list instantly without anything cool happening.
But when adding a new item to the list, I normally sort it first using Collections.sort(list) so it appears in the correct spot. Is there an easy way to tell which position the newly-added item went to during this sort, or am I stuck doing a boring linear scan / home-rolled binary search?
If you want all elements inserted in sort order, don't do add, sort, add, sort, add, sort, ...
That's about the slowest way of doing it.