I am writing an Android application with a main page being a list of categories, and then beside each category there is an edit button.
When edit button is clicked, an entry form with the "category" properties filled up is supposed to be shown.
How to pass the category ID or name to the new created form so that it could load from database the properties of selected category
I have no issue with getting the selected category name, by using the code below:
public String getSelectedItem(View view) {
LinearLayout vwParentRow = (LinearLayout) view.getParent();
TextView child = (TextView) vwParentRow.getChildAt(0);
return (String) child.getText();
}
//edit button clicked
public void editCategoryHandler(View view) {
Intent i = new Intent(this, EntryCategory.class);
startActivity(i);
}