Method DocsView.setMode
Stay organized with collections
Save and categorize content based on your preferences.
Selects which mode the view will use to display the documents.
If using a scope other than https://www.googleapis.com/auth/drive
or
https://www.googleapis.com/auth/drive.readonly
, it is recommended to use
DocsViewMode.LIST
as the user has not granted access to thumbnails.
Signature
setMode(mode: DocsViewMode): DocsView;
Details
Optional |
No |
Final |
No |
Protected |
No |
Static |
No |
Parameters
Returns
DocsView
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-20 UTC.
[null,null,["Last updated 2025-06-20 UTC."],[],[],null,["# Method DocsView.setMode\n\nSelects which mode the view will use to display the documents.\n\nIf using a scope other than `https://www.googleapis.com/auth/drive` or\n`https://www.googleapis.com/auth/drive.readonly`, it is recommended to use\n`DocsViewMode.LIST` as the user has not granted access to thumbnails.\n\nSignature\n---------\n\n setMode(mode: DocsViewMode): 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| `mode` | [DocsViewMode](./picker.docsviewmode) | No | |\n\nReturns\n-------\n\n[DocsView](./picker.docsview)"]]