I wanted to sort the items in recyclerView. I have usernames such as 20ABC1, 20ABC2,..., 20ABC10,..etc.
I have tried answers from the related questions one of which was:
public static final Comparator<Users> BY_NAME_ALPHABETICAL = (users, t1) -> users.Username.compareTo(t1.Username);
But this does not solve the problem exactly. 20ABC10, 20ABC11,...20ABC19 comes above 20ABC2. I think it is because it checks character by character.
Any way I can solve this?
Thank you :)