I implemented an expandedGridView like this Kishanjvaghela's github example or the answer of Raj008 in stack Overflow.
It works fine, but I wonder why does it need to call super()
in the constructor
public class ExpandableHeightGridView extends GridView {
boolean expanded = false;
public ExpandableHeightGridView(Context context) {
super(context);
}
public ExpandableHeightGridView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public ExpandableHeightGridView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
/* more code here */
}
If there is no constructor, java must call parent constructor, isn't it ?