At the last line of my below code I would like to understand the function (this, R.layout.device_name)
as device_name layout doesn't exist on my code. I also would like to know where I can define it.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//BTAdapter
BTAdapter = BluetoothAdapter.getDefaultAdapter();
//SwitchBT
Switch switch_OnOff = (Switch)findViewById(R.id.switchbt);
switch_OnOff.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
//ListView / ArrayAdapter
pairedDevicesAdapter = newArrayAdapter<String>(this,R.layout.device_name)