Code example for Gallery

Methods: setAdapter, setSelection

0
			// ���¼������� 
			cursor = this.getContentResolver().query(STORAGE_URI, null, null,
					null, "_id DESC"); 
 
			adpter = new GalleryAdapter(this, cursor);
			gv.setAdapter(adpter);
			gv.setSelection(0);
			break; 
		} 
		} 
	} 
 
	public boolean onMenuItemSelected(int featureId, MenuItem item) {
		// TODO Auto-generated method stub 
		switch (item.getItemId()) {
		case MENU_ABOUT:
			new AlertDialog.Builder(CameraDemo.this)
					.setTitle("����")
					.setMessage("������һ��֧����phone��")
					.setNegativeButton("ȡ��",
							new DialogInterface.OnClickListener() {