title: custom ListView adapter not showing the text
body: <p>i have a <code>ListView</code> and i populate the list from <code>&lt;string-array name="list_items"&gt;</code> in <code>values/strings.xml</code>, and as shown below, I created my cutomed <code>Array Adapter</code> that extends <code>BaseAdapter</code>. I expected when I ran the App. to see the <code>listView</code> is populated as te following according to the below mentioed <code>item.xml</code>:</p>
  
  <p>1-an icon "the same icon for the entire list items", 
  2-the strings i retrieved from the <code>resources</code> folder, 
  3-and the word "description" "this word should be the same for the entire list items".</p>
  
  <p>But what happens is, when i run the App. step number two is not showing at all. what I am missing in the code.</p>
  
  <p><strong>MyAdapter</strong>:</p>
  
  <pre><code> public class MyAdapter extends BaseAdapter {
  
      private Context context;
      private ArrayList&lt;String&gt; mArraList;
  
      public MyAdapter(Context context, ArrayList&lt;String&gt; mArraList) {
          this.context = context;
          this.mArraList = mArraList;
      }
  
      @Override
      public int getCount() {
          // TODO Auto-generated method stub
          return this.mArraList.size();
      }
  
      @Override
      public Object getItem(int position) {
          // TODO Auto-generated method stub
          return this.mArraList.get(position);
      }
  
      @Override
      public long getItemId(int position) {
          // TODO Auto-generated method stub
          return position;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          // TODO Auto-generated method stub
          if (convertView == null) {
              LayoutInflater mInflater = (LayoutInflater)
                      context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
              convertView = mInflater.inflate(R.layout.item, null);
          }
  
           ImageView imgIcon = (ImageView) convertView.findViewById(R.id.icon);
           TextView txtTitle = (TextView) convertView.findViewById(R.id.secondLine);
           TextView txtCount = (TextView) convertView.findViewById(R.id.firstLine);
  
           for (int i = 0; i &lt; MyAdapter.this.getCount(); i++) {
               txtCount.setText(MyAdapter.this.getItem(i).toString()); 
           }
          return convertView;
      }
  
  }
  </code></pre>
  
  <p><strong>item.xml</strong>:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="?android:attr/listPreferredItemHeight"
  android:padding="6dip" &gt;
  
  &lt;ImageView
      android:id="@+id/icon"
      android:layout_width="wrap_content"
      android:layout_height="fill_parent"
      android:layout_alignParentBottom="true"
      android:layout_alignParentTop="true"
      android:layout_marginRight="6dip"
      android:contentDescription="TODO"
      android:src="@drawable/ic_launcher" /&gt;
  
  &lt;TextView
      android:id="@+id/secondLine"
      android:layout_width="fill_parent"
      android:layout_height="26dip"
      android:layout_alignParentBottom="true"
      android:layout_alignParentRight="true"
      android:layout_toRightOf="@id/icon"
      android:ellipsize="marquee"
      android:singleLine="true"
      android:text="Description"
      android:textSize="12sp" /&gt;
  
  &lt;TextView
      android:id="@+id/firstLine"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_above="@id/secondLine"
      android:layout_alignParentRight="true"
      android:layout_alignParentTop="true"
      android:layout_alignWithParentIfMissing="true"
      android:layout_toRightOf="@id/icon"
      android:gravity="center_vertical"
      android:text="Example application"
      android:textSize="16sp" /&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>MainActivity</strong>:</p>
  
  <pre><code> @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main_activity_layout);
  
          mListView = (ListView) findViewById(R.id.listview);
          listItems = getResources().getStringArray(R.array.list_items);
          mArraList = new ArrayList&lt;String&gt;();
  
          for (int i = 0; i &lt; listItems.length; i++) {
              mArraList.add(listItems[i]);
          }
  
          adapter = new MyAdapter(getApplicationContext(), mArraList);
          mListView.setAdapter(adapter);
      }
  }
  </code></pre>