OPENCV cross compilation contains ffmpeg

2023-01-02   ES  

The recently -made thing involved the problem of blocking gridView shielding sliding.

1. Simple ListView and GridView shield

Two controls to block the sliding method of sliding are the same. They use the incident distribution mechanism. There is just a gridView here, which is used as an example. It’s the code, it’s relatively simple

public class MyGridview extends GridView {

    public MyGridview(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public MyGridview(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyGridview(Context context) {
        super(context);
    }
    
    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        //The following sentence is the key        if (ev.getAction()==MotionEvent.ACTION_MOVE) {

            return true;

        }
        return super.dispatchTouchEvent(ev);
    }

}

I see that there are more complicated incident distribution, because the method here can solve my problem, so I did not list others.

2, ListView nested GridView or scrollView nestle, nested

Since both ListView and GridView have inherited from scrollView, some conflicts will occur when nested. Here we solve this problem from the height of the new control control.

public class MyGridview extends GridView {

    public MyGridview(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public MyGridview(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyGridview(Context context) {
        super(context);
    }
    
    /**
     * Settings do not roll     */
    public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
                MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);

    }

}

source

Related Posts

Caddy & GRPC (3) Add a reverse proxy plug -in to Caddy

java four: optimization and use of Intellij IDEA 2021

PANDAS data load liuyan

java Learning Diary 8: The implementation of the file upload tool class and the server send pictures to the client Sleepat

OPENCV cross compilation contains ffmpeg

Random Posts

From entry to the soil: [SEED-LAB] MD5 collision test | MD5Collgen Experiment | Linux | Ubuntu | MD5 COLLISION Attack Lab | Detailed explanation

Use Ado+Access for database operation

GESTURE gesture notes

Announcement on closing the credit card recharge channel to the Alipay account

Android database ContentProvider packaging principle L