Code example for ListView

Methods: getChildAt, getFirstVisiblePosition

0
 
    private void invalidateView(int position) {
        View child = null;
        if (mContainer instanceof ListView) {
            ListView lv = (ListView) mContainer;
            child = lv.getChildAt(position - lv.getFirstVisiblePosition());
        } else { 
            CategoryTrack ct = (CategoryTrack) mContainer;
            child = ct.getChildAt(position);
        } 
        if (child != null) {
            child.invalidate();
        } 
    } 
 
    public void setContainer(View container) {
        mContainer = container;
    } 
 
    public void imageLoaded() { 
        notifyDataSetChanged();