Code example for AdapterView.OnItemSelectedListener

Methods: onItemSelected

0
			Log.d(TAG, "getWidth ------>" + itemWidth);
			layout.scrollTo(itemWidth*(selectedIndex + 1), 0);
			layout.setVisibility(View.VISIBLE);
			// currentLeft = layout.getChildAt(0).getWidth()*(selectedIndex+1); 
			if (itmeSelectedListener != null) {
				itmeSelectedListener.onItemSelected(null,
						layout.getChildAt((selectedIndex + 1)), index, 0);
			} 
		} else { 
			selectedIndex = 0;
		} 
 
	} 
 
	public int getSelectedItemPosition() { 
		return (selectedIndex + 1);
	} 
 
	@Override 
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		// TODO Auto-generated method stub