Je veux juste savoir que je peux savoir si la liste a commencé à défiler et quand le défilement s'arrête.Android: Get Scroll of listview
Mon extrait de code est comme ci-dessous:
listView.setOnScrollListener(new OnScrollListener() {
public void onScrollStateChanged(AbsListView arg0, int arg1) {
// TODO Auto-generated method stub
/*View toolbar = arg0.findViewById(R.id.toolbar);
// Creating the expand animation for the item
ExpandAnimation expandAni = new ExpandAnimation(toolbar, 500);*/
// Start the animation on the toolbar
}
public void onScroll(AbsListView arg0, int arg1, int arg2, int arg3) {
// TODO Auto-generated method stub
if(arg1!=0){
toolbar.setVisibility(View.GONE);
}
else{
}
}
});
lire la documentation onScrollListener. Même s'il n'y a pas d'images, ce n'est pas si long. – njzk2