1/* 2 * Copyright (C) 2006 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 17package android.widget; 18 19/** 20 * Extended {@link Adapter} that is the bridge between a {@link ListView} 21 * and the data that backs the list. Frequently that data comes from a Cursor, 22 * but that is not 23 * required. The ListView can display any data provided that it is wrapped in a 24 * ListAdapter. 25 */ 26public interface ListAdapter extends Adapter { 27 28 /** 29 * Are all items in this ListAdapter enabled? 30 * If yes it means all items are selectable and clickable. 31 * 32 * @return True if all items are enabled 33 */ 34 public boolean areAllItemsEnabled(); 35 36 /** 37 * Returns true if the item at the specified position is not a separator. 38 * (A separator is a non-selectable, non-clickable item). 39 * 40 * @param position Index of the item 41 * @return True if the item is not a separator 42 */ 43 boolean isEnabled(int position); 44} 45