Code example for Gallery

Methods: getAdapter

0
			 
			@Override 
			public void onClick(View v) {
				if ( selected_rid >= 0 ){
					mDB.delete("ARCHIVE", "id=" + selected_rid, null);
					((BaseAdapter)g.getAdapter()).notifyDataSetChanged();
				} 
				 
			} 
		}); 
	     
	    g = (Gallery) findViewById(R.id.gallery);
	    g.setAdapter(new ArchiveEntryAdapter(this));
	     
	    g.setOnItemSelectedListener(new OnItemSelectedListener() {
 
	    	private static final String Q_GET = "SELECT creation_date, color_name, color_value, id FROM archive ORDER BY creation_date LIMIT 1 OFFSET ";
			  
	    	 
			@Override 
			public void onItemSelected(AdapterView parent, View v, int position, long id) {