android Gallery

目标:实现横向滚动,获取滚动后位置
galleryX.setCallbackDuringFling(false); //false 为滚动后返回位置 true 为点击时返回位置
galleryX.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
			@Override
			public void onItemSelected(AdapterView<?> parent, View v,int position, long id) {
				Log.e("", "<onItemSelected>position:" + position);
			}

			@Override
			public void onNothingSelected(AdapterView<?> arg0) {
			}
			
		});


你可能感兴趣的:(android)