After modifying the adapter we need to notify with notifyDatasetChanged() like
if(selectedPosition == position){
((TextView)convertView.findViewById(R.id.folderName)).setTextColor(Color.WHITE);
((LinearLayout)convertView.findViewById(R.id.folderLayout)).setBackgroundResource(R.drawable.folders_list_bg_s);
notifyDatasetChanged();
}else{
((TextView)convertView.findViewById(R.id.folderName)).setTextColor(Color.BLACK);
((LinearLayout)convertView.findViewById(R.id.folderLayout)).setBackgroundResource(R.drawable.folders_list_bg);
}