I’m trying to make a ListView in Android with a dynamic field. First, I tried to set it up using static field which is shown below (String[] chars)
String[] chars = {"TEST"};
setListAdapter(new ArrayAdapter<String>(this,R.layout.resultlist,chars));
it gives me error The constructor ArrayAdapter<String>(ViewTranslationsList.GrabURL, int, int) is undefined. Where’s the problem?
I want to add items to the chars array before I set up ArrayAdapter in for cycle.
Thanks
It looks like you’re doing this inside an inner class (since the error is mentioning
ViewTranslationsList.GrabURL. If that is truly the case, try doing this: