开发者

In an Android Gallery, how do you listen to a locked in image?

开发者 https://www.devze.com 2023-04-01 06:00 出处:网络
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

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)
    {
    }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消