Code example for BaseAdapter

Methods: getCount

0
							selectedIndex + 1, 0);
				} 
			} 
			return true; 
		case KeyEvent.KEYCODE_DPAD_RIGHT:
			if (selectedIndex < adapter.getCount() - 2) {
				selectedIndex += 1;
				layout.scrollTo(layout.getChildAt(0).getWidth()
						* (selectedIndex + 1), 0);
				if (rightAnim == null) {
					rightAnim = new TranslateAnimation(layout.getChildAt(0)
							.getWidth(), 0, 0, 0);
					rightAnim.setDuration(250);
				} 
				layout.startAnimation(rightAnim);
				// TranslateAnimation anim = new 
				// TranslateAnimation(layout.getChildAt(0).getWidth(),0,0,0); 
				// TranslateAnimation anim = new 
				// TranslateAnimation(0,-layout.getChildAt(0).getWidth(),0,0); 
				// mScroller.startScroll(currentLeft, 0, 
				// getChildAt((selectedIndex+1)).getWidth(), 0, 500);