ดูเอกสารของชั้นเรียน
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ใช้ DocsView
เพื่อเลือกไฟล์จาก Google ไดรฟ์
ลายเซ็น
export class DocsView extends View
แหล่งมรดก
รายละเอียด
ผู้ผลิต
เมธอด
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],null,["# Class DocsView\n\nUse `DocsView` to select files from Google Drive.\n\nSignature\n---------\n\n export class DocsView extends View\n\nHeritage\n--------\n\n| Extends | [View](./picker.view.md) |\n|---------|--------------------------|\n\nDetails\n-------\n\n| Final | No |\n|-------|----|\n\nConstructors\n------------\n\n| Name | Description |\n|------------------------------------------------------------|---------------------------------------------------|\n| [`(constructor)(viewId)`](./picker.docsview._constructor_) | Constructs a new instance of the `DocsView` class |\n\nMethods\n-------\n\n| Name | Description |\n|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`getId()`](./picker.view.getid.md) | Returns the `ViewId` of the view. *(Inherited from [`View`](./picker.view))* |\n| [~~`getLabel()`~~](./picker.view.getlabel.md) | *(Deprecated)* *(Inherited from [`View`](./picker.view))* |\n| [`setEnableDrives(enabled)`](./picker.docsview.setenabledrives) | Shows shared drives and the files they contain. Before enabling, refer to [GoogleDrive API documentation for enabling shared drives](/workspace/drive/v3/web/enable-shareddrives). |\n| [`setFileIds(fileIds)`](./picker.docsview.setfileids) | Sets the file IDs included in the view. |\n| [`setIncludeFolders(included)`](./picker.docsview.setincludefolders) | Show folders in the view items. |\n| [~~`setLabel(label)`~~](./picker.view.setlabel.md) | *(Deprecated)* *(Inherited from [`View`](./picker.view))* |\n| [`setMimeTypes(mimeTypes)`](./picker.view.setmimetypes.md) | Sets the MIME types included in the view. Use commas to separate MIME types if more than one is required. If you don't set MIME types, files of all MIME types are displayed in the view. *(Inherited from [`View`](./picker.view))* |\n| [`setMode(mode)`](./picker.docsview.setmode) | Selects which mode the view will use to display the documents. |\n| [`setOwnedByMe(me)`](./picker.docsview.setownedbyme) | Filters the documents based on whether they are owned by the user, or shared with the user. |\n| [`setParent(parentId)`](./picker.docsview.setparent) | Sets the initial parent folder to display. |\n| [`setQuery(query)`](./picker.view.setquery.md) | For views involving searches, prepopulate the search query with these terms. *(Inherited from [`View`](./picker.view))* |\n| [`setSelectFolderEnabled(enabled)`](./picker.docsview.setselectfolderenabled) | Allows the user to select a folder in Google Drive. |\n| [`setStarred(starred)`](./picker.docsview.setstarred) | Filters the documents based on whether they are starred by the user. |"]]