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 option 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;
}
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.