I want to write a ListView
in basic format but I get an error:
UnsupportedOperationException: addView(View, LayoutParams) is not supported in Ad
If you're like me and totally skipped over the answer I needed in @Luksprog's answer because it's buried in it, try using adding the third parameter to the inflate
method, also mentioned here:
inflater.inflate(R.layout.group_row, parent, false);
Don't use true
instead of false
or you will get the same error that brought you here, because it's trying to attach/add it to the parent, hence the addView is not supported in AdapterView
error.