There are two tables in the same database tab1
and tab2
. C tab1
data is displayed in the listView
, so let's say the headers, how to do that by clicking on the header in the listView
, from tab2, data are displayed comparing the num
column?
Example: id = 2 to output from the num column all drains of value 2, id = 3 to output from the num column all drains of value 3
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { //как реализовать? } });
The table looks like this
tab1 ------------- id|name |some| ------------- 1 |one |text| 2 |two |text| 3 |three|text| 4 |four |text| tab2 ------------------------- id|name |value |num | ------------------------- 1 |one |some |2 | 2 |two |text |2 | 3 |three|some |3 | 4 |four |think |3 | 5 |five |some |3 | 6 |six |think |1 |