TwoWay View Add empty space automatically

Two way View is a powerful library for configuring component grids using RecyclerView

Below is a screenshot of the problem that we encounter when using this library, so I will find out about resolving this problem,

enter image description here

Reference question

Problem filling # 140

Elevation controls result in blank space # 156

Other issues related to this issue may be

Q: 1 - Changing the settings of a Gridview element when scrolling

Q: 2 -UI clutter while loading images using UniversalImageLoader

+5
source share
1 answer

After months of searching, I found one solution to the above problems.

I will explain step by step

First of all, you should use the code of the TwoWay-View library, not jar.

  • Open the library layout folder.
  • Browse the org.lucasr.twowayview.widget package
  • Open BaseLayoutManager class
  • Go to Line no. 362 Line no. 362
  • You will find the code as

    if (anchorItemPosition > 0 && (refreshingLanes || !restoringLanes)) {

    replace this line with this

     if (anchorItemPosition > 0 && refreshingLanes && !restoringLanes) { 

The above change in the BaseLayoutManager class works for me as a solution to the above problems.

We hope this helps you all TwoWay-View users.

+12
source

Source: https://habr.com/ru/post/982267/


All Articles