For landscape orientation, the click listener is attached to
the instruction text layout and the constraints are adjusted before animating
5802
private void initializeLandscapeListListener() {
    instructionLayoutText.setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View instructionLayoutText) {
        boolean instructionsVisible = instructionListLayout.getVisibility() == VISIBLE;
        if (!instructionsVisible) {
          showInstructionList();
        } else {
          hideInstructionList();
        }
      }
    });
  }
930689
@Override
    public void animateTo(int x, int y) {
        // If no layout, delay this call
        if (!mMapView.isLayoutOccurred()) {
            mReplayController.animateTo(x, y);
            return;
        }

        if (!mMapView.isAnimating()) {
            mMapView.mIsFlinging = false;
            final int xStart = (int)mMapView.getMapScrollX();
            final int yStart = (int)mMapView.getMapScrollY();

            final int dx = x - mMapView.getWidth() / 2;
            final int dy = y - mMapView.getHeight() / 2;

            if (dx != xStart || dy != yStart) {
                mMapView.getScroller().startScroll(xStart, yStart, dx, dy, Configuration.getInstance().getAnimationSpeedDefault());
                mMapView.postInvalidate();
            }
        }
    }
765466
@Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        super.onLayout(changed, l, t, r, b);

        if(getOrientation() == HORIZONTAL) {
            int N = getChildCount();
            for (int i = 0; i < N; i++) {

                View child = getChildAt(i);
                int width = child.getWidth();
                if (width > MAX_BUTTON_WIDTH || (N>=3 && width > MIN_BUTTON_WIDTH)) {

                    // Clear out the children list in preparation for new manipulation
                    children.clear();

                    // Update the children's params
                    for (int j = 0; j < N; j++) {
                        RippleView chd = (RippleView) getChildAt(j);
                        Button btn = (Button) chd.getChildAt(0);
                        btn.setGravity(Gravity.END|Gravity.CENTER_VERTICAL);
                        children.add(chd);
                    }

                    // Clear out the chitlens
                    removeAllViews();

                    // Sort buttons properly
                    Collections.sort(children, mButtonComparator);

                    // Re-Add all the views
                    for(int j=0; j<children.size(); j++){
                        View chd = children.get(j);
                        addView(chd);
                    }

                    // Switch orientation
                    setOrientation(VERTICAL);
                    requestLayout();
                    return;
                }


            }
        }


    }
1270489
function DeviceOrientationControlMethod() {
  this._dynamics = {
    yaw: new Marzipano.Dynamics(),
    pitch: new Marzipano.Dynamics()
  };

  this._deviceOrientationHandler = this._handleData.bind(this);

  if (window.DeviceOrientationEvent) {
    window.addEventListener('deviceorientation', this._deviceOrientationHandler);
  }

  this._previous = {};
  this._current = {};
  this._tmp = {};

  this._getPitchCallbacks = [];
}
382260
@Override
    protected void onPrepareShow() {
        super.onPrepareShow(); // This will take care of many modifications 

        final FrameLayout.LayoutParams layoutParams = new FrameLayout
                .LayoutParams(this.mStyle.width, this.mStyle.height);

        // Make some type specific tweaks
        switch (this.mStyle.type) {

            case Style.TYPE_STANDARD:
                break;

            case Style.TYPE_BUTTON:
                // If NOT Lollipop frame, give padding on each side
                if (this.mStyle.frame != Style.FRAME_LOLLIPOP) {
                    this.mStyle.width = FrameLayout.LayoutParams.MATCH_PARENT;
                    this.mStyle.xOffset = BackgroundUtils.convertToDIP(24);
                    this.mStyle.yOffset = BackgroundUtils.convertToDIP(24);
                }

                // On a big screen device, show the SuperActivityToast on the bottom left
                if ((this.mContext.getResources().getConfiguration().screenLayout
                        & Configuration.SCREENLAYOUT_SIZE_MASK)
                        >= Configuration.SCREENLAYOUT_SIZE_LARGE) {
                    this.mStyle.width = BackgroundUtils.convertToDIP(568);
                    this.mStyle.gravity = Gravity.BOTTOM | Gravity.START;
                } 

                // Set up the Button attributes
                final Button button = (Button) this.mView.findViewById(R.id.button);
                button.setBackgroundResource(BackgroundUtils
                        .getButtonBackgroundResource(this.mStyle.frame));
                button.setText(this.mStyle.buttonText != null ?
                        this.mStyle.buttonText.toUpperCase() : "");
                button.setTypeface(button.getTypeface(), this.mStyle.buttonTypefaceStyle);
                button.setTextColor(this.mStyle.buttonTextColor);
                button.setTextSize(this.mStyle.buttonTextSize);
                
                if (this.mStyle.frame != Style.FRAME_LOLLIPOP) {
                    this.mView.findViewById(R.id.divider).setBackgroundColor(this
                            .mStyle.buttonDividerColor);

                    // Set an icon resource if desired
                    if(this.mStyle.buttonIconResource > 0) {
                        button.setCompoundDrawablesWithIntrinsicBounds(ResourcesCompat
                                .getDrawable(mContext.getResources(),
                                        this.mStyle.buttonIconResource,
                                        mContext.getTheme()),
                                null, null, null);
                    }
                }

                if (this.mOnButtonClickListener != null) {
                    button.setOnClickListener(new View.OnClickListener() {

                        short clicked = 0;
                        @Override
                        public void onClick(View view) {
                            // Prevent button spamming
                            if (clicked > 0) return;
                            clicked++;

                            mOnButtonClickListener.onClick(view, getButtonToken());
                            SuperActivityToast.this.dismiss();
                        }
                    });
                }
                break;

            case Style.TYPE_PROGRESS_CIRCLE:
                if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    this.mProgressBar.setIndeterminateTintMode(PorterDuff.Mode.SRC_IN);
                    this.mProgressBar.setIndeterminateTintList(ColorStateList
                            .valueOf(this.mStyle.progressBarColor));
                }
                break;

            case Style.TYPE_PROGRESS_BAR:
                if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    this.mProgressBar.setIndeterminateTintMode(PorterDuff.Mode.SRC_IN);
                    this.mProgressBar.setIndeterminateTintList(ColorStateList
                            .valueOf(this.mStyle.progressBarColor));
                    this.mProgressBar.setProgressTintMode(PorterDuff.Mode.SRC_IN);
                    this.mProgressBar.setProgressTintList(ColorStateList
                            .valueOf(this.mStyle.progressBarColor));
                }
                this.mProgressBar.setProgress(this.mStyle.progress);
                this.mProgressBar.setMax(this.mStyle.progressMax);
                this.mProgressBar.setIndeterminate(this.mStyle.progressIndeterminate);
                break;
        }

        layoutParams.width = this.mStyle.width;
        layoutParams.height = this.mStyle.height;
        layoutParams.gravity = this.mStyle.gravity;
        layoutParams.bottomMargin = this.mStyle.yOffset;
        layoutParams.topMargin = this.mStyle.yOffset;
        layoutParams.leftMargin = this.mStyle.xOffset;
        layoutParams.rightMargin = this.mStyle.xOffset;

        this.mView.setLayoutParams(layoutParams);

        // Set up touch to dismiss
        if (this.mStyle.touchToDismiss) {
            mView.setOnTouchListener(new View.OnTouchListener() {

                int timesTouched;
                @Override
                public boolean onTouch(View v, MotionEvent motionEvent) {
                    // Prevent repetitive touch events
                    if (timesTouched == 0 && motionEvent.getAction() == MotionEvent.ACTION_DOWN) dismiss();
                    timesTouched++;

                    return false; // Do not consume the event in case a Button listener is set
                }
            });
        } else {
            // Make sure no listener is set
            mView.setOnTouchListener(null);
        }
    }
654687
@Override
  public boolean onTouchEvent(final @NotNull MotionEvent event) {
    final Spannable text = (Spannable)getText();
    if (text != null) {
      if (event.getAction() == MotionEvent.ACTION_DOWN) {
        final Layout layout = getLayout();
        if (layout != null) {
          // final int pos = getOffsetForPosition(event.getX(), event.getY()); // API >= 14 only
          final int line = getLineAtCoordinate(layout, event.getY());
          final int pos = getOffsetAtCoordinate(layout, line, event.getX());
          final ClickableSpan[] links = text.getSpans(pos, pos, ClickableSpan.class);
          if (links != null && links.length > 0) {
            links[0].onClick(this);
            return true;
          }
        }
      }
    }
    return super.onTouchEvent(event);
  }
1208375
private void adaptBackground(@Nullable final BackgroundAnimation animation) {
        if (getRootView() != null && getWindow() != null) {
            Drawable newBackground = background;

            if (animation != null && newBackground != null) {
                View animatedView = isFullscreen() ? getWindow().getDecorView() : getRootView();
                Drawable previousBackground = animatedView.getBackground();

                if (previousBackground != null) {
                    if (previousBackground instanceof AbstractTransitionDrawable) {
                        previousBackground =
                                ((AbstractTransitionDrawable) previousBackground).getDrawable(1);
                    }

                    if (animation instanceof CircleTransitionAnimation) {
                        CircleTransitionAnimation circleTransitionAnimation =
                                (CircleTransitionAnimation) animation;
                        CircleTransitionDrawable transition = new CircleTransitionDrawable(
                                new Drawable[]{previousBackground, newBackground});
                        transition.setRadius(circleTransitionAnimation.getRadius());
                        transition.setListener(circleTransitionAnimation.getListener());

                        if (circleTransitionAnimation.getX() != null) {
                            transition.setX(circleTransitionAnimation.getX());
                        }

                        if (circleTransitionAnimation.getY() != null) {
                            transition.setY(circleTransitionAnimation.getY());
                        }

                        transition.startTransition(circleTransitionAnimation.getDuration());
                        newBackground = transition;
                    } else if (animation instanceof CrossFadeTransitionAnimation) {
                        CrossFadeTransitionDrawable transition = new CrossFadeTransitionDrawable(
                                new Drawable[]{previousBackground, newBackground});
                        transition.setListener(animation.getListener());
                        transition.startTransition(animation.getDuration());
                        newBackground = transition;
                    } else {
                        throw new RuntimeException("Unknown type of animation: " +
                                animation.getClass().getSimpleName());
                    }
                }
            }

            getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
            ViewUtil.setBackground(getRootView(), isFullscreen() ? null : newBackground);
            ViewUtil.setBackground(getWindow().getDecorView(),
                    isFullscreen() ? newBackground : null);
        }
    }
303419
def init_layout(self):
        
        d = self.declaration
        self.create_notification()
        if d.show:
            self.set_show(d.show)
505226
private void initializeBackground() {
    if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) {
      int navigationViewBannerBackgroundColor = ThemeSwitcher.retrieveThemeColor(getContext(),
        R.attr.navigationViewBannerBackground);
      int navigationViewListBackgroundColor = ThemeSwitcher.retrieveThemeColor(getContext(),
        R.attr.navigationViewListBackground);
      // Instruction Layout landscape - banner background
      if (isLandscape()) {
        View instructionLayoutManeuver = findViewById(R.id.instructionManeuverLayout);
        Drawable maneuverBackground = DrawableCompat.wrap(instructionLayoutManeuver.getBackground()).mutate();
        DrawableCompat.setTint(maneuverBackground, navigationViewBannerBackgroundColor);

        View subStepLayout = findViewById(R.id.subStepLayout);
        Drawable subStepBackground = DrawableCompat.wrap(subStepLayout.getBackground()).mutate();
        DrawableCompat.setTint(subStepBackground, navigationViewListBackgroundColor);

        View turnLaneLayout = findViewById(R.id.turnLaneLayout);
        Drawable turnLaneBackground = DrawableCompat.wrap(turnLaneLayout.getBackground()).mutate();
        DrawableCompat.setTint(turnLaneBackground, navigationViewListBackgroundColor);
      }
    }
  }
176981
function handleDocumentMousemove(e) {
  let svg = overlay.parentNode.querySelector('svg.annotationLayer');
  let rect = svg.getBoundingClientRect();

  if (originX + (e.clientX - originX) < rect.right) {
    overlay.style.width = `${e.clientX - originX}px`;
  }

  if (originY + (e.clientY - originY) < rect.bottom) {
    overlay.style.height = `${e.clientY - originY}px`;
  }
}
10797
function(oEvent) {
				var oImage = this.byId("phoneImage");

				if (Device.system.phone && oImage) {
					oImage.toggleStyleClass("phoneHeaderImageLandscape", oEvent.landscape);
				}
			}
69968
public void closeToLeft() {
    if (viewDragHelper.smoothSlideViewTo(dragView, -transformer.getOriginalWidth(),
        getHeight() - transformer.getMinHeightPlusMargin())) {
      ViewCompat.postInvalidateOnAnimation(this);
      notifyCloseToLeftListener();
    }
  }
1316998
function() {
      if (options.fit) {
        options.cy.fit(options.eles.nodes(), options.padding);
      }

      if (!ready) {
        ready = true;
        self.cy.one('layoutready', options.ready);
        self.cy.trigger({type: 'layoutready', layout: self});
      }
    }
216645
function() {
            if(this.$input.is(':visible')) {
				this.$input.focus();
				$.fn.editableutils.setCursorPosition(this.$input.get(0), this.$input.val().length);
				
				var val = parseInt(this.$input.val());
				var options = $.extend({value:val}, this.options.spinner);
				this.$input.ace_spinner(options);
            }
       }
628612
public final void setOrientation(int orientation) {
        mOrientation = orientation;
        mOrientationState = getOrientationStateFromParam(mOrientation);
        invalidate();
        if (mOuterAdapter != null) {
            mOuterAdapter.setOrientation(mOrientation);
        }

    }
357618
function() {
            if (typeof window.orientation == 'undefined') {

                if (pgwBrowser.viewport.width >= pgwBrowser.viewport.height) {
                    pgwBrowser.viewport.orientation = 'landscape';
                } else {
                    pgwBrowser.viewport.orientation = 'portrait';
                }

            } else {
                switch(window.orientation) {
                    case -90:
                    case 90:
                        pgwBrowser.viewport.orientation = 'landscape';
                        break;
                    default:
                        pgwBrowser.viewport.orientation = 'portrait';
                        break; 
                }
            }

            // Orientation trigger
            $(window).trigger('PgwBrowser::OrientationChange');

            return true;
        }
1161373
function () {
    var anchor;
    var baseline;
    var el = this.el;
    var data = this.data;
    var geometry = this.geometry;
    var geometryComponent;
    var height;
    var layout;
    var mesh = this.mesh;
    var textRenderWidth;
    var textScale;
    var width;
    var x;
    var y;

    if (!geometry.layout) { return; }

    // Determine width to use (defined width, geometry's width, or default width).
    geometryComponent = el.getAttribute('geometry');
    width = data.width || (geometryComponent && geometryComponent.width) || DEFAULT_WIDTH;

    // Determine wrap pixel count. Either specified or by experimental fudge factor.
    // Note that experimental factor will never be correct for variable width fonts.
    textRenderWidth = computeWidth(data.wrapPixels, data.wrapCount,
                                   this.currentFont.widthFactor);
    textScale = width / textRenderWidth;

    // Determine height to use.
    layout = geometry.layout;
    height = textScale * (layout.height + layout.descender);

    // Update geometry dimensions to match text layout if width and height are set to 0.
    // For example, scales a plane to fit text.
    if (geometryComponent && geometryComponent.primitive === 'plane') {
      if (!geometryComponent.width) { el.setAttribute('geometry', 'width', width); }
      if (!geometryComponent.height) { el.setAttribute('geometry', 'height', height); }
    }

    // Calculate X position to anchor text left, center, or right.
    anchor = data.anchor === 'align' ? data.align : data.anchor;
    if (anchor === 'left') {
      x = 0;
    } else if (anchor === 'right') {
      x = -1 * layout.width;
    } else if (anchor === 'center') {
      x = -1 * layout.width / 2;
    } else {
      throw new TypeError('Invalid text.anchor property value', anchor);
    }

    // Calculate Y position to anchor text top, center, or bottom.
    baseline = data.baseline;
    if (baseline === 'bottom') {
      y = 0;
    } else if (baseline === 'top') {
      y = -1 * layout.height + layout.ascender;
    } else if (baseline === 'center') {
      y = -1 * layout.height / 2;
    } else {
      throw new TypeError('Invalid text.baseline property value', baseline);
    }

    // Position and scale mesh to apply layout.
    mesh.position.x = x * textScale + data.xOffset;
    mesh.position.y = y * textScale;
    // Place text slightly in front to avoid Z-fighting.
    mesh.position.z = data.zOffset;
    mesh.scale.set(textScale, -1 * textScale, textScale);
  }