Code example for GridView

Methods: invalidateViews

0
		 
    	TextView tmp = elements.get( toChangePos );
		elements.set( toChangePos, elements.get( currentPos ) );
		elements.set( currentPos, tmp );
		// Refresh the game view 
		gridview.invalidateViews();
    } 
    /* 
     * Click event handler class for the buttons in the array 'elements' 
     * @author : Gustavo Pantuza 
     * @since : 27.08.2011 
     */ 
	class MyOnClickListener implements OnClickListener {
  		// On Click function 
		public void onClick(View v) {
			// Call to the arrange function that try to switch positions 
			arrange( v );
		} 
	} 
	// Generic class to handle the contruction of the buttons grid view 
	public class ButtonGridAdapter extends BaseAdapter {