Open ashishsharma30 opened 8 years ago
do you resolve this issue?
AsymmetricRecyclerView is implementing
public void fireOnItemClick(int index, View v)
method that is empty. There is only one way to solve this, extending the class and redefine it or make a PR with a different implementation.
yes. thank you so much
2017-04-15 2:49 GMT+07:00 Jorge notifications@github.com:
AsymmetricRecyclerView is implementing
public void fireOnItemClick(int index, View v)
method that is empty. There is only one way to solve this, extending the class and redefine it or make a PR with a different implementation.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/felipecsl/AsymmetricGridView/issues/59#issuecomment-294223343, or mute the thread https://github.com/notifications/unsubscribe-auth/ARMfXKrN5WXb9sVg5HjxJAleZr9eX9jzks5rv83JgaJpZM4JY1xQ .
You can also checkout the code and include "library" module in your project. Then modify the method directly in the AsymmetricRecyclerView. That is what I did. Maybe in a future I will make a PR.
yes, i did that,too. =)))
2017-04-15 16:59 GMT+07:00 Jorge notifications@github.com:
You can also checkout the code and include "library" module in your project. Then modify the method directly in the AsymmetricRecyclerView. That is what I did. Maybe in a future I will make a PR.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/felipecsl/AsymmetricGridView/issues/59#issuecomment-294283758, or mute the thread https://github.com/notifications/unsubscribe-auth/ARMfXAeGm5ID36mD5ay6NFGJl5Yr6vaSks5rwJTzgaJpZM4JY1xQ .
Hi, can you please tell me how to apply set on item click listener on AsymmetricRecyclerView.
Hi @krishnapatel086
If this was not fixed (not sure) you need to redefine the method by yourself, please check comments above. You need to implement it either importing the project as module and changing the code in it or extending the class and overriding the method implementation.
what can i change inside method?
You need to define there the behaviour you would expect. Currently it is empty, so nothing will happen.
but i need to open new activity after click so what i hv to do?
@krishnapatel086 try this
1st Step : implements AdapterView.OnItemClickListener
2nd Step : listView.setOnItemClickListener(this);
3rd Step :
@Override public void onItemClick(@NonNull AdapterView<?> parent, @NonNull View view, int position, long id) { Toast.makeText(this, "Item " + position + " clicked", Toast.LENGTH_SHORT).show(); }
i use recyclerview
@krishnapatel086 in ViewHolder
try to in bind method.
public void bind(final ContentItem item, final OnItemClickListener listener) { itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { listener.onItemClick(item); } }); }
i use recyclerView.fireOnItemClick(rowItem.rowItem.getIndex(), v); now what i have to do?
您的邮件我已收到。我会尽快阅读。非常感谢您。
Hi, can you please tell me how to apply set on item click listener on AsymmetricRecyclerView.