1/*
2 * Copyright (C) 2010 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 */
16package com.android.quicksearchbox.ui;
17
18import android.view.View;
19import android.widget.AbsListView;
20
21/**
22 * Interface for suggestions list UI views.
23 */
24public interface SuggestionsListView<A> {
25
26    /**
27     * See {@link View#setOnKeyListener}.
28     */
29    void setOnKeyListener(View.OnKeyListener l);
30
31    /**
32     * See {@link AbsListView#setOnScrollListener}.
33     */
34    void setOnScrollListener(AbsListView.OnScrollListener l);
35
36    /**
37     * See {@link View#setOnFocusChangeListener}.
38     */
39    void setOnFocusChangeListener(View.OnFocusChangeListener l);
40
41    /**
42     * See {@link View#setVisibility}.
43     */
44    void setVisibility(int visibility);
45
46    /**
47     * Sets the adapter for the list. See {@link AbsListView#setAdapter}
48     */
49    void setSuggestionsAdapter(SuggestionsAdapter<A> adapter);
50
51    /**
52     * Gets the adapter for the list.
53     */
54    SuggestionsAdapter<A> getSuggestionsAdapter();
55
56    /**
57     * Gets the ID of the currently selected item.
58     */
59    long getSelectedItemId();
60
61}
62