เมธอด DocsView.setMode
เลือกโหมดที่มุมมองจะใช้เพื่อแสดงเอกสาร
หากใช้ขอบเขตที่ไม่ใช่ https://www.googleapis.com/auth/drive
หรือ https://www.googleapis.com/auth/drive.readonly
เราขอแนะนำให้ใช้ DocsViewMode.LIST
เนื่องจากผู้ใช้ไม่ได้ให้สิทธิ์เข้าถึงภาพขนาดย่อ
ลายเซ็น
setMode(mode: DocsViewMode): DocsView;
รายละเอียด
ไม่บังคับ |
ไม่ |
รอบชิงชนะเลิศ |
ไม่ |
มีการป้องกัน |
ไม่ |
คงที่ |
ไม่ |
พารามิเตอร์
การคืนสินค้า
DocsView
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-11-08 UTC
[null,null,["อัปเดตล่าสุด 2024-11-08 UTC"],[[["Selects the display mode for documents within the view, using either list or grid view."],["When using restricted scopes, it's advisable to utilize `DocsViewMode.LIST` due to potential limitations on thumbnail access."],["This method is neither optional, final, protected, nor static."],["It accepts a single parameter, 'mode', to specify the desired display mode (list or grid)."],["Upon execution, it returns an updated DocsView object reflecting the mode change."]]],["The `setMode` function determines how documents are displayed, accepting a `DocsViewMode` parameter. Using scopes other than `drive` or `drive.readonly` suggests using `DocsViewMode.LIST` due to limited access. This function is not optional, final, protected, or static. It returns a `DocsView` object, and the selected `mode` dictates the presentation style of documents within the view.\n"]]