I have an app with full of custom views. When I try to create a FAB programmatically, it throws an error
Caused by: java.lang.IllegalArgumentExc
Fixed by using theme wrapper. But still I'm surprised about using ContextThemeWrapper
private FloatingActionButton getFAB() {
Context context = new android.support.v7.internal.view.ContextThemeWrapper(getContext(), R.style.AppTheme);
FloatingActionButton fab = new FloatingActionButton(context);
return fab;
}