title: Android custom listview
body: <p>hello all 
  i am working on project to display tasks for employee , and these tasks needs to sets the tasks status by employees i handle this by menus to make update stats this is the array adapter </p>
  
  <pre><code>public class MyArrayAdapter extends ArrayAdapter&lt;Task&gt; {
  private static int viewCount = 0;
  
  public MyArrayAdapter(Context context) {
      super(context, R.layout.listview_items, R.id.taskTitle);
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      boolean created = false;
      if (convertView == null) {
  
          created = true;
          viewCount++;
      }
  
      View view = super.getView(position, convertView, parent);
  
      Task task = getItem(position);
      if (task != null) {
          TextView taskTitle = (TextView) view.findViewById(R.id.taskTitle);
          ImageView imageView = (ImageView) view.findViewById(R.id.taskImage);
          TextView taskStatus = (TextView) view.findViewById(R.id.taskStatus);
          TextView taskDate = (TextView) view.findViewById(R.id.taskDate);
  
  
          if (created &amp;&amp; taskTitle != null) {
              taskTitle.setText(task.getTaskTitle());
          }
          if (imageView != null &amp;&amp; task.image != null) {
              imageView.setImageDrawable(task.image);
          }
          if (taskStatus != null &amp;&amp; task.taskStatus != null) {
              taskStatus.setText(task.getTaskStatus());
          }
          if (taskDate != null &amp;&amp; task.taskDate != null) {
              taskDate.setText(task.getTaskDate());
          }
      }
      return view;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>i need to change the textview "taskStatus" , i try to do this</p>
  
  <pre><code>        View v = adapter
              .getView(listView.getSelectedItemPosition(),null , null);
      TextView textView = (TextView) v.findViewById(R.id.taskStatus);
      textView.setText("Started");
      adapter.notifyDataSetChanged();
  </code></pre>
  
  <p>but it dosnt work any one can help me plz</p>