1 /*
2  * Copyright (C) 2015 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5  * in compliance with the License. You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software distributed under the License
10  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11  * or implied. See the License for the specific language governing permissions and limitations under
12  * the License.
13  */
14 package android.support.v17.leanback.widget;
15 
16 import android.support.v7.widget.RecyclerView;
17 
18 /**
19  * Optional interface that implemented by {@link RecyclerView.Adapter} to
20  * query {@link FacetProvider} for a given type within Adapter.  Note that
21  * {@link RecyclerView.ViewHolder} may also implement {@link FacetProvider} which
22  * has a higher priority than the one returned from the FacetProviderAdapter.
23  */
24 public interface FacetProviderAdapter {
25 
26     /**
27      * Queries {@link FacetProvider} for a given type within Adapter.
28      * @param type        type of the item.
29      * @return Facet provider for the type.
30      */
getFacetProvider(int type)31     public FacetProvider getFacetProvider(int type);
32 
33 }
34