-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot click on item without dragging #40
Comments
Hey, You need to pass true to the super class in the viewholder to make it drag on longpress. `public class ViewHolder extends DragItemAdapter.ViewHolder {
}` |
Hi, I tried that also but the super method doesn't take the 3rd argument. This is my ViewHolder: `public class ViewHolder extends DragItemAdapter<Pair<Long, ConvertedChecklist>, ViewHolder>.ViewHolder{
|
Oh, it turns out I've passed Thank you for pointing out what I'm doing wrong :D |
In the latest version of the lib I did some refactor, so now you do pass it in the viewholder, before you did it in the adapter constructor. Glad to help :) |
Hi,
I have an
EditText
inside the drag item. I want to edit thatEditText
when I click on it and drag the item with a long-click but it's currently seems impossible to me. It starts to drag when I click it (without having to "long-click").I tried to force
onItemLongClicked
(of the viewholder) to returnfalse
ortrue
but neither works. I also tried setting the grabhandle to the container layout of the whole item (the current grabhandle is the EditText) but then I can't always drag (maybe because the child views almost fill the container), but even if I can drag the item, it's "click to drag" not "long-click to drag".Am I missing something here? How can I accomplish it?
Thank you.
The text was updated successfully, but these errors were encountered: