Search in sources :

Example 11 with RotateLayout

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

the class VideoModule method setOrientationIndicator.

private void setOrientationIndicator(int orientation, boolean animation) {
    Rotatable[] indicators = { mBgLearningMessageRotater, mReviewDoneButton, mReviewPlayButton };
    for (Rotatable indicator : indicators) {
        if (indicator != null)
            indicator.setOrientation(orientation, animation);
    }
    if (mGestures != null) {
        mGestures.setOrientation(orientation);
    }
    // icon.
    if (mReviewCancelButton instanceof RotateLayout) {
        mReviewCancelButton.setOrientation(orientation, animation);
    }
    // the width is not enough.
    if (mLabelsLinearLayout != null) {
        if (((orientation / 90) & 1) == 0) {
            mLabelsLinearLayout.setOrientation(LinearLayout.VERTICAL);
        } else {
            mLabelsLinearLayout.setOrientation(LinearLayout.HORIZONTAL);
        }
    }
    mRecordingTimeRect.setOrientation(0, animation);
}
Also used : Rotatable(com.android.camera.ui.Rotatable) RotateLayout(com.android.camera.ui.RotateLayout)

Aggregations

RotateLayout (com.android.camera.ui.RotateLayout)11 ViewGroup (android.view.ViewGroup)9 Point (android.graphics.Point)6 View (android.view.View)6 FrameLayout (android.widget.FrameLayout)6 ImageView (android.widget.ImageView)6 Resources (android.content.res.Resources)5 Display (android.view.Display)5 LayoutInflater (android.view.LayoutInflater)5 MotionEvent (android.view.MotionEvent)5 WindowManager (android.view.WindowManager)5 LayoutParams (android.widget.FrameLayout.LayoutParams)5 LinearLayout (android.widget.LinearLayout)5 TextView (android.widget.TextView)5 RotateImageView (com.android.camera.ui.RotateImageView)5 ListView (android.widget.ListView)4 GridView (android.widget.GridView)3 HorizontalScrollView (android.widget.HorizontalScrollView)3 Paint (android.graphics.Paint)2 CountDownView (com.android.camera.ui.CountDownView)2