Code example for Spinner

Methods: getAdapter, setSelection

0
         
        if (mDeviceSpinner == null) {
            return; 
        } 
         
        BluetoothDeviceArrayAdapter bluetoothDeviceArrayAdapter = (BluetoothDeviceArrayAdapter) mDeviceSpinner.getAdapter();
 
        for (int i = 0; i < bluetoothDeviceArrayAdapter.getCount(); i++) {
            BluetoothDeviceView deviceView = bluetoothDeviceArrayAdapter.getItem(i);
             
            if (deviceView.getAddress().equals(device.getAddress())) {
                bluetoothDeviceArrayAdapter.remove(deviceView);
                DoLog.d(TAG, "removed: " + deviceView);
                break; 
            } 
             
        } 
        mDeviceSpinner.setSelection(bluetoothDeviceArrayAdapter.getNullPosition());
         
    } 
     
    /** 
     *