Listview with detailview in android
<p>Help!!</p>

<p>I have a listadapter with a detail view, the problem that I am having is trying to pass values from an xml file to the second view. I can currently do this but only if I show those values in the first view. What I am trying to acheive is on the firstview have just a title and when you click on that title it takes you to a detail view with more information about it. </p>

<p>here is the code that I currently have.</p>

<pre><code>ListAdapter adapter = new SimpleAdapter(this, menuItems,
            R.layout.list_item,
            new String[] { KEY_USERADDRESS, KEY_DATEDUE}, new int[] {
                    R.id.name, R.id.cost });
    setListAdapter(adapter);

    // selecting single ListView item
    ListView lv = getListView();

    lv.setOnItemClickListener(new OnItemClickListener() {

        //@Override
        public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                int position, long id) {
            // getting values from selected ListItem
        //  String name = ((TextView) view.findViewById(R.id.name)).getText().toString();
            String cost = ((TextView)view.findViewById(R.id.cost)).getText().toString();
        //  String description = ((TextView) view.findViewById(R.id.desciption)).getText().toString();

            // Starting new intent
            Intent in = new Intent(getApplicationContext(), SingleMenuItemActivity.class);
            //in.putExtra(KEY_USERADDRESS, name);
            in.putExtra(KEY_DATEDUE, cost);
            //in.putExtra(KEY_DESC, description);
            startActivity(in);

        }
    });
}
</code></pre>

<p>As you can see I have a list adapter,I only want to show the contents of the KEY_USERADDRESS on the first view and when they click it then the rest will be shown. If I add the rest of the Textviews to the listadapter it makes the textviews to big.</p>

<p>Sorry if I am a little confusing, I'm still a rookie when it comes to android development. </p>

<p>Any help will be appreciated!!</p>
