I am new to Android development and have been following the tutorials available on the Android website. I am currently on the section of tutorials for Views, specifically th
By setting Adapter, you are telling GridView to fetch views from the Adapter to fill up all the grids. So getView
is internally called by GridView to fill up the layout.
Thats why all the adapters implements Adapter
interface so that any AdapterView can request the Adapter.
Adapter.getView
is called inside ObtainView
method, inherited from GridView
parent class AbsListView
, with ScrapView objects passed in when available:
child = mAdapter.getView(position, scrapView, this);
Then ObtainView
is implemented in GridView.onMeasure
directly but also in several more callbacks that invoke GridView.layoutChildren
, including inherited onTouchEvent
method which handles scroll, fling and other touch navigation.