I have a RealmResults object. I need to copy one column of it into an other object which supports Collections.shuffle()
Currently I am running a for loop to load an ArrayList object. However, this is taking lot of time, around 1 second which is impacting my app's recyclerview.
Is there any other alternative I can use to load ArrayList? Or anything other than ArrayList which can do the same task in lot less time.
---------------Below code for clarity---------------
mResults = mRealm.where(Quote.class).equalTo("AUTH_TITLE", mAuthorNameReceived).findAll();
indices = new ArrayList<>();
for (int i = 0; i < mResults.size(); i++) {
indices.add(i);
description.add(mResults.get(i).getPOST_DESCRIPTION());
}
Collections.shuffle(description);