方法 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-03-10。
[null,null,["最后更新时间 (UTC):2025-03-10。"],[[["The `setStarred` method filters displayed documents based on whether they are starred by the user."],["If `starred` is true, only starred documents are shown; otherwise, all documents are displayed."],["This method returns a `DocsView` object for further interaction."]]],["The `setStarred` function filters documents displayed in a `DocsView`. It accepts a boolean parameter, `starred`. When `starred` is `true`, only documents marked as starred by the user are shown. If `false`, all documents are shown. This function is not optional, final, protected, or static. It returns a `DocsView` object, allowing for further operations on the document view.\n"]]