Code example for Button

Methods: setIdsetText

0
                mButton.setText("Clear list");
                mButton.setId(BUTTON_CLEAR);
                break; 
 
            case BUTTON_CLEAR:
                mButton.setText("Scan for Devices");
                mButton.setId(BUTTON_FIND);
                mMessageView.setText("Bluetooth is turned on");
 
                mDeviceData.clear();
                mDeviceData.add("No Devices");
                mDelegate.notifyDataSetChanged();
                break; 
        } 
    } 
 
    public void onItemClick(AdapterView<?> list, View view, int pos, long id) {
        final String name = mDeviceData.get(pos);
        String deviceName;
 
Stop searching for code, let great code find you!  Add Codota to your java IDE