方法 DocsView.setStarred
根據使用者是否為文件加星,篩選文件。
如果為 true
,則檢視畫面只會顯示已加星號的文件。如果為 false
,則檢視畫面會顯示所有文件。
請勿將這項設定與 setEnableDrives
搭配使用。設定 setEnableDrives(true)
時,系統會忽略 setStarred
。
簽名
setStarred(starred: boolean): DocsView;
詳細資料
參數
名稱 |
類型 |
選用 |
說明 |
starred |
boolean |
否 |
|
傳回
DocsView
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-10 (世界標準時間)。
[null,null,["上次更新時間: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"]]