android java array push code example
Example: android java array push
Use an ArrayList paramaterized to any type you want
ArrayList<Integer> iconList = new ArrayList<Integer>();
add with
iconList.add(Integer.parseInt(cursor.getString(0)));
Iterate with
for (int i: iconList)
{
// i is your entire array starting at index 0
}
or
for (int i=0; i< iconList.size(), i++)
{
}