Android Trick - make gridview unscrollable

Damon
How to make Android Gridview unscrollable.

I found one solution is :

GridView.setOnTouchListener(new OnTouchListener(){
    public boolean onTouch(View v, MotionEvent event) {
        return event.getAction() == MotionEvent.ACTION_MOVE;
    }

});

the code means consume the gridview's ACTION_MOVE touch event.

Comments

Popular posts from this blog

A wired issue of MediaPlayer on Android

How to add pre-receive hook in GitLab

Problem when using Jackson json parser in Android.