Metoda DocsView.setMode
Wybierz tryb wyświetlania dokumentów.
Jeśli używasz zakresu innego niż https://www.googleapis.com/auth/drive
lub https://www.googleapis.com/auth/drive.readonly
, zalecamy użycie opcji DocsViewMode.LIST
, ponieważ użytkownik nie ma dostępu do miniatur.
Podpis
setMode(mode: DocsViewMode): DocsView;
Szczegóły
Opcjonalnie |
Nie |
Finał |
Nie |
Chroniony |
Nie |
Statyczny |
Nie |
Parametry
Zwroty
DocsView
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-11-08 UTC.
[null,null,["Ostatnia aktualizacja: 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"]]