【问题标题】:Android Recyclerview Horizontal is not displaying if i open keyboard and closed如果我打开键盘并关闭,Android Recyclerview Horizo​​ntal 不显示
【发布时间】:2017-03-08 10:29:02
【问题描述】:

我在我的活动中使用recyclerview,首先我使用垂直滚动视图它工作正常,现在我改为水平滚动视图。如果我打开键盘视图正在清除,它可以在没有打开键盘的情况下正常工作。所以我检查了我的代码,问题出在我的水平滚动视图中。我不知道如何解决这个问题,有人可以帮我解决这个问题。请在我打开键盘并关闭我的 UI 后找到我的代码和图像附件。

        recyclerView.setHasFixedSize(true);
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
        recyclerView.setLayoutManager(linearLayoutManager);
        addExpenseImageAdapter = new AddExpenseImageAdapter(AddExpenseActivity.this, imageBeanList);
        addExpenseImageAdapter.onImageAddClick(this);
        recyclerView.setAdapter(addExpenseImageAdapter);

【问题讨论】:

    标签: android keyboard android-recyclerview horizontal-scrolling


    【解决方案1】:

    您必须在 setAdapter 到 recyclerView 之后设置布局管理器并检查 imageBeanList 的大小。

    【讨论】:

      【解决方案2】:

      recyclerview 提供静态高度

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-03-30
        • 2021-10-22
        • 2022-01-04
        • 2016-12-09
        • 1970-01-01
        • 2016-12-28
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多