In my main activity I have a list view of database items, when i long press on an item in a list it opens into a new activity that allows you to edit the item clicked.
The problem I'm having is that i'm not quite sure how to get the information of the rowID/primary key to the other activity java class so that i can start manipulating in that class e.g. set the initial values as the current row information and then being able to apply an update to it.
Incase this is of use to helping you help me here is what i have to take me to my new activity
dialog.setNegativeButton(R.string.dialogEdit,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
long id = idInDB;
Intent intent = new Intent(MainActivity.this, edit_expense.class);
startActivity(intent);
}
});
0 comments:
Post a Comment