You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am showing Hash Tags in a TextView in the RecyclerAdaper.
Problem is that the Click Listener on the adapter Item is not working properly when i am using HashTagHelper library. If the user clicks on TextView's text that is not a Hash Tag then the onClick of the Item is not being called.
Inside onBindView method i am showing the Hash Tag on the TextView:
@Override
public void onBindViewHolder(TaskViewHolder holder, int position) {
...
holder.mTaskTitleTv.setText(mTasksList.get(position).getTitle());
holder.mTextHashTagHelper.handle(holder.mTaskTitleTv);
}
And ViewHolder looks like this:
class TaskViewHolder extends RecyclerView.ViewHolder implements OnClickListener {
...
public TaskViewHolder(View itemView) {
super(itemView);
findViews(itemView);
itemView.setOnClickListener(this);
mTextHashTagHelper = HashTagHelper.Creator.create(mContext.getResources().getColor(R.color.primary), new HashTagHelper.OnHashTagClickListener() {
@Override
public void onHashTagClicked(String hashTag) {
mContext.startActivity(HashTagTaskActivity.createLauncherIntent(mContext, hashTag));
}
});
}
@Override
public void onClick(View v) {
mListner.onItemClick(v, getLayoutPosition());
}
}
The text was updated successfully, but these errors were encountered:
I am showing Hash Tags in a TextView in the RecyclerAdaper.
Problem is that the Click Listener on the adapter Item is not working properly when i am using HashTagHelper library. If the user clicks on TextView's text that is not a Hash Tag then the onClick of the Item is not being called.
Inside onBindView method i am showing the Hash Tag on the TextView:
And ViewHolder looks like this:
The text was updated successfully, but these errors were encountered: