Code example for BaseAdapter

Methods: notifyDataSetChanged

0
                ListAdapter adapter = getListAdapter();
                if (adapter == null) return;
                 
                if (adapter instanceof BaseAdapter) {
                    BaseAdapter base_adapter = (BaseAdapter) adapter;
                    base_adapter.notifyDataSetChanged();
                } 
            } 
        }); 
    } 
     
    public PositionData getCurrentPosition() { 
        ListView view = getListView();
        if (view == null) return new PositionData(0, 0);
         
        int pos = view.getFirstVisiblePosition();
        View top_view = getListView().getChildAt(0);
        int y = top_view != null ? top_view.getTop() : 0;
        return new PositionData(pos, y);
    }