Search in sources :

Example 1 with TwoStateImageView

use of com.android.camera.ui.TwoStateImageView in project android_packages_apps_Camera by CyanogenMod.

the class PhotoModule method initializeControlByIntent.

private void initializeControlByIntent() {
    mBlocker = mRootView.findViewById(R.id.blocker);
    mMenu = mRootView.findViewById(R.id.menu);
    mMenu.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            if (mPieRenderer != null) {
                mPieRenderer.showInCenter();
            }
        }
    });
    if (mIsImageCaptureIntent) {
        mActivity.hideSwitcher();
        // Cannot use RotateImageView for "done" and "cancel" button because
        // the tablet layout uses RotateLayout, which cannot be cast to
        // RotateImageView.
        mReviewDoneButton = (Rotatable) mRootView.findViewById(R.id.btn_done);
        mReviewCancelButton = (Rotatable) mRootView.findViewById(R.id.btn_cancel);
        mReviewRetakeButton = mRootView.findViewById(R.id.btn_retake);
        ((View) mReviewCancelButton).setVisibility(View.VISIBLE);
        ((View) mReviewDoneButton).setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                onReviewDoneClicked(v);
            }
        });
        ((View) mReviewCancelButton).setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                onReviewCancelClicked(v);
            }
        });
        mReviewRetakeButton.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                onReviewRetakeClicked(v);
            }
        });
        // layout is not a TwoStateImageView.
        if (mReviewDoneButton instanceof TwoStateImageView) {
            ((TwoStateImageView) mReviewDoneButton).enableFilter(false);
        }
        setupCaptureParams();
    }
}
Also used : TwoStateImageView(com.android.camera.ui.TwoStateImageView) OnClickListener(android.view.View.OnClickListener) TwoStateImageView(com.android.camera.ui.TwoStateImageView) ImageView(android.widget.ImageView) View(android.view.View) TextView(android.widget.TextView) PreviewSurfaceView(com.android.camera.ui.PreviewSurfaceView) FaceView(com.android.camera.ui.FaceView)

Example 2 with TwoStateImageView

use of com.android.camera.ui.TwoStateImageView in project android_packages_apps_Camera by CyanogenMod.

the class VideoModule method initializeControlByIntent.

private void initializeControlByIntent() {
    mBlocker = mRootView.findViewById(R.id.blocker);
    mMenu = mRootView.findViewById(R.id.menu);
    mMenu.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            if (mPieRenderer != null) {
                mPieRenderer.showInCenter();
            }
        }
    });
    mOnScreenIndicators = mRootView.findViewById(R.id.on_screen_indicators);
    mFlashIndicator = (ImageView) mRootView.findViewById(R.id.menu_flash_indicator);
    mExposureIndicator = (ImageView) mOnScreenIndicators.findViewById(R.id.menu_exposure_indicator);
    mHdrIndicator = (ImageView) mOnScreenIndicators.findViewById(R.id.menu_hdr_indicator);
    if (mIsVideoCaptureIntent) {
        mActivity.hideSwitcher();
        // Cannot use RotateImageView for "done" and "cancel" button because
        // the tablet layout uses RotateLayout, which cannot be cast to
        // RotateImageView.
        mReviewDoneButton = (Rotatable) mRootView.findViewById(R.id.btn_done);
        mReviewCancelButton = (Rotatable) mRootView.findViewById(R.id.btn_cancel);
        mReviewPlayButton = (RotateImageView) mRootView.findViewById(R.id.btn_play);
        ((View) mReviewCancelButton).setVisibility(View.VISIBLE);
        ((View) mReviewDoneButton).setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                onReviewDoneClicked(v);
            }
        });
        ((View) mReviewCancelButton).setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                onReviewCancelClicked(v);
            }
        });
        ((View) mReviewPlayButton).setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                onReviewPlayClicked(v);
            }
        });
        // layout is not a TwoStateImageView.
        if (mReviewDoneButton instanceof TwoStateImageView) {
            ((TwoStateImageView) mReviewDoneButton).enableFilter(false);
        }
    }
}
Also used : TwoStateImageView(com.android.camera.ui.TwoStateImageView) OnClickListener(android.view.View.OnClickListener) TwoStateImageView(com.android.camera.ui.TwoStateImageView) ImageView(android.widget.ImageView) View(android.view.View) TextView(android.widget.TextView) PreviewSurfaceView(com.android.camera.ui.PreviewSurfaceView) RotateImageView(com.android.camera.ui.RotateImageView)

Aggregations

View (android.view.View)2 OnClickListener (android.view.View.OnClickListener)2 ImageView (android.widget.ImageView)2 TextView (android.widget.TextView)2 PreviewSurfaceView (com.android.camera.ui.PreviewSurfaceView)2 TwoStateImageView (com.android.camera.ui.TwoStateImageView)2 FaceView (com.android.camera.ui.FaceView)1 RotateImageView (com.android.camera.ui.RotateImageView)1