Code example for SimpleCursorAdapter

Methods: getCount

0
    @Override 
    public int getCount() { 
        if (mShowIndeterminate) {
            return 1; 
        } else { 
            return super.getCount(); 
        } 
    } 
 
    @Override 
    public View getView(int position, View convertView, ViewGroup parent) {
        final boolean convertViewIsProgressBar = convertView != null
                && convertView.getId() == R.id.progress;
 
        if (mShowIndeterminate) {
            if (convertViewIsProgressBar) {
                return convertView;
            } 
 
            if (mIndeterminate == null) {
                mIndeterminate = LayoutInflater.from(mContext).inflate(R.layout.list_loading,