Friday, 11 January 2019

How to disable the touch of Activity when we launch a fragment inside that (here if fragment background is transparent )

Inside activity where we r calling the Fragment there we have to write following code before calling the fragment:-
mFrameLayout is the FrameLayout which we keep inside activity layout.

mFrameLayout.setVisibility(View.VISIBLE);
mFrameLayout.setOnTouchListener(new View.OnTouchListener() {
    @Override    public boolean onTouch(View v, MotionEvent event) {
        return true;// return true
    }
});

No comments:

Post a Comment