public CardboardOverlayView(Context context, AttributeSet attrs) {
    super(context, attrs);
    setOrientation(HORIZONTAL);

    LayoutParams params =
        new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, 1.0f);
    params.setMargins(0, 0, 0, 0);

    mLeftView = new CardboardOverlayEyeView(context, attrs);
    mLeftView.setLayoutParams(params);
    addView(mLeftView);

    mRightView = new CardboardOverlayEyeView(context, attrs);
    mRightView.setLayoutParams(params);
    addView(mRightView);

    // Set some reasonable defaults.
    setDepthOffset(0.016f);
    setColor(Color.rgb(150, 255, 180));
    setVisibility(View.VISIBLE);

    mTextFadeAnimation = new AlphaAnimation(1.0f, 0.0f);
    mTextFadeAnimation.setDuration(5000);
  }