Using BottomSheetBehavior with a inner CoordinatorLayout

I have finally released my implementation. Find it on Github or directly from jcenter: compile ‘com.otaliastudios:bottomsheetcoordinatorlayout:1.0.0’ All you have to do is using BottomSheetCoordinatorLayout as the root view for your bottom sheet. It will automatically inflate a working behavior for itself, so don’t worry about it. I have been using this for a long time … Read more

Disable the touch events for all the views

Here is a function for disabling all child views of some view group: /** * Enables/Disables all child views in a view group. * * @param viewGroup the view group * @param enabled <code>true</code> to enable, <code>false</code> to disable * the views. */ public static void enableDisableViewGroup(ViewGroup viewGroup, boolean enabled) { int childCount = viewGroup.getChildCount(); … Read more

How to handle Touch Events on a Fragment?

I’m not sure if I understood your problem, but I will try to answer this. So to get touch events on fragment I would do this: -in your fragment onCreateView: View view = inflater.inflate(R.layout.fragment_test, container, false); view.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { if(event.getAction() == MotionEvent.ACTION_MOVE){ //do something } return true; } … Read more