android-recyclerview - 项目单击不起作用,而在 recyclerview 中自动滚动
问题描述
我使用以下代码自动滚动水平回收器视图。
private final Runnable SCROLLING_RUNNABLE = new Runnable() {
@Override
public void run() {
recyclerViewDate.smoothScrollBy(pixelsToMove, 0);
setDateValue();
mHandler.postDelayed(this, duration);
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_center_item_finder);
txtSelected=(TextView)findViewById(R.id.txtSelected);
getRecyclerviewData();
mHandler.postDelayed(SCROLLING_RUNNABLE, 100);
}
但我无法在滚动时单击回收站项目。找到了这个解决方案,创建了一个自定义的 recyclerview。Android - 滚动后无法单击 RecyclerView 中的项目 仍然单击不起作用。
解决方案
推荐阅读
- asp.net - 如何忽略包含 aspx 中的错误“未声明 var。由于其保护级别,它可能无法访问。”
- java - java.lang.ClassCastException: java.math.BigInteger 不能用 sql 和 java 转换为 java.lang.Long Spring
- teamsql - 为什么团队 sql 运行查询这么慢?
- ionic-view - 离子图标的条件外观
- javascript - 在 componentDidCatch 之后重定向用户的方法
- javascript - 如何在 HightCharts 钟形曲线上呈现特定的数据点标记?
- bash - Bash 输出杀死用法
- forms - 在添加模式下使用表单
- sql - 结合创建的表和 Listagg 查询
- java - ServiceUnavailableRetryStrategy中的retryRequest方法是怎么调用的?