addDocument

abstract fun addDocument(@NonNull documentDescriptor: DocumentDescriptor): Boolean

Inserts a new document at the end of the documents list. If the document already exists, it will not be added again or moved.

The document is not made visible by this method, use setVisibleDocument to make it visible.

Return

true when documents list has changed.

Parameters

documentDescriptor

Document to add.


abstract fun addDocument(@NonNull documentDescriptor: DocumentDescriptor, index: Int): Boolean

Inserts a new document at the specified index. If the document already exists, it will not be added again or moved.

The document is not made visible by this method, use setVisibleDocument to make it visible.

Return

true when documents list has changed.

Parameters

documentDescriptor

Document to add.

index

Index at which the document should be inserted.