title: android change position of a listview item
body: <p>I'm trying to send an item of a listview that shows an array of telephone numbers to the bottom position of the list with a click on the phonenumber.</p>
  
  <p>My main.xml has the listview plus some buttoms, and R.layout.numberlayout has the layout of the line, with a CheckBox and 2 TextViews (heregoesthenumber and heregoestheid).</p>
  
  <p>I'm trying at my ListNumberAdapter to define a OnClickListener to the TextView heregoesthenumber so everytime you click the number the number does to the buttom of the list. I try to do it with tvn.setOnClickListener, creating a new number exactly the same as the one it was clicked and deleting the original one, but the Checkbox of the ListView looses its</p>
  
  <p>The Main Activity loads the numbers with:
  my_Adapter = new ListNumberAdapter(this, R.layout.numberlayout, numberList);
      numberView.setAdapter(my_Adapter); }</p>
  
  <p>My NumberItem class is the class of the phone numbers, with a boolean, and two strings.</p>
  
  <p>NumberListClass extends ArrayList and it has several methods, not relevants to my problem 
  public class NumberListClass extends ArrayList.</p>
  
  <p>This my main adapter:</p>
  
  <p>public class ListNumberAdapter extends ArrayAdapter{</p>
  
  <pre><code>private NumberListClass numeros;
  private Context context;
  public ListNumberAdapter(Context contexto, int textViewResourceId,
          NumberListClass listaNumeros) {
      super(contexto, textViewResourceId, listaNumeros);
      this.numeros=listaNumeros;
      this.context=contexto;
  }           
  @Override
  public View getView(final int position, View convertview, ViewGroup parent){
      View v = convertview;
      if (v == null){
          LayoutInflater vi = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
           v = vi.inflate(R.layout.numberlayout, null);               
           }      
      final NumberItem numberI = this.numeros.get(position);
      if (numberI != null){
          final CheckBox rb = (CheckBox) v.findViewById(R.id.checkBox);
          TextView tvn=(TextView) v.findViewById(R.id.hereGoesTheNumber);
          TextView tvID=(TextView) v.findViewById(R.id.hereGoesTheId);
          if (rb !=null){rb.setChecked(numberI.getStatus());  }
          if (tvn!=null){ tvn.setText(numberI.getNumber()+numberI.getStatus());}
          if (tvID!=null){tvID.setText(""+numberI.getIfSelected());}                                                                                                              
  
          rb.setOnCheckedChangeListener(new OnCheckedChangeListener(){
              @Override
              public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
                  numberI.changeStatus();
                  notifyDataSetChanged();
                  buttonView.refreshDrawableState();
              }           
          } 
          );
          tvn.setOnClickListener(new OnClickListener (){
  
              @Override
              public void onClick(View v) {
              // WHAT CAN I DO HERE???                    
              }           
          });
      }
      return v;}
  </code></pre>
  
  <p>Please your help !</p>