0
我在RecyclerView上实现了自动滚动,使用smoothScrollToPosition显示运行文本。它正在工作。如何禁用用户在recyclerview(autoscroll)Android上触摸或滚动?
public void autoScroll() {
final int speedScroll = 1000;
runnableRunningAds = new Runnable() {
@Override
public void run() {
rcRunningTextAds.smoothScrollToPosition(runningTextAdsAdapter.getItemCount());
blnRunningAdsIsRunning = true;
handlerRunningAds.postDelayed(this, speedScroll);
}
};
handlerRunningAds.postDelayed(runnableRunningAds, speedScroll);
}
问题是当用户触摸RecyclerView时,它停止滚动。我已经尝试this,但它仍然无法正常工作。 RecyclerView仍停止滚动。
有什么想法吗? 谢谢。