title: How to refresh the listview in tab activity?
body: <p>Hi i have a tab activity which show a list of items<code>(ListView)</code>. This <code>listview</code> has a button in each row. I am handling this button <code>clickListener</code> in my custom adapter class which extends the <code>BaseAdapter</code> class. Now what i want is when i click on this button the item should be remove from the <code>listview</code> and <code>listview</code> should get a refresh. How to do this?</p>
  
  <p>ok I think my code can explain it </p>
  
  <pre><code> public View getView(final int position,  View convertView, ViewGroup parent)
  {
      ViewHolder holder;
  
      final ActivityManager am = (ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE);
  
      if(convertView==null) 
      {
               convertView = mInflater.inflate(R.layout.list_item, null);
               holder = new ViewHolder();
   //     holder.appSize = (TextView)convertView.findViewById(R.id.app_size);
  
                holder.appName = (TextView)convertView.findViewById(R.id.app_name);
                holder.app_icon = (ImageView)convertView.findViewById(R.id.app_icon);
                holder.button = (Button)convertView.findViewById(R.id.uninstall);
                if(kill_OR_uninstall)
                {
  
                         holder.button.setOnClickListener(new OnClickListener() {
  
                              public void onClick(View v) {
  
                         Intent intent = new Intent(Intent.ACTION_DELETE);
                         intent.setData(Uri.parse("package:"+package_names.get(position)));
                         context.startActivity(intent);
  
  
  
                       }
                      });
                }
  
                else
                {
                         holder.button.setText("End");
                         holder.button.setOnClickListener(new OnClickListener() {
  
                          public void onClick(View v) {
                          am.restartPackage(package_names.get(position));
  
                          }
                      });
  
                }
  
        convertView.setTag(holder);
  
      }
  
      else
      {       
                       holder = (ViewHolder) convertView.getTag();   
      }
  
       holder.appName.setText((String)app_details.get(position).get(APP_NAME));
       holder.app_icon.setImageDrawable((Drawable)app_details.get(position).get(APP_ICON));
    //   holder.appSize.setText(app_details.get(position).get(APP_SIZE)+ " KB");
  
  
  
       return convertView;
  </code></pre>
  
  <p>} </p>