title: android how to add ProgressBar to listView fetching data from parse?
body: <p>I've looked everywhere for a tutorial, but couldn't find a tutorial that uses <code>ProgressBar</code>; they all use <code>ProgressDialog</code> which is simple but not in my need. So, can anyone give me an example?
  Here's how I am setting the adapter:</p>
  
  <pre><code> setContentView(R.layout.activity_main);
          Toolbar myToolbar = (Toolbar) findViewById(R.id.my_toolbar);
          setSupportActionBar(myToolbar);
          list = (ListView) findViewById(R.id.list);
          adapter = new mainAdapter(this);
          list.setAdapter(adapter);
  </code></pre>
  
  <p><code>ParseQueryAdapter</code> <code>getItemView()</code> class:</p>
  
  <pre><code>@Override
      public View getItemView(Campaign campaign, View v, ViewGroup parent) {
  
          if (v == null) {
              v = View.inflate(getContext(), R.layout.list_single,null);
          }
  
          super.getItemView(campaign, v, parent);
  
          ParseImageView mealImage = (ParseImageView) v.findViewById(android.R.id.icon);
          ParseFile photoFile = campaign.getImage();
          if (photoFile != null) {
              mealImage.setParseFile(campaign.getImage());
              mealImage.loadInBackground(new GetDataCallback() {
                  @Override
                  public void done(byte[] data, ParseException e) {
                      // nothing to do
                  }
              });
          }
          else{
  
          }
  
          TextView titleTextView = (TextView) v.findViewById(R.id.title);
          titleTextView.setText(campaign.getTitle());
          TextView descriptionTextView = (TextView) v
                  .findViewById(R.id.description);
          descriptionTextView.setText(campaign.getDescription());
          return v;
  
      }
  </code></pre>
  
  <p>Would be a pleasure if you didn't -1 without thinking. Thanks :)</p>