Android, I am trying to hide a textView when the gridView is scrolling and makes it visible when the user stops scrolling

In the code below, only the method is called onScroll

and the method is onScrollStateChanged

never called, can you help me fix 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");
             }              
        }
    });

      

+3
android onscrolllistener


source to share


No one has answered this question yet

See similar questions:

0
Need to hide text box when scrolling grid

or similar:

565
Making a scrolling TextView on Android
462
ViewPager and Fragments - What's the correct way to store the state of a Fragment?
261
Understanding the setRetainInstance (boolean) snippet
59
Detecting scroll up and scroll down in ListView
2
onScroll is only called when the OnScrollListener is set, but never when you scroll through the list?
2
Stuck with Pagination implementation on Android
0
How to stop vertical scroll events in ViewPager in android
0
Track displays of items in android ListView
0
GridView Pagination but GridView Inside ScrollView and not scrolling found in android
0
what parameters are specified in the method public void onScroll (AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) '



All Articles
Loading...
X
Show
Funny
Dev
Pics