Closed XinyueZ closed 9 years ago
Hi XinyueZ,
There is no possibility to perform such cast because this is how Java works
Despite the fact that classes com.software.shell.fab.ActionButton and android.support.design.widget.FloatingActionButton both extends android.view.View class they can't be casted to each other because no one of them is the superclass of the other and vice versa. In this case you'll get java.lang.ClassCastException. Always.
There are no plans to extend the com.software.shell.fab.ActionButton class from android.support.design.widget.FloatingActionButton in order to "make" it work with the new layouts. Furthermore, looking ahead I can say that starting from version 2.0.0 com.software.shell.fab.ActionButton will be extended from android.view.SurfaceView class, which in turn extends the android.view.View class
So for your case you have 2 choices:
nice to know.
Hi,
it should be nice that the new CoordinatorLayout of design-lib gives behavior-relationship to your "fab" instead the FAB of design-lib self. I've tried but it throws exception to cast fab to FAB of design-lib. With the behavior we can move the "fab" up automatically against Snackbar of design-lib.