In an Android Gallery, how do you listen to a locked in image?
When I flip thro开发者_StackOverflow社区ugh an Android Gallery, it moves to an image and the focus locks in on it. Which event should I listen to for the image lock in?
Try below code
mCoverFlow.setOnItemSelectedListener(new OnItemSelectedListener()
{
@Override
public void onItemSelected(AdapterView<?> arg0, View v, int position, long arg3)
{
// position will give you the locked item
}
@Override
public void onNothingSelected(AdapterView<?> arg0)
{
}
});
精彩评论