Support for setting view mode in fragment.