Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setHasOptionsMenu(true);
- listAdapter = new ArrayAdapter<BluetoothDevice>(getActivity(), 0, listItems) {
- @Override
- public View getView(int position, View view, ViewGroup parent) {
- BluetoothDevice device = listItems.get(position);
- if (view == null)
- view = getActivity().getLayoutInflater().inflate(R.layout.device_list_item, parent, false);
- TextView text1 = view.findViewById(R.id.text1);
- TextView text2 = view.findViewById(R.id.text2);
- text1.setText(device.getName());
- text2.setText(device.getAddress());
- return view;
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement