Fixed NullPointerException in PreviewFragment.

The problem is that sometimes setUserVisibleHint is getting called before onCreateView.