Code example for Gallery

Methods: requestFocus, setAdapter, setSelection

0
        	if(urlManager == null)return;
        	definationStrings = urlManager.getExitQualityList();
        	mCurrentQuality   = urlManager.getCurrentQuality();
        	Log.d(TAG, "definationStrings size:" + definationStrings.size() + 
        			" definationStrings-->" + definationStrings.toString());
        	gallery.setAdapter(new QuaSubAdapter(definationStrings));
        	gallery.setSelection(definationStrings.indexOf(URLManager.getQualityString(mCurrentQuality)));
        	gallery.requestFocus();
        } 
        public boolean isChange(){ 
        	return gallery.getSelectedItemPosition() == (definationStrings.indexOf(URLManager.getQualityString(mCurrentQuality)));
        } 
	} 
	private class SUB {		 
		private Gallery    gallery;
		private ArrayList<String> definationStrings = new ArrayList<String>();
		public SUB(){ 
			gallery = (Gallery) findViewById(R.id.gallery_zimu);
		}; 
        public void setURLManager(URLManager urlManager){
        	if(urlManager == null)return;