There is a ListView which is located in the fragment and is filled from the SQLite database. By clicking on the list item, it is necessary to transfer the corresponding _id from the database to another fragment in order to build a new ListView there using the resulting id in the database query. The plug-in occurred with the transfer of the id to the new fragment by clicking on the element.
Tell me, please, further actions, or poke a finger where you can read info on this issue.
The code is attached. Thanks in advance for any help
public class FragmentCategoriesSecond extends Fragment implements View.OnClickListener { ListView userList; DatabaseHelper databaseHelper; SQLiteDatabase db; Cursor userCursor; SimpleCursorAdapter userAdapter; public FragmentCategoriesSecond() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreate(savedInstanceState); View v = inflater.inflate(R.layout.categories_second, null); userList = (ListView)v.findViewById(R.id.list_item); userList.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { **???????** } }); databaseHelper = new DatabaseHelper(getActivity()); databaseHelper.create_db(); return v; } db = databaseHelper.open();