title: Listview is not receive notification when adapter data changed in fragment
body: <p>Listview data is not refreshing after array list data and adapter data changed.</p>
  
  <p>My code :</p>
  
  <pre><code>listView = (ListView) detailsView.findViewById(R.id.settings_fragment_list);
  ticketCommentsPriorityData.clear();
  
          for (int i = 0; i &lt;mTicketData.size(); i++) {
              totalTicketsData =mTicketData.get(i).getTotalTicketsData();
  
              for (int j = 0; j &lt;mTicketData.get(i).getTotalTicketsData().size(); j++) {
  
                  if (ticketID.equalsIgnoreCase(mTicketData.get(i).getTotalTicketsData().get(j).getTicketID())) {
                      TicketCommentsPriorityData commentsPriorityData = new TicketCommentsPriorityData();
                      String comment =mTicketData.get(i)
                              .getTotalTicketsData().get(j).getComments();
                      String priority =mTicketData.get(i)
                              .getTotalTicketsData().get(j).getPriority();
                      commentsPriorityData.setComments(comment);
                      commentsPriorityData.setPriority(priority);
  
                      ticketCommentsPriorityData.add(commentsPriorityData);
                  }
              }
          }
      }
      if (ticketCommentsPriorityData != null
              &amp;&amp; ticketCommentsPriorityData.size() &gt; 0) {
  
          detailListAdapter = new TicketDetailListAdapter(getActivity(),
                  R.layout.ticket_list_items, ticketCommentsPriorityData);
  
  
                  listView.setAdapter(detailListAdapter);
  
              }
  </code></pre>
  
  <p>Adapter class </p>
  
  <pre><code>public class TicketDetailListAdapter extends ArrayAdapter&lt;TicketCommentsPriorityData&gt; {
  
  Context context;
  ArrayList&lt;TicketCommentsPriorityData&gt; ticketData;
  LayoutInflater layoutInflater;
  int layoutResourceID;
  
  public TicketDetailListAdapter(Context context,int layoutResourceID,
          ArrayList&lt;TicketCommentsPriorityData&gt; ticketData) {
      // TODO Auto-generated constructor stub
      super(context, layoutResourceID, ticketData);
      this.context = context;
      this.ticketData = ticketData;
      this.layoutResourceID = layoutResourceID;
      layoutInflater = (LayoutInflater) context
              .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  }
  
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      // TODO Auto-generated method stub
      ViewHolder viewHolder = null;
  
      if (convertView == null) {
          viewHolder = new ViewHolder();
          convertView = layoutInflater.inflate(layoutResourceID,
                  parent, false);
  
          viewHolder.ticketID = (TextView) convertView
                  .findViewById(R.id.ticket_id);
          viewHolder.ticketDate = (TextView) convertView
                  .findViewById(R.id.ticket_date);
  
          convertView.setTag(viewHolder);
      } else {
          viewHolder = (ViewHolder) convertView.getTag();
      }
  
      viewHolder.ticketDate.setText(ticketData.get(position).getComments());
      viewHolder.ticketID.setText(ticketData.get(position).getPriority());
  
      return convertView;
  
  }
  
  class ViewHolder {
      TextView ticketID;
      TextView ticketDate;
  }
  }
  </code></pre>
  
  <p>Edit #1 :</p>
  
  <p>OnItemClick :</p>
  
  <pre><code>   mTicketsListView.setOnItemClickListener(new OnItemClickListener() {
  
          @Override
          public void onItemClick(AdapterView&lt;?&gt; adapter, View view,
                  int position, long id) {
              String ticketIDList = mTicketData.get(position).getTicketID();
  
              String createdOn = mTicketData.get(position).getCreatedOn();
              TicketDetailListFragment detailFragment = new TicketDetailListFragment();
              Bundle bundle = new Bundle();
              bundle.putString("ticket_id", ticketIDList);
               FragmentManager fragmentManager = getActivity()
                          .getSupportFragmentManager();
                  FragmentTransaction fragmentTransaction = fragmentManager
                          .beginTransaction();
  
                  fragmentTransaction.replace(R.id.tickets_details_container,
                          detailFragment);
                  fragmentTransaction.commit();
         }
      });
  </code></pre>
  
  <p>my problem was When I tap on parent list item this listview executes and it display details of parent list item.but here if I tap on first item and it's getting first item details and it's displaying correctly.But,if I tap on another items it's displaying always what ever item details comes first into details list it always displaying that data only.</p>
  
  <p>Any one give me a solution. </p>