Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The lib has weird issues in RecyclerView #33

Open
chihung93 opened this issue Feb 14, 2022 · 0 comments
Open

The lib has weird issues in RecyclerView #33

chihung93 opened this issue Feb 14, 2022 · 0 comments

Comments

@chihung93
Copy link

Please complete the following information:

  • Library Version: 1.0.7
  • Affected Device(s) : Samsung Galaxy Note 10 with Android 12.0

Describe the Bug:
I have attached the reproduced video and code

XRecorder_15022022_002646.mp4

/*
 * Copyright (C) 2019 skydoves
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.skydoves.expandablelayoutdemo

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.skydoves.expandablelayoutdemo.databinding.ActivityCustomBinding
import kotlin.random.Random

class CustomActivity : AppCompatActivity() {

  private val adapter = ParentAdapter()

  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)

    val binding = ActivityCustomBinding.inflate(layoutInflater)
    setContentView(binding.root)

    binding.recyclerView.adapter = adapter
    for (i in 0..100){
      val child = ArrayList<String>()
      val randomValues = List(10) { Random.nextInt(0, 50) }
      randomValues.forEach {
        child.add("child $i")
      }
      adapter.addSectionItem(
        SectionItem("Title $i", R.color.colorPrimary, child)
      )
    }

  }
}

Expected Behavior:

As demo sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant