I managed to convert mCrimes to LinkedHashList to increase performance of GetCrime but how do I use LinkedHashMap in on BindViewHolder in CrimeFragment.java .
Currently I am using the following code , It works but I would like to know a more efficient way . Thanks
public void onBindViewHolder(CrimeHolder holder, int position) {
Collection<Crime> mArrayCrime=mCrimes.values();
ArrayList<Crime> ArrayCrime=new ArrayList<Crime>();
for( Crime c: mArrayCrime)
{
ArrayCrime.add(c);
}
Crime crime=ArrayCrime.get(position);
holder.bind(crime);
}