@Override
        public void setUserVisibleHint(boolean isVisibleToUser) {
            super.setUserVisibleHint(isVisibleToUser);

            if (cameraPreview != null) {
                if (isVisibleToUser) {
                    cameraPreview.resume();
                } else {
                    cameraPreview.pauseAndWait();
                }
            }
        }
Returns a new instance of this fragment for the given section
number.
sample/src/main/java/example/zxing/TabbedScanning.java