How to pass a value when creating a new entry form
<p>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.</p>

<p>When edit button is clicked, an entry form with the "category" properties filled up is supposed to be shown.</p>

<p>How to pass the category ID or name to the new created form so that it could load from database the properties of selected <code>category</code></p>

<p>I have no issue with getting the selected category name, by using the code below:</p>

<pre><code>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);
}
</code></pre>
