I’m getting an unchecked call warning where it doesn’t seem to make sense. I’m using the SelectBox widget from libGDX’s Scene2D API. First, I instantiate the SelectBox like this:
lHeadBox = new SelectBox(skin, "equipment");
Then I create an Array to add to the SelectBox items and add a default string to start the list:
Array<String> headList = new Array<String>();
headList.add("none");
Finally, I set this Array as the items of the SelectBox, and this is where I get the unchecked call warning for the setItems(Array items) method:
headBox.setItems(headList);
The exact warning is:
Unchecked call to 'setItems(Array<T>)' as a member of raw type 'com.badlogic.gdx.scenes.scene2d.ui.SelectBox'
I don’t understand this. I thought the unchecked call warning was due to not specifying the type parameter, which I thought I was doing by declaring the Array with the String parameter type (i.e. Array instead of just Array).
Thanks!