0

I have floating action button in my fragment. how can I enable or disable checkboxes inside the recyclerview by using this floating action button. Both recycler view and floating action button are inside the same fragment activity. Also, I need to hide this floating action button upon recyclerview scrolling.

1 Answers1

0

For example if you want oo add something to your layout in fragment you can do something like this:

LinearLayout linearLayoutFragment = (LinearLayout)findViewById(R.id.fragmentLayout);
Button button = (Button)findViewById(R.id.buttonid);
button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
           //if you want to add something to your Linearlayout fragment
           //remove all views for example
           linearLayoutFragment.removeAllViews();
        }
 });
Zaboj Campula
  • 3,155
  • 3
  • 24
  • 42