title: Extending ListActivity android.R.id.list
body: <p>I am creating a Calculator. When calculations are made, I need them displayed, then clickable so I can delete individual figures. I followed <a href="http://androidzoo.wordpress.com/2011/10/28/working-with-listview-in-android-customize-listview-add-item-via-a-button-click-and-also-clickable-each-button-in-each-row/" rel="nofollow noreferrer">this</a> tutorial, and got this far. The only problem is when I run it, I get a FC and my logcat says this:</p>
  
  <pre><code>Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
  </code></pre>
  
  <p>All of my research say to change my id to <code>android.R.id.list</code>. I tried this, but still getting the same error. </p>
  
  <p>Here is my code:</p>
  
  <p><strong>CustomAdapter.java</strong> <em>(extends ArrayAdapter)</em></p>
  
  <pre><code>private final Context context;
  private final ArrayList&lt;Calculations&gt; items = null;
  private final LayoutInflater inflater;
  public CustomListAdapter(Context context, int textViewResourceId, ArrayList&lt;Calculations&gt;items){
      super(context, textViewResourceId, items);
      this.context = context;
      this.items = items;
      this.inflater = LayoutInflater.from(context);
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      final View v = convertView != null 
                         ? convertView
                         : infalter.inflate(R.layout.list_item, parent, false);
  
      final Calculations c = items.get(position);
      final TextView type = (TextView) v.findViewById(R.id.tvType);
      final TextView figure = (TextView) v.findViewById(R.id.tvFullFigure);
      final TextView amount = (TextView) v.findViewById(R.id.tvAmount);
      type.setText(c.getType());
      figure.setText(c.getFigure());
      amount.setText(c.getFigureAmount());
  
      return v;
  
  }
  </code></pre>
  
  <p><strong>acitivty_main.xml</strong></p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:paddingTop="15dp"
              android:paddingLeft="20dp"
              android:paddingRight="20dp"
              android:background="@drawable/concret_back"
      &gt;
  
  &lt;!--Code remove for brevity--&gt;
  
      &lt;ListView
          android:id="@+id/android.R.id.list"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I have had this problem with another app I have done and never found a solution. So I though I would ask why do I keep getting the <code>Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'</code> error? </p>
  
  <p>Thanks for any input. </p>