Buggy code:
public class PickSongFragment extends Fragment { private static final String TAG = PickSongFragment . class . getCanonicalName ( ) ; private boolean isNewPlaylist ; private RecyclerView mRecyclerView ; private PickSongAdapter mAdapter ; private LayoutManager mLayoutManager ; private FloatingActionButton addSongsButton ; private Context mContext ; private List < Song > allSongs ; private String playlistName ; private Comparator < Song > alphabeticalSongComparator = new Comparator < Song > ( ) { public int compare ( Song s1 , Song s2 ) { } } ; public PickSongFragment ( ) { } public PickSongFragment ( String playlistName , boolean isNewPlaylist ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View view = inflater . inflate ( pick_song_fragment , container , false ) ; mRecyclerView = ( ( RecyclerView ) ( view . findViewById ( songs_view ) ) ) ; addSongsButton = ( ( FloatingActionButton ) ( view . findViewById ( add_songs_to_playlist ) ) ) ; <START_BUG> addSongsButton . setBackgroundTintList ( getResources ( ) . getColorStateList ( colorAccent ) ) ; <END_BUG> addSongsButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( ( mAdapter . selectedSongs . size ( ) ) == 0 ) { Toast . makeText ( mContext , msg_at_least_one_song , LENGTH_LONG ) . show ( ) ; return ; } Playlist newPlaylist = new Playlist ( playlistName ) ; newPlaylist . songsId . clear ( ) ; newPlaylist . songsId . addAll ( mAdapter . selectedSongs ) ; newPlaylist . totalTime = TimeUtil . getInstance ( ) . calculateTotalTimeOfPlaylist ( MusicUtil . getInstance ( ) . getSongsByID ( mContext , newPlaylist . songsId ) ) ; if ( isNewPlaylist ) { DatabaseHelper . getInstance ( mContext ) . addPlaylist ( newPlaylist ) ; } else { DatabaseHelper . getInstance ( mContext ) . updatePlaylist ( newPlaylist ) ; } getActivity ( ) . getSupportFragmentManager ( ) . beginTransaction ( ) . replace ( main_fragment , new AllPlaylistsFragment ( ) ) . commit ( ) ; } } ) ; mRecyclerView . setHasFixedSize ( true ) ; mLayoutManager = new android . support . v7 . widget . LinearLayoutManager ( mContext ) ; mRecyclerView . setLayoutManager ( mLayoutManager ) ; allSongs = MusicUtil . getInstance ( ) . getAllSongs ( mContext ) ; Collections . sort ( allSongs , alphabeticalSongComparator ) ; mAdapter = new PickSongAdapter ( mContext , allSongs , playlistName , isNewPlaylist ) ; mRecyclerView . setAdapter ( mAdapter ) ; mRecyclerView . addItemDecoration ( new itukraine . com . ua . bestmobile . view . RecyclerViewLineDevider ( getResources ( ) ) ) ; mRecyclerView . addOnItemTouchListener ( new RecyclerItemClickListener ( mContext , new PickSongFragment . OnItemClickListener ( ) ) ) ; Toast . makeText ( mContext , msg_select_songs , LENGTH_LONG ) . show ( ) ; return view ; } @ Override public void onAttach ( Context context ) { } private class OnItemClickListener extends RecyclerItemClickListener . SimpleOnItemClickListener { @ Override public void onItemClick ( View childView , int position ) { } } }

Fix:
addSongsButton . setBackgroundTintList ( getResources ( ) . getColorStateList ( colorPrimary ) ) ;