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 48 // This layout creates square thumbnail image (currently 3 column) 49 public static final String THUMBNAIL = "thumbnail"; 50 51 // This layout contains an icon and slice 52 public static final String ICON_SLICE = "slice"; 53 54 // Widget bitmap preview 55 public static final String WIDGET_PREVIEW = "widget_preview"; 56 57 // Live widget search result 58 public static final String WIDGET_LIVE = "widget_live"; 59 60 // Layout type used to display people tiles using shortcut info 61 public static final String PEOPLE_TILE = "people_tile"; 62 63 // text based header to group various layouts in low confidence section of the results. 64 public static final String TEXT_HEADER = "header"; 65 66 // horizontal bar to be inserted between fallback search results and low confidence section 67 public static final String DIVIDER = "divider"; 68 69 // horizontal bar to be inserted between fallback search results and low confidence section 70 public static final String EMPTY_DIVIDER = "empty_divider"; 71 72 // layout representing quick calculations 73 public static final String CALCULATOR = "calculator"; 74 } 75