Fragments don't inherit from View and thus don't have a set background method.
Any easy fix is to just [grab the root view][1] of fragment and set its background
fragment.getView().setBackgroundColor(Color.WHITE);
[1]: http://developer.android.com/reference/android/app/Fragment.html#getView%28%29