开发者

Remove image from gallery on LongClick event

I'm new in android, here i'm using Gallery to show images in my application, working fine but the problem is now I want show some opti开发者_JAVA百科on like remove images from gallery on the LongClick event of the user.


This answer may help you.

Use code to set onLongClickListener on Gallery object

gal.setOnLongClickListener(new OnLongClickListener() 
{

    @Override
    public boolean onLongClick(View v) 
    {
        // Remove element from array and call adapter.notifysetdatachanged() to update
        // Gallery

        return false;
    }
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜