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; 
		} 
	} 
	 
	@Override 
	public void onItemClick(AdapterView<?> list, View view, int pos, long id) {
		final String name = mDeviceData.get(pos);
		String deviceName;
Experience pair programming with AI  Get Codota for Java