方法 DocsView.setStarred
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
根据用户是否为文档加星标过滤文档。
如果为 true
,视图中仅显示已加星标的文档。如果为 false
,则视图中会显示所有文档。
请勿将此设置与 setEnableDrives
组合使用。设置 setEnableDrives(true)
后,系统会忽略 setStarred
。
签名
setStarred(starred: boolean): DocsView;
详细信息
参数
名称 |
类型 |
可选 |
说明 |
starred |
boolean |
否 |
|
返回
DocsView
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# Method DocsView.setStarred\n\nFilters the documents based on whether they are starred by the user.\n\nIf `true`, only starred documents are displayed in the view. If `false`, all\ndocuments are displayed in the view.\n\nDon't combine this setting with `setEnableDrives`. When `setEnableDrives(true)`\nis set, `setStarred` is ignored.\n\nSignature\n---------\n\n setStarred(starred: boolean): DocsView;\n\nDetails\n-------\n\n| Optional | No |\n| Final | No |\n| Protected | No |\n| Static | No |\n|-----------|----|\n\nParameters\n----------\n\n| Name | Type | Optional | Description |\n|-----------|-----------|----------|-------------|\n| `starred` | `boolean` | No | |\n\nReturns\n-------\n\n[DocsView](./picker.docsview)"]]