ExpandableListView-RecylerChildItems
ExpandableListView-RecylerChildItems copied to clipboard
OnItemclicklistener
@sivailango Trying to implement OnItemclick. Currently app crashes onItemclick event
i used this library...its VERY easy to use
on child item click not working....help me out please ...
@123hidash were you able to fix this! .
How to implement OnItemclick ?
What I did is, created a transparent overlay button in the call. And for which I have added the onClickListener.
Whenever the button gets the tap, I call a public method of main activity which will take care of any further required actions.
It may not be the nicest one but I made it work.
Code snippet is below for your reference. This goes inside onBindViewHolder of MobileAdapter.java
Button dummyClickButton = (Button) holder.dummyButtonForClick; dummyClickButton.setTag(position); dummyClickButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Log.d("POSITION", view.getTag()+""); ((HomeActivity)context).setSubCategory((Integer)view.getTag()); } });