makovkastar/FloatingActionButton

Does not work with simple Scroll View

rohan90 opened this issue · 2 comments

I tried your lib, i see the fab in the preview [ so obviously my layout is correct]
I get the exception upon opening the fragment view.

Caused by: java.lang.ClassCastException: android.widget.ScrollView cannot be cast to com.melnykov.fab.ObservableScrollView at com.prontoitlabs.hunter.activity.AddJobsActivity.initFAB(AddJobsActivity.java:113) at com.prontoitlabs.hunter.activity.AddJobsActivity.init(AddJobsActivity.java:107) at com.prontoitlabs.hunter.activity.AddJobsActivity.onCreate(AddJobsActivity.java:100) at this the code being used private void initFAB() { ScrollView scrollView = (ScrollView) findViewById(R.id.sv_add_jobs); fab = (FloatingActionButton) findViewById(R.id.fab_add_jobs); fab.attachToScrollView((ObservableScrollView) scrollView); }

Use ObservableScrollView instead ScrollView