1 /* 2 * Copyright (C) 2020 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.app.search; 18 19 /** 20 * Constants to be used with {@link SearchTarget}. 21 */ 22 public class LayoutType { 23 24 // ------ 25 // | icon | 26 // ------ 27 // text 28 public static final String ICON_SINGLE_VERTICAL_TEXT = "icon"; 29 30 // Below three layouts (to be deprecated) and two layouts render 31 // {@link SearchTarget}s in following layout. 32 // ------ ------ ------ 33 // | | title |(opt)| |(opt)| 34 // | icon | subtitle (optional) | icon| | icon| 35 // ------ ------ ------ 36 @Deprecated 37 public static final String ICON_SINGLE_HORIZONTAL_TEXT = "icon_text_row"; 38 @Deprecated 39 public static final String ICON_DOUBLE_HORIZONTAL_TEXT = "icon_texts_row"; 40 @Deprecated 41 public static final String ICON_DOUBLE_HORIZONTAL_TEXT_BUTTON = "icon_texts_button"; 42 43 // will replace ICON_DOUBLE_* ICON_SINGLE_* layouts 44 public static final String ICON_HORIZONTAL_TEXT = "icon_row"; 45 public static final String HORIZONTAL_MEDIUM_TEXT = "icon_row_medium"; 46 public static final String SMALL_ICON_HORIZONTAL_TEXT = "short_icon_row"; 47 public static final String SMALL_ICON_HORIZONTAL_TEXT_THUMBNAIL = "short_icon_row_thumbnail"; 48 49 // This layout creates square thumbnail image (currently 3 column) 50 public static final String THUMBNAIL = "thumbnail"; 51 52 // This layout contains an icon and slice 53 public static final String ICON_SLICE = "slice"; 54 55 // Widget bitmap preview 56 public static final String WIDGET_PREVIEW = "widget_preview"; 57 58 // Live widget search result 59 public static final String WIDGET_LIVE = "widget_live"; 60 61 // Layout type used to display people tiles using shortcut info 62 public static final String PEOPLE_TILE = "people_tile"; 63 64 // text based header to group various layouts in low confidence section of the results. 65 public static final String TEXT_HEADER = "header"; 66 67 // horizontal bar to be inserted between fallback search results and low confidence section 68 public static final String DIVIDER = "divider"; 69 70 // horizontal bar to be inserted between fallback search results and low confidence section 71 public static final String EMPTY_DIVIDER = "empty_divider"; 72 73 // layout representing quick calculations 74 public static final String CALCULATOR = "calculator"; 75 } 76