You know the position of the list of the currently selected item, you have a button outside the ListView that should initiate some actions on this item, and you do not just create ListView strings (or some child views in each row), right?
. getItem (int position) , , , . getView (int position) , findViewById (int id) TextView.
, ListView getAdapter().
int dbRowId;
Adapter adapter = myListView.getAdapter();
MyCustomDataClass data = (MyCustomDataClass) adapter.getItem(selectedRow);
dbRowId = data.getDatabaseRowId();
dbRowId = data.rowId;
View listViewRow = adapter.getView(selectedRow);
TextView dbRowView = (TextView) listViewRow.findViewById(R.id.rowid);
String dbRowAsString = dbRowView.getText().toString();
dbRowId = Integer.parseInt(dbRowAsString);
, ListView, , . .