Activity getRequestedOrientation - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Activity getRequestedOrientation method.

This code example shows how to use the following methods:getRequestedOrientation, getWindow, setRequestedOrientation
        if (mCustomView != null) {
            callback.onCustomViewHidden();
            return; 
        } 
 
        mOriginalOrientation = mActivity.getRequestedOrientation();
        FrameLayout decor = (FrameLayout) mActivity.getWindow().getDecorView();
        mFullscreenContainer = new FullscreenHolder(mActivity);
        mFullscreenContainer.addView(view, COVER_SCREEN_PARAMS);
        decor.addView(mFullscreenContainer, COVER_SCREEN_PARAMS);
        mCustomView = view;
        setFullscreen(true); 
        ((BrowserWebView) getWebView()).setVisibility(View.INVISIBLE);
        mCustomViewCallback = callback;
        mActivity.setRequestedOrientation(requestedOrientation);
    } 
 
    @Override 
    public void onHideCustomView() { 
        ((BrowserWebView) getWebView()).setVisibility(View.VISIBLE);

6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getRequestedOrientation
     */ 
    public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
        mWidth = w;
        mHeight = h;
 
        if (mActivity.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE &&
            mWidth < mHeight) {
            return; 
        } 
 
        if (mActivity.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT &&
            mWidth > mHeight) {
            return; 
        } 
 
        if (!mRunning) {
            mRunning = true;       
            new Thread(this).start();
        } else { 
            mChanged = true;
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

Related Activity getRequestedOrientation Questions & Answers:

getRequestedOrientation Method Overview
Return the current requested orientation of the activity.
See Code Examples for other Android Activity Methods: