title: Custom adapter notifyDataSetChanged not working
body: <p>I tried to call <code>adapter.notifydatasetchanged()</code> but it doesn't work at all. How can I refresh the list?</p>
  
  <pre><code>public class CarListMenu extends Fragment{
  
  
      public CarListAdapter adapter= null;
      static ArrayList&lt;carArrayItem&gt; CarPriceItem ;
      private static ListView CarListView;
  
  
  
       public View onCreateView(LayoutInflater inflater, ViewGroup container,
                  Bundle savedInstanceState) {
              CarListView = (ListView) inflater.inflate(R.layout.car_price_list_menu, container, false);
  
              CarPriceItem.add(new carArrayItem("No","No","NO","NO" , "NO"));
  
              adapter = new CarListAdapter(getActivity().getApplicationContext(),CarPriceItem);
              CarListView.setAdapter(adapter);
              return CarListView;
          }
  
       public static class App extends Application{
  
              private static Context mContext;
  
              @Override
              public void onCreate() {
                  super.onCreate();
                  mContext = this;
              }
  
              public static Context getContext(){
                  return mContext;
              }
          }
  
  
  public static void change(ArrayList&lt;HashMap&lt;String, String&gt;&gt; resultback){
  
  
  
      CarPriceItem = new ArrayList&lt;carArrayItem&gt;();
      //CarPriceItem.clear();
  
      for (int i = 0; i &lt; (resultback.size()); i+=6) {
  
          CarPriceItem.add(new carArrayItem((resultback.get(i).get("table").toString()),
                  (resultback.get(i+1).get("table").toString()),
                  (resultback.get(i+2).get("table").toString()), 
                  (resultback.get(i+3).get("table").toString()), 
                  (resultback.get(i+5).get("table").toString())));
  
          }
  
      CarListAdapter adapter =  new CarListAdapter(App.getContext(),CarPriceItem);
      adapter.notifyDataSetChanged();
  
      } 
  
  
  
  
  }
  class CarListAdapter extends BaseAdapter {
  
      private Context context;
      private ArrayList&lt;carArrayItem&gt; CarPriceItem = new ArrayList&lt;carArrayItem&gt;();
  
      public CarListAdapter(Context context, ArrayList&lt;carArrayItem&gt; CarPriceItem){
          this.context = context;
          this.CarPriceItem = CarPriceItem;
  
      }
  
  
  
      @Override
      public int getCount() {
          return CarPriceItem.size();
      }
  
      @Override
      public Object getItem(int position) {       
          return CarPriceItem.get(position);
      }
  
      @Override
      public long getItemId(int position) {
          return position;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          if (convertView == null) {
              LayoutInflater mInflater = (LayoutInflater)
                      context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
              convertView = mInflater.inflate(R.layout.car_list_item, null);
          }
  
  
          TextView CarmodelName = (TextView) convertView.findViewById(R.id.CarModel);
          TextView MarketP = (TextView) convertView.findViewById(R.id.MarketPriceData);
          TextView ResellerP = (TextView) convertView.findViewById(R.id.ResellerPricesData);
          TextView Description = (TextView) convertView.findViewById(R.id.DescriptionData);
          TextView LastUpdate = (TextView) convertView.findViewById(R.id.LastUpdateData);
  
  
          CarmodelName.setText(CarPriceItem.get(position).getCarname());
          MarketP.setText(CarPriceItem.get(position).getMarketPrice());
          ResellerP.setText(CarPriceItem.get(position).getResellerPrice());
          Description.setText(CarPriceItem.get(position).getDescription());
          LastUpdate.setText(CarPriceItem.get(position).getUpdateTime());
  
  
  
          return convertView;
      }
  
  
  }
  </code></pre>