title: Android ListView returning null onItemClick using baseAdapter
body: <p>I created a listView using baseadapter..i am loading the Listview with a JSON data from an API nw i want to get the value of the list item i click and send it back to the data..but it keeps returning null... </p>
  
  <p>this is the BaseAdapter Class</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.HashMap;
  
  import com.nairation.library.ImageLoader;
  
  import android.app.Activity;
  import android.content.Context;
  import android.graphics.Typeface;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.BaseAdapter;
  import android.widget.TextView;
  
  public class SectionListAdapter extends BaseAdapter {
  
      private Activity activity;
      private ArrayList&lt;HashMap&lt;String, String&gt;&gt; data;
      private static LayoutInflater inflater = null;
      public Typeface rf;
      private Context context;
  
      public SectionListAdapter(Activity a, ArrayList&lt;HashMap&lt;String, String&gt;&gt; d, Context c){
          activity = a;
          data = d;
          context = c;
          inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      }
      @Override
      public int getCount() {
          // TODO Auto-generated method stub
          return data.size();
      }
  
      @Override
      public Object getItem(int arg0) {
          // TODO Auto-generated method stub
          return null;
      }
  
      @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
          ViewHolder holder;
          if(convertView == null){
              convertView = inflater.inflate(R.layout.section_list_row, null);
              holder = new ViewHolder();
              holder.topic_name = (TextView) convertView.findViewById(R.id.section_topic_title);
              holder.topic_time = (TextView) convertView.findViewById(R.id.timerelative);
              convertView.setTag(holder);
          }else{
              holder = (ViewHolder) convertView.getTag();
          }
  
          HashMap&lt;String, String&gt; tpl = new HashMap&lt;String, String&gt;();
          tpl = data.get(position);
  
          holder.topic_name.setText(tpl.get(SectionList.TITLE));
          holder.topic_time.setText(tpl.get(SectionList.TIME));
          return convertView;
      }
  
      static class ViewHolder{
          TextView topic_name;
          TextView topic_time;
              public String toString() {
              return "name=" + topic_name;
      }
      }
  }
  </code></pre>
  
  <p>and this is the onItemClick listener that i am using to test if it will work</p>
  
  <pre><code>public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
      // TODO Auto-generated method stub
      Object th = list.getItemAtPosition(position);
      ViewHolder tpi = (ViewHolder) th;
      Toast.makeText(getApplicationContext(), ""+tpi, Toast.LENGTH_SHORT).show();
  }
  </code></pre>
  
  <p>any help guys</p>