android documentscontract 源码,DocumentsContract.Document

本文档详细介绍了Android中的DocumentsContract.Document类,包括文档的显示名称、唯一ID、标志、图标、修改时间、MIME类型、大小和摘要等常量字段。这些字段用于描述可打开的流或包含更多文档的目录。此外,还提到了目录的显示偏好,如网格布局、按最后修改时间排序、支持创建新文件、可删除、支持缩略图和写入等功能。
摘要由CSDN通过智能技术生成

android.provider.DocumentsContract.Document

Class Overview

Constants related to a document, including

A document can be either an openable stream (with a specific MIME type),

or a directory containing additional documents (with the

All columns are read-only to client applications.

Summary

Constants

Display name of a document, used as the primary title displayed to a

user.

Unique ID of a document.

Flags that apply to a document.

Specific icon resource ID for a document.

Timestamp when a document was last modified, in milliseconds since

January 1, 1970 00:00:00.0 UTC.

Concrete MIME type of a document.

Size of a document, in bytes, or null if unknown.

Summary of a document, which may be shown to a user.

int

Flag indicating that a directory prefers its contents be shown in a

larger format grid.

int

Flag indicating that a directory prefers its contents be sorted by

int

Flag indicating that a document is a directory that supports creation

of new files within it.

int

Flag indicating that a document is deletable.

int

Flag indicating that a document can be represented as a thumbnail.

int

Flag indicating that a document supports writing.

MIME type of a document which is a directory that may contain

additional documents.

[Expand]

Inherited Methods

3e54f4822052f69722b015cabe630b87.png

From class

java.lang.Object

Creates and returns a copy of this Object.

boolean

Compares this instance with the specified object and indicates if they

are equal.

void

Invoked when the garbage collector has detected that this instance is no longer reachable.

final

Class>

Returns the unique instance of

int

Returns an integer hash code for this object.

final

void

Causes a thread which is waiting on this object's monitor (by means of

calling one of the wait() methods) to be woken up.

final

void

Causes all threads which are waiting on this object's monitor (by means

of calling one of the wait() methods) to be woken up.

Returns a string containing a concise, human-readable description of this

object.

final

void

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

final

void

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the

specified timeout expires.

final

void

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the

specified timeout expires.

Constants

public

static

final

String

COLUMN_DISPLAY_NAME

Display name of a document, used as the primary title displayed to a

user. This column is required.

Type: STRING

Constant Value:

"_display_name"

public

static

final

String

COLUMN_DOCUMENT_ID

Unique ID of a document. This ID is both provided by and interpreted

by a

Each document must have a unique ID within a provider, but that

single document may be included as a child of multiple directories.

A provider must always return durable IDs, since they will be used to

issue long-term URI permission grants when an application interacts

with

Type: STRING

Constant Value:

"document_id"

public

static

final

String

COLUMN_FLAGS

public

static

final

String

COLUMN_ICON

Specific icon resource ID for a document. This column is optional,

and may be null to use a platform-provided default icon based

on

Type: INTEGER (int)

Constant Value:

"icon"

public

static

final

String

COLUMN_LAST_MODIFIED

Timestamp when a document was last modified, in milliseconds since

January 1, 1970 00:00:00.0 UTC. This column is required, and may be

null if unknown. A

Type: INTEGER (long)

Constant Value:

"last_modified"

public

static

final

String

COLUMN_MIME_TYPE

Concrete MIME type of a document. For example, "image/png" or

"application/pdf" for openable files. A document can also be a

directory containing additional documents, which is represented with

the

Type: STRING

Constant Value:

"mime_type"

public

static

final

String

COLUMN_SIZE

Size of a document, in bytes, or null if unknown. This column

is required.

Type: INTEGER (long)

Constant Value:

"_size"

public

static

final

String

COLUMN_SUMMARY

Summary of a document, which may be shown to a user. This column is

optional, and may be null.

Type: STRING

Constant Value:

"summary"

public

static

final

int

FLAG_DIR_PREFERS_GRID

Flag indicating that a directory prefers its contents be shown in a

larger format grid. Usually suitable when a directory contains mostly

pictures. Only valid when

Constant Value:

16

(0x00000010)

public

static

final

int

FLAG_DIR_PREFERS_LAST_MODIFIED

Flag indicating that a directory prefers its contents be sorted by

Constant Value:

32

(0x00000020)

public

static

final

int

FLAG_DIR_SUPPORTS_CREATE

Flag indicating that a document is a directory that supports creation

of new files within it. Only valid when

Constant Value:

8

(0x00000008)

public

static

final

int

FLAG_SUPPORTS_DELETE

Flag indicating that a document is deletable.

Constant Value:

4

(0x00000004)

public

static

final

int

FLAG_SUPPORTS_THUMBNAIL

public

static

final

int

FLAG_SUPPORTS_WRITE

Flag indicating that a document supports writing.

When a document is opened with

Constant Value:

2

(0x00000002)

public

static

final

String

MIME_TYPE_DIR

MIME type of a document which is a directory that may contain

additional documents.

Constant Value:

"vnd.android.document/directory"

Except as noted, this content is licensed under Apache 2.0.

For details and restrictions, see the Content License.

Android 4.4 r1 —

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值