【问题标题】:How to use SnapHelper with RecyclerView如何将 SnapHelper 与 RecyclerView 一起使用
【发布时间】:2017-02-06 19:20:18
【问题描述】:

我被 RecyclerView 的 SnapHelper 卡住了。我很困惑将它与垂直中的 LayoutManager 一起使用

我已经在水平中使用过类似

mLayoutManager = new LinearLayoutManager(mActivity);
mRecyclerView.setLayoutManager(mLayoutManager);
SnapHelper snapHelper = new LinearSnapHelper();
snapHelper.attachToRecyclerView(mRecyclerView);

【问题讨论】:

    标签: java android android-recyclerview layout-manager vertical-scroll


    【解决方案1】:

    我发现这个解决方案可能会有所帮助。 https://rubensousa.github.io/2016/08/recyclerviewsnap

    如您所见,他说要确保您设置布局管理器的方向。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-18
      • 1970-01-01
      相关资源
      最近更新 更多