1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.launcher3.widget.picker.util 18 19 /** 20 * An ordered list of recommended sizes for the preview containers in handheld devices. 21 * 22 * Size of the preview container in which a widget's preview can be displayed. 23 */ 24 val HANDHELD_WIDGET_PREVIEW_SIZES: List<WidgetPreviewContainerSize> = 25 listOf( 26 WidgetPreviewContainerSize(spanX = 4, spanY = 3), 27 WidgetPreviewContainerSize(spanX = 4, spanY = 2), 28 WidgetPreviewContainerSize(spanX = 2, spanY = 3), 29 WidgetPreviewContainerSize(spanX = 2, spanY = 2), 30 WidgetPreviewContainerSize(spanX = 4, spanY = 1), 31 WidgetPreviewContainerSize(spanX = 2, spanY = 1), 32 WidgetPreviewContainerSize(spanX = 1, spanY = 1), 33 ) 34 35 /** 36 * An ordered list of recommended sizes for the preview containers in tablet devices (with larger 37 * grids). 38 * 39 * Size of the preview container in which a widget's preview can be displayed (by scaling the 40 * preview if necessary). 41 */ 42 val TABLET_WIDGET_PREVIEW_SIZES: List<WidgetPreviewContainerSize> = 43 listOf( 44 WidgetPreviewContainerSize(spanX = 3, spanY = 4), 45 WidgetPreviewContainerSize(spanX = 3, spanY = 3), 46 WidgetPreviewContainerSize(spanX = 3, spanY = 2), 47 WidgetPreviewContainerSize(spanX = 2, spanY = 3), 48 WidgetPreviewContainerSize(spanX = 2, spanY = 2), 49 WidgetPreviewContainerSize(spanX = 3, spanY = 1), 50 WidgetPreviewContainerSize(spanX = 2, spanY = 1), 51 WidgetPreviewContainerSize(spanX = 1, spanY = 1), 52 ) 53