Code example for Gallery

Methods: getAdapter

0
            trashButton.setOnClickListener(new OnClickListener() {
                        
                        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 ";
                          
                
                       public void onItemSelected(AdapterView parent, View v, int position, long id) {