Skip to content
This repository was archived by the owner on Mar 24, 2023. It is now read-only.
This repository was archived by the owner on Mar 24, 2023. It is now read-only.

Only last header is visible #165

@graisVictory

Description

@graisVictory

The issue reproduces periodically without any rules.
onCreateHeaderViewHolder and onBindHeaderViewHolder gets called, but headers are not visible
My code looks like

override fun getHeaderId(position: Int): Long {
    return clients[position].companyName.toUpperCase().get(0).toLong()
}
override fun onCreateHeaderViewHolder(parent: ViewGroup): HeaderHolder {
    val view = LayoutInflater.from(parent.context).inflate(R.layout.item_client_list_header, parent, false)
     return HeaderHolder(view)
}
override fun onBindHeaderViewHolder(holder: HeaderHolder, position: Int) {
    val letter = clients[position].companyName.get(0).toUpperCase().toString()
    holder.bind(letter)
}

and xml:

<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    style="@style/SansMediumBig"
    tools:text="A"
    android:layout_width="match_parent"
    android:padding="@dimen/padding_small"
    android:background="@color/transparent_grey_3"/>

But no matter what font or any other style (even without any style) I'm using - result is the same.
Note that I'm using this recycle view https://github.com/myinnos/AlphabetIndex-Fast-Scroll-RecyclerView
Help me please :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions