Note that there are some explanatory texts on larger screens.

plurals
  1. POcomparing between two arraylists and remove extra element from there
    primarykey
    data
    text
    <p>how do I compare two arraylists?</p> <p>I have a sdCoverList array and thumbnailList array.</p> <pre><code>02-04 11:05:05.210: I/System.out(4035): HASHED THUMBNAIL[-2122410790, 2043473787, 1914391068, 1785308349, 1656225630, 1527142911, 1398060192, 1268977473, 1139894754, 1010812035, 1242943301, 1113860582, 984777863, 855695144, 726612425, 597529706, 468446987, 339364268, 210281549] 02-04 11:05:05.210: I/System.out(4035): SD COVER LIST[-2122410790, 2043473787, 1914391068, 1785308349, 1268977473, 1656225630, 1527142911, 1139894754, 1398060192, 1010812035, 1242943301, 1113860582, 984777863, 855695144, 726612425, 597529706, 468446987, 339364268, 210281549, 717409028] </code></pre> <p>In my sd cover list, i have an extra value that i want to remove away but first i'd have to compare with thumbnailList array first. if both have the same elements, don't do anything but if theres an extra, remove it from sd card.</p> <p>My array lists </p> <p>for sdCoverList:</p> <pre><code>// CHECK DIRECTORY BEFORE DELETING THEM File strPath = new File(Environment.getExternalStorageDirectory() + folderName+"/Covers"); File yourDir = new File(strPath, ""); if(yourDir.length()!=0) for (File f : yourDir.listFiles()) { if (f.isFile()) { String name = f.getName(); sdCoverList.add(name); //System.out.println(sdCoverList); } </code></pre> <p>for hashedthumbnail</p> <pre><code>for (int a=0;a&lt;=thumbnailList.size()-1;a++) { String hashed = String.valueOf(thumbnailList.get(a).hashCode()); Log.d("hashed",hashed); hashedThumbnail.add(hashed); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload