use of com.android.camera.ui.CameraRootView in project android_packages_apps_Snap by LineageOS.
the class WideAnglePanoramaUI method createContentView.
private void createContentView() {
LayoutInflater inflator = (LayoutInflater) mActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflator.inflate(R.layout.panorama_module, mRootView, true);
Resources appRes = mActivity.getResources();
mIndicatorColor = appRes.getColor(R.color.pano_progress_indication);
mIndicatorColorFast = appRes.getColor(R.color.pano_progress_indication_fast);
mPreviewCover = mRootView.findViewById(R.id.preview_cover);
mPreviewLayout = mRootView.findViewById(R.id.pano_preview_layout);
mReviewControl = (ViewGroup) mRootView.findViewById(R.id.pano_review_control);
mReviewLayout = mRootView.findViewById(R.id.pano_review_layout);
mReview = (ImageView) mRootView.findViewById(R.id.pano_reviewarea);
mCaptureLayout = (FrameLayout) mRootView.findViewById(R.id.panorama_capture_layout);
mCaptureProgressBar = (PanoProgressBar) mRootView.findViewById(R.id.pano_pan_progress_bar);
mCaptureProgressBar.setBackgroundColor(appRes.getColor(R.color.pano_progress_empty));
mCaptureProgressBar.setDoneColor(appRes.getColor(R.color.pano_progress_done));
mCaptureProgressBar.setIndicatorColor(mIndicatorColor);
mCaptureProgressBar.setIndicatorWidth(20);
mPreviewBorder = mCaptureLayout.findViewById(R.id.pano_preview_area_border);
mLeftIndicator = mRootView.findViewById(R.id.pano_pan_left_indicator);
mRightIndicator = mRootView.findViewById(R.id.pano_pan_right_indicator);
mLeftIndicator.setEnabled(false);
mRightIndicator.setEnabled(false);
mTooFastPrompt = (TextView) mRootView.findViewById(R.id.pano_capture_too_fast_textview);
mCaptureIndicator = mRootView.findViewById(R.id.pano_capture_indicator);
mShutterButton = (ShutterButton) mRootView.findViewById(R.id.shutter_button);
mShutterButton.setImageResource(R.drawable.btn_new_shutter);
mShutterButton.setOnShutterButtonListener(this);
// Hide menu
mRootView.findViewById(R.id.menu).setVisibility(View.GONE);
// TODO: set display change listener properly.
((CameraRootView) mRootView).setDisplayChangeListener(null);
mTextureView = (TextureView) mRootView.findViewById(R.id.pano_preview_textureview);
mTextureView.setSurfaceTextureListener(this);
mTextureView.addOnLayoutChangeListener(this);
mCameraControls = (CameraControls) mRootView.findViewById(R.id.camera_controls);
setPanoramaPreviewView();
mWaitingDialog = (RotateLayout) mRootView.findViewById(R.id.waitingDialog);
mPanoFailedDialog = (RotateLayout) mRootView.findViewById(R.id.pano_dialog_layout);
mPanoFailedButton = (Button) mRootView.findViewById(R.id.pano_dialog_button1);
mDialogHelper = new DialogHelper();
setViews(appRes);
}
Aggregations