Code example for MatrixCursor

Methods: addRow

0
 
    /** 
     * Creates a dummy cursor to represent the "Searching directory..." item. 
     */ 
    private Cursor createLoadingCursor() {
        MatrixCursor cursor = new MatrixCursor(new String[]{SEARCHING_CURSOR_MARKER});
        cursor.addRow(new Object[]{""});
        return cursor;
    } 
 
    public void onPartitionLoadFinished( 
            CharSequence constraint, int partitionIndex, Cursor cursor) {
        if (partitionIndex < getPartitionCount()) {
            DirectoryPartition partition = (DirectoryPartition) getPartition(partitionIndex);
 
            // Check if the received result matches the current constraint 
            // If not - the user must have continued typing after the request 
            // was issued 
            if (partition.loading && TextUtils.equals(constraint, partition.constraint)) {
                partition.loading = false;
Connect your IDE to all the code out there  Get Codota for Java