I have a unique SMS problem:
The end goal is to replace the phone numbers displaying in my list to contact names
(These are all string arraylists)
ArrayList3 contains 6 elements that represents a selection of phone numbers.
ArrayList2 contains 31 elements representing all available phone numbers.
ArrayList1 contains 31 elements representing the names of all phone numbers in the same order respectively to ArrayList2.
How would I compare them all to this effect:
“If Arraylist3’s element is equal to an element in ArrayList2, copy ArrayList3 at the same position of ArrayList2 and place it into ArrayList3.”
Roughly, what Im trying to do is match the elements of ArrayList3 with identical elements in ArrayList2. From there, use the position of ArrayList2 to get the same position of ArrayList1, then copy the data at that position (ArrayList1) into ArrayList3.
Any ideas on how to achieve this?
I have tried the following and it works for me: