Open zelin opened 9 years ago
Do you mean you want to set a click method on it ? Maybe you can try #68 as this issue said.
@cymcsg StickeryHeader attached view "R.layout.listview_header_profile" has multiple Views that needs to be clicked and a couple of TextViews. I can't access any. I don't want to put click on just entire headerView.
Any fix to this issue?
@zelin Not any update on this right now.
Struggling with this too
I am trying to add a StickyHeaderView along with Parallex header using item decorator,
The Layout is added and it works fine however no views inside headerView are accessible
Here is the standard code
@Override public long generateHeaderId(int position) { if (getItem(position) != null) return getItem(position).id; else return -1; }
@Override public HeaderViewHolder onCreateHeaderViewHolder(ViewGroup viewGroup) { View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.listview_header_profile, viewGroup, false); // initializing views and then let's say setting onClicks, setText to textViews nothing seems to work strangly. LinearLayout nationLayout = (LinearLayout) view.findViewById(R.id.nationsLayout);
nationLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { moodLayoutClick.moodLayoutClicked(Constants.MOOD_TYPE_NATION); } });
@Override public void onBindHeaderViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
public class HeaderViewHolder extends RecyclerView.ViewHolder { protected TextViewWithFont nationBtn; //
Tried initializing here too. Doesn't work } }