diff options
author | codeworkx <codeworkx@cyanogenmod.org> | 2016-01-09 17:47:24 +0100 |
---|---|---|
committer | codeworkx <codeworkx@cyanogenmod.org> | 2016-01-09 17:52:46 +0100 |
commit | d9be7be66fbffb54978ff672a6fd3587fdad56ee (patch) | |
tree | 78a96fbabc9a3075766f7f3a340ef3d7af587377 /src/com/android/camera | |
parent | 532497bda601ebd761144d53fb4c7dd47c4fbdfd (diff) | |
download | android_packages_apps_Snap-d9be7be66fbffb54978ff672a6fd3587fdad56ee.tar.gz android_packages_apps_Snap-d9be7be66fbffb54978ff672a6fd3587fdad56ee.tar.bz2 android_packages_apps_Snap-d9be7be66fbffb54978ff672a6fd3587fdad56ee.zip |
Snap: FilmStripView must exist before loading photo/video modules
Change-Id: Ife58cd6cde57f38343c73518d6561036a13dbf06
Diffstat (limited to 'src/com/android/camera')
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index fe9f8cf32..65d0eaf03 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -1454,12 +1454,20 @@ public class CameraActivity extends Activity } } + setContentView(R.layout.camera_filmstrip); + + mAboveFilmstripControlLayout = + (FrameLayout) findViewById(R.id.camera_above_filmstrip_layout); + mAboveFilmstripControlLayout.setFitsSystemWindows(true); + + mFilmStripView = (FilmStripView) findViewById(R.id.filmstrip_view); + mFilmStripView.setViewGap( + getResources().getDimensionPixelSize(R.dimen.camera_film_strip_gap)); + mOrientationListener = new MyOrientationEventListener(this); setModuleFromIndex(moduleIndex); mCurrentModule.init(this, mCameraModuleRootView); - setContentView(R.layout.camera_filmstrip); - mActionBar = getActionBar(); mActionBar.addOnMenuVisibilityListener(this); @@ -1469,9 +1477,6 @@ public class CameraActivity extends Activity mMainHandler = new MainHandler(getMainLooper()); - mAboveFilmstripControlLayout = - (FrameLayout) findViewById(R.id.camera_above_filmstrip_layout); - mAboveFilmstripControlLayout.setFitsSystemWindows(true); // Hide action bar first since we are in full screen mode first, and // switch the system UI to lights-out mode. this.setSystemBarsVisibility(false); @@ -1486,17 +1491,16 @@ public class CameraActivity extends Activity mCameraPreviewData = new CameraPreviewData(rootLayout, FilmStripView.ImageData.SIZE_FULL, FilmStripView.ImageData.SIZE_FULL); + // Put a CameraPreviewData at the first position. mWrappedDataAdapter = new FixedFirstDataAdapter( new CameraDataAdapter(new ColorDrawable( getResources().getColor(R.color.photo_placeholder))), mCameraPreviewData); - mFilmStripView = (FilmStripView) findViewById(R.id.filmstrip_view); - mFilmStripView.setViewGap( - getResources().getDimensionPixelSize(R.dimen.camera_film_strip_gap)); mPanoramaViewHelper = new PanoramaViewHelper(this); mPanoramaViewHelper.onCreate(); mFilmStripView.setPanoramaViewHelper(mPanoramaViewHelper); + // Set up the camera preview first so the preview shows up ASAP. mFilmStripView.setListener(mFilmStripListener); |