Changing FloatingActionButton source:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
floatingActionButton.setImageDrawable(getResources().getDrawable(R.drawable.ic_full_sad, context.getTheme()));
} else {
floatingActionButton.setImageDrawable(getResources().getDrawable(R.drawable.ic_full_sad));
}
This can be replaced by following code from the support library instead:
floatingActionButton.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.ic_full_sad));
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…