• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 EXTRA_TALL_ICON_ROW = "extra_tall_icon_row";
47     public static final String SMALL_ICON_HORIZONTAL_TEXT = "short_icon_row";
48     public static final String SMALL_ICON_HORIZONTAL_TEXT_THUMBNAIL = "short_icon_row_thumbnail";
49 
50     // This layout contains a series of icon results (currently up to 4 per row).
51     // The container does not support stretching for its children, and can only contain
52     // {@link #ICON_SINGLE_VERTICAL_TEXT} layout types.
53     public static final String ICON_CONTAINER = "icon_container";
54 
55     // This layout contains a series of thumbnails (currently up to 3 per row).
56     // The container supports stretching for its children, and can only contain {@link #THUMBNAIL}
57     // layout types.
58     public static final String THUMBNAIL_CONTAINER = "thumbnail_container";
59 
60     // This layout creates a container for people grouping
61     // Only available above version code 2
62     public static final String BIG_ICON_MEDIUM_HEIGHT_ROW = "big_icon_medium_row";
63 
64     // This layout creates square thumbnail image (currently 3 column)
65     public static final String THUMBNAIL = "thumbnail";
66 
67     // This layout contains an icon and slice
68     public static final String ICON_SLICE = "slice";
69 
70     // Widget bitmap preview
71     public static final String WIDGET_PREVIEW = "widget_preview";
72 
73     // Live widget search result
74     public static final String WIDGET_LIVE = "widget_live";
75 
76     // Layout type used to display people tiles using shortcut info
77     public static final String PEOPLE_TILE = "people_tile";
78 
79     // Deprecated
80     // text based header to group various layouts in low confidence section of the results.
81     public static final String TEXT_HEADER = "header";
82 
83     // horizontal bar to be inserted between fallback search results and low confidence section
84     public static final String EMPTY_DIVIDER = "empty_divider";
85 
86     // layout representing quick calculations
87     public static final String CALCULATOR = "calculator";
88 
89     // From version code 4, if TEXT_HEADER_ROW is used, no need to insert this on-device
90     // section header.
91     public static final String SECTION_HEADER = "section_header";
92 
93     // layout for a tall card with header and image, and no icon.
94     public static final String TALL_CARD_WITH_IMAGE_NO_ICON = "tall_card_with_image_no_icon";
95 
96     // Layout for a text header
97     // Available for SearchUiManager proxy service to use above version code 3
98     public static final String TEXT_HEADER_ROW = "text_header_row";
99 
100     // Layout for a quick settings tile
101     public static final String QS_TILE = "qs_tile";
102 
103     // Placeholder for web suggest.
104     public static final String PLACEHOLDER = "placeholder";
105 
106     // Placeholder for rich answer cards.
107     // Only available on or above version code 3.
108     public static final String RICHANSWER_PLACEHOLDER = "richanswer_placeholder";
109 
110 }
111