双向查看自动添加空 [英] TwoWay View Add empty space automatically

查看:175
本文介绍了双向查看自动添加空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

双向视图是一个功能强大的库自定义组件的网格中使用 RecyclerView

下面是我们的,而使用这个库所面临问题的截图,所以我找出这个问题的解决,

参考问

填充问题#140

项目改变空#的高度结果156

与此相关的问题可能是其他问题

问:1 - GridView的项目变更后的滚动订单

问:2 -UI乱而载入图像UniversalImageLoader

解决方案

寻找了几个月后,我发现了上述问题的解决方案。

我要解释一步一步

首先让你必须使用$ C $ 双向-视图库不是罐子。

  
      
  1. 开启布局库文件夹。
  2.   
  3. 在浏览包 org.lucasr.twowayview.widget
  4.   
  5. 开启 BaseLayoutManager
  6.   
  7. 跳转到 行没有。 362
  8.   
  9. 您会发现code为

         

    如果(anchorItemPosition> 0安培;&安培;!(refreshingLanes || restoringLanes))   {

         

    本替换该行

     如果(anchorItemPosition> 0安培;&安培; refreshingLanes和放大器;&安培;!restoringLanes){
     

  10.   

以上变化 BaseLayoutManager类的工作对我来说,作为解决上述问题。

希望这会帮助你的所有的双向-查看用户。

Two way View is a powerful library to customize grid of components a using RecyclerView

Below is the screenshot of problem that we are facing while using this library,so i find out the resolution of that problem,

Reference Question

Padding problem #140

Items changing height results in empty space #156

Other questions related to this issue could be

Q:1 - Gridview items changing order upon scrolling

Q:2 -UI mess while loading image with UniversalImageLoader

解决方案

After searching a couple of months ,I found one solution for above issues.

I am going to explain step by step

First of all keep you must use code of TwoWay-View library not jar.

  1. Open layout folder of library.
  2. Browse the package org.lucasr.twowayview.widget
  3. Open BaseLayoutManager class
  4. Jump to Line no. 362
  5. You will found code as

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

    replace this line by this one

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

Above change in BaseLayoutManager class work for me as a solution to above mentioned issues.

Hope this will help you all TwoWay-View users.

这篇关于双向查看自动添加空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆