Open tolya199178 opened 8 years ago
I already set the attribute "clickToClose" of SwipeLayout to true. I can close the bottom view by clicking on SurfaceView and it's fine. My only trouble is for onItemClick event is firing when swipe right to close.
try to set the onClickListener on the surface view like so
swipeLayout.getSurfaceView().setOnClickListener( ...
@desnyki Thank you a ton. this solved my problem :+1:
I had the same issue. I tried the same. it works fine. But I also want the onItemClick() to be fired when it is clicked. This doesnt happen when I set swipeLayout.setOnClickListener(new OnClickListener{
@Override
public void onClick(View v){
}
});
Please help.
@sahana-tib I faced this issue and this is my work around:
mProductWrapper.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { } });
Hope this help!
@namchuai your work-around works. Thanks
@namchuai, step 1 is unnecessary.
I swipe left to show bottom view and it's working fine. Then when I'm trying to swipe right to hide bottom view, the item click event is fired and thus onItemClick event is called in my activity. I want onItemClick() is not called if bottom view is shown. Anyone who has a solution, please let me know.