I have the following code
public abstract class BaseAdapter extends ArrayAdapter {
public BaseAdapter(Con
Creation Dead Lock
You use ModelAdapter.ModelViewHolder
as the template parameter of BaseAdapter
, and let ModelAdapter
extends BaseAdapter
, then the compiler tried to create ModelViewHolder
first, but the class of ModelAdapter.ModelViewHolder
(the type is Class) is not yet created. It must wait for ModelAdapter
to be created, because ModelViewHolder
is in the scope of ModelAdapter
.
The way to solve it is put the ModelViewHolder
class into a new *.java file.