Android : Android, i'm trying to hide a textView when a gridView is scrolled and make it visible once the user stops scrolling

on Monday, September 29, 2014


In the below code only the onScroll method is called and the onScrollStateChanged method is never called, can you please help me fixing this issue:



mGridView.setOnScrollListener(new OnScrollListener() {

@Override
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {

check_text.setVisibility(View.VISIBLE);

System.out.println("Inside onScroll");
}

@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {

if(scrollState == SCROLL_STATE_IDLE)
{
check_text.setVisibility(View.VISIBLE);
System.out.println("Inside onScrollStateChanged");
}
}
});

0 comments:

Post a Comment