J'implémente le défilement automatique sur RecyclerView pour afficher le texte courant en utilisant smoothScrollToPosition. Et ça marche.Comment désactiver l'utilisateur tactile ou défiler sur 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);
}
Le problème est d'arrêter le défilement lorsque l'utilisateur touche le RecyclerView. J'étais déjà essayer this, mais il ne fonctionne toujours pas. Le RecyclerView arrête toujours de défiler.
Une idée à ce sujet? Merci.