Nickthegoatboy Nickthegoatboy - 11 months ago 67
Android Question

Integer Array List Adding Elements

I'm having a bit of a problem with an ArrayList I'm trying to use for a clock deep link in Android. I'm just trying to create an ArrayList with the values [1,2,3,4,5,6,7].

Here's what I have right now:

ArrayList<Integer> daysList = new ArrayList<>();

is underlined and says "Cannot resolve symbol: add"

Thanks in advance!

Answer Source

You should call daysList.add(5); in onCreate(); or some other method