I am making the same activity as in android to set the wallpaper from the given gallery.
I have a gallery with 50 images when gallery stop scrolling a center image comes i want to show that image in imageview.
g.setOnItemSelectedListener(new OnItemSelectedListener()
{
public void onItemSelected(AdapterView<?> arg0, View arg1,
final int arg2, long arg3)
{
imageView.setImageResource(mImageIds[arg2]);
}
public void onNothingSelected(AdapterView<?> arg0)
{
Toast.makeText(WallpaperThemeChoose.this, "NOTHING",
Toast.LENGTH_SHORT).show();
}
});
while scrolling the imageview set every image which are passing in gallery. So pause for sometime and then start i mean it stick for sometime while scrolling
I don’t want to show all images which are passing but only that image which comes to center when scrolling stop.
Got the solution by setting
g.setCallbackDuringFling(false);