Android examples for User Interface:View Child
get Child View By Position
//package com.java2s; import android.view.View; import android.widget.AdapterView; public class Main { public static View getChildViewByPosition(int position, AdapterView<?> adapterView) { final int firstListItemPosition = adapterView .getFirstVisiblePosition(); final int lastListItemPosition = firstListItemPosition + adapterView.getChildCount() - 1; if (position < firstListItemPosition || position > lastListItemPosition) { return adapterView.getAdapter().getView(position, null, adapterView);/*w w w . ja v a 2s . c om*/ } else { final int childIndex = position - firstListItemPosition; return adapterView.getChildAt(childIndex); } } }