title: Ways to refresh a ListView
body: <p>I have an Android app with a ListView. Every row is generated dinamically by SQLIte query results. When users click on a item, the app should refresh the list with the "content" of that item, generated by another SQLite query, and so on.
  I tried to "refresh" the activity creating a new intent and sending it to the same activity. Activity name is ShopActivity</p>
  
  <pre><code>ListView list_content = ((ListView)findViewById(R.id.listforshop));
  list_content.setOnItemClickListener(new OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {              
  
              // ID and text of selected item
              long selected_id = id;
              String selected_name = (String) ((TextView) view.findViewById(R.id.element)).getText();
  
              // New intent
              Intent intent = getIntent();
              intent.setClassName(ShopActivity.this, ShopActivity.class.getName());
  
              // Passing data and refreshing activity
              intent.putExtra("id", selected_id);
              intent.putExtra("name", selected_name);
              intent.putExtra("type", "");
              startActivity(intent);
          }       
  });
  </code></pre>
  
  <p>In this way LogCat shows me a lot of warnings about Bundle. It seems that app cannot start activity.</p>
  
  <p>Is there another way to "refresh" ListView? Is this implementation correct?</p>