Android : how to enable/disable scrolling in collapsing toolbar layout programmatically

    CollapsingToolbarLayout toolbar_layout;
        toolbar_layout=findViewById(R.id.toolbar_layout);

 AppBarLayout.LayoutParams p = (AppBarLayout.LayoutParams) toolbar_layout.getLayoutParams();
        p.setScrollFlags(0);
        toolbar_layout.setLayoutParams(p);

No comments:

Post a Comment

Popular Posts