public class BluetoothDeviceListAdapter
extends android.widget.ArrayAdapter<android.bluetooth.BluetoothDevice>
| Constructor and Description |
|---|
BluetoothDeviceListAdapter(android.content.Context context,
int resource,
java.util.List<android.bluetooth.BluetoothDevice> objects)
Constructor for
BluetoothDeviceListAdapter. |
| Modifier and Type | Method and Description |
|---|---|
int |
getCount() |
android.bluetooth.BluetoothDevice |
getItem(int position)
Returns a
BluetoothDevice given a postion in the list. |
long |
getItemId(int position) |
android.view.View |
getView(int position,
android.view.View convertView,
android.view.ViewGroup parent) |
add, addAll, addAll, clear, createFromResource, getContext, getDropDownView, getDropDownViewTheme, getFilter, getPosition, insert, notifyDataSetChanged, remove, setDropDownViewResource, setDropDownViewTheme, setNotifyOnChange, sortareAllItemsEnabled, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserverpublic BluetoothDeviceListAdapter(android.content.Context context,
int resource,
java.util.List<android.bluetooth.BluetoothDevice> objects)
BluetoothDeviceListAdapter. Creates a new array adapter for the device dialog for when scanning
for a new device.context - the context of the UI activity.resource - resource id for the list item layout.objects - list of BluetoothDevices to display in the list.public int getCount()
getCount in interface android.widget.AdaptergetCount in class android.widget.ArrayAdapter<android.bluetooth.BluetoothDevice>public long getItemId(int position)
getItemId in interface android.widget.AdaptergetItemId in class android.widget.ArrayAdapter<android.bluetooth.BluetoothDevice>public android.bluetooth.BluetoothDevice getItem(int position)
BluetoothDevice given a postion in the list.getItem in interface android.widget.AdaptergetItem in class android.widget.ArrayAdapter<android.bluetooth.BluetoothDevice>position - the position of the device in the list. This is 0 based.BluetoothDevicepublic android.view.View getView(int position,
android.view.View convertView,
android.view.ViewGroup parent)
getView in interface android.widget.AdaptergetView in class android.widget.ArrayAdapter<android.bluetooth.BluetoothDevice>