Note that there are some explanatory texts on larger screens.

plurals
  1. POHidden Column on ListView - Android
    primarykey
    data
    text
    <p>I have several columns from a Database I need to show on a ListView. I also have the ID of the record, but would like to hide that column. </p> <p>Is there a way to create columns in the XML for the ListView and maybe hide it there?</p> <p>UPDATE:</p> <p>I tried the suggestion from the link in answer 1. This is the code I cam up with but it dumps on the last line. </p> <p>Does anyone know what I am doing wrong?</p> <pre><code> package com.mvw; import java.util.ArrayList; import java.util.HashMap; import android.app.ListActivity; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.SimpleAdapter; public class test extends ListActivity { SimpleAdapter mSchedule; ArrayAdapter&lt;String&gt; adapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setContentView(R.layout.test); ListView list = (ListView) findViewById(R.id.list); ArrayList&lt;HashMap&lt;String, String&gt;&gt; mylist = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;(); HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;(); map.put("train", "101"); map.put("from", "6:30 AM"); map.put("to", "7:40 AM"); mylist.add(map); map = new HashMap&lt;String, String&gt;(); map.put("train", "103(x)"); map.put("from", "6:35 AM"); map.put("to", "7:45 AM"); mylist.add(map); mSchedule = new SimpleAdapter(this, mylist, R.layout.row, new String[] {"train", "from", "to"}, new int[] {R.id.TRAIN_CELL, R.id.FROM_CELL, R.id.TO_CELL}); list.setAdapter(mSchedule); &lt;--- DUMPS HERE } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload