title: Listview/ListItem Button not Showing up?
body: <p>I am trying to created a List where each list item has two text views and button, however, I am having trouble seeing the text view text when the button is there. What I am doing is creating a custom list adapter so that I can use the click event of the button. Any ideas why the text in my text views does not show up? The button is there for each list item and if clicked the toast message shows up. </p>
  
  <p>Calling the customer adapter in my activity:</p>
  
  <pre><code>ListAdapter adapter = new CustomSimpleAdapter(getActivity(), tripList,
                          R.layout.list_row, new String[] { TAG_TRIPID, TAG_TRIPNAME,     TAG_TRIPSUMMARY, TAG_DISTANCE },
                          new int[] { R.id.pid, R.id.title, R.id.trip_sum, R.id.trip_dist });
  
   // updating listview
   ((ListView) lv.findViewById(R.id.list)).setAdapter(adapter);
  </code></pre>
  
  <p>My custom adapter:</p>
  
  <pre><code>private class CustomSimpleAdapter extends SimpleAdapter implements OnClickListener  {
      private final Activity context;
      private Button btnAddExpense = null;
  
      public CustomSimpleAdapter(Activity context, List&lt;? extends Map&lt;String, ?&gt;&gt; data, int resource, String[] from, int[] to) {
          super(context, tripList, resource, from, to);
          this.context = getActivity();
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          LayoutInflater inflater = context.getLayoutInflater();
          View rowView = inflater.inflate(R.layout.list_row, parent, false);
          btnAddExpense = (Button) rowView.findViewById(R.id.btn_addExpense);
          //btnAddExpense.setTag(position);
  
          btnAddExpense.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  Toast.makeText(context, "List Item Clicked.",
                             Toast.LENGTH_LONG).show();
              }
          });
          return rowView;          
      }
  
      @Override
      public void onClick(View v) {
          // TODO Auto-generated method stub
  
      }
  }
  </code></pre>
  
  <p>The list_row xml:
      
      </p>
  
  <pre><code>&lt;TextView
      android:id="@+id/pid"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:visibility="gone" /&gt;
  
  &lt;TextView
      android:id="@+id/title"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:typeface="sans"
      android:textSize="15sp"
      android:textColor="@drawable/list_item_text"
      android:textStyle="bold"/&gt;
  
  &lt;TextView
      android:id="@+id/trip_sum"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_below="@id/title"
      android:textSize="12sp"
      android:textColor="@drawable/list_item_text"
      android:layout_marginTop="1dip" /&gt;
  
  &lt;TextView
      android:id="@+id/trip_dist"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignTop="@id/title"
      android:layout_toLeftOf="@+id/btn_addExpense"
      android:textSize="24sp"
      android:textColor="@drawable/list_item_text"
      android:textStyle="bold"/&gt;
  
  &lt;Button
      android:id="@+id/btn_addExpense"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBottom="@+id/trip_sum"
      android:layout_alignRight="@+id/trip_sum"
      android:text="+Expense" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Thanks for the help!</p>
  
  <p>EDIT: 
  Before I created the custom adapter I was using the SimpleAdapter and the data showed up fine.</p>
  
  <pre><code>ListAdapter adapter = new SimpleAdapter(getActivity(), tripList,
                          R.layout.list_row, new String[] { TAG_TRIPID, TAG_TRIPNAME, TAG_TRIPSUMMARY, TAG_DISTANCE },
                          new int[] { R.id.pid, R.id.title, R.id.trip_sum, R.id.trip_dist });
  </code></pre>