Example usage for android.view View SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION

List of usage examples for android.view View SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION

Introduction

In this page you can find the example usage for android.view View SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION.

Prototype

int SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION

To view the source code for android.view View SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION.

Click Source Link

Document

Flag for #setSystemUiVisibility(int) : View would like its window to be laid out as if it has requested #SYSTEM_UI_FLAG_HIDE_NAVIGATION , even if it currently hasn't.

Usage

From source file:com.android.leanlauncher.LauncherTransitionable.java

/**
 * Finds all the views we need and configure them properly.
 *///from  w w  w  . java  2 s  .  c  o  m
private void setupViews() {
    final DragController dragController = mDragController;

    mLauncherView = findViewById(R.id.launcher);
    mDragLayer = (DragLayer) findViewById(R.id.drag_layer);
    mWorkspace = (Workspace) mDragLayer.findViewById(R.id.workspace);

    mLauncherView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
    mWorkspaceBackgroundDrawable = getResources().getDrawable(R.drawable.workspace_bg);

    // Setup the drag layer
    mDragLayer.setup(this, dragController);

    mOverviewPanel = (ViewGroup) findViewById(R.id.overview_panel);
    View widgetButton = findViewById(R.id.widget_button);
    widgetButton.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View arg0) {
            if (!mWorkspace.isSwitchingState()) {
                onClickAddWidgetButton(arg0);
            }
        }
    });
    widgetButton.setOnTouchListener(getHapticFeedbackTouchListener());

    View wallpaperButton = findViewById(R.id.wallpaper_button);
    wallpaperButton.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View arg0) {
            if (!mWorkspace.isSwitchingState()) {
                onClickWallpaperPicker(arg0);
            }
        }
    });
    wallpaperButton.setOnTouchListener(getHapticFeedbackTouchListener());

    View settingsButton = findViewById(R.id.settings_button);
    settingsButton.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View arg0) {
            if (!mWorkspace.isSwitchingState()) {
                onClickSettingsButton(arg0);
            }
        }
    });
    settingsButton.setOnTouchListener(getHapticFeedbackTouchListener());

    mOverviewPanel.setAlpha(0f);

    // Setup the workspace
    mWorkspace.setHapticFeedbackEnabled(false);
    mWorkspace.setOnLongClickListener(this);
    mWorkspace.setup(dragController);
    dragController.addDragListener(mWorkspace);

    // Get the search/delete bar
    mDeleteDropTargetBar = (DeleteDropTargetBar) mDragLayer.findViewById(R.id.delete_drop_target_bar);

    // Setup AppsCustomize
    mAppsCustomizeTabHost = (AppsCustomizeTabHost) findViewById(R.id.apps_customize_pane);
    mAppsCustomizeContent = (AppsCustomizePagedView) mAppsCustomizeTabHost
            .findViewById(R.id.apps_customize_pane_content);
    mAppsCustomizeContent.setup(this, dragController);

    // Setup the drag controller (drop targets have to be added in reverse order in priority)
    dragController.setScrollView(mDragLayer);
    dragController.setMoveTarget(mWorkspace);
    dragController.addDropTarget(mWorkspace);
    if (mDeleteDropTargetBar != null) {
        mDeleteDropTargetBar.setup(this, dragController);
    }
}

From source file:paulscode.android.mupen64plusae.game.GameFragment.java

private void hideSystemBars() {
    if (getActivity() != null) {
        if (mGlobalPrefs.isImmersiveModeEnabled) {
            getActivity().getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
                    | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN
                    | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
        }/*  w  w w  .j  av a2  s. c  om*/
    }
}

From source file:org.uoyabause.android.YabauseHandler.java

@Override
public void onWindowFocusChanged(boolean hasFocus) {
    super.onWindowFocusChanged(hasFocus);
    if (hasFocus) {
        View decorView = findViewById(R.id.drawer_layout);
        decorView.setSystemUiVisibility(
                View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
    }/*from   w  ww . j  a v a  2  s .co m*/
}

From source file:net.nightwhistler.pageturner.fragment.ReadingFragment.java

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void updateFromPrefs() {

    SherlockFragmentActivity activity = getSherlockActivity();

    if (activity == null) {
        return;//  w w  w .ja  va 2 s .  c o  m
    }

    bookView.setTextSize(config.getTextSize());

    int marginH = config.getHorizontalMargin();
    int marginV = config.getVerticalMargin();

    this.textLoader.setFontFamily(config.getDefaultFontFamily());
    this.bookView.setFontFamily(config.getDefaultFontFamily());
    this.textLoader.setSansSerifFontFamily(config.getSansSerifFontFamily());
    this.textLoader.setSerifFontFamily(config.getSerifFontFamily());

    bookView.setHorizontalMargin(marginH);
    bookView.setVerticalMargin(marginV);

    if (!isAnimating()) {
        bookView.setEnableScrolling(config.isScrollingEnabled());
    }

    textLoader.setStripWhiteSpace(config.isStripWhiteSpaceEnabled());
    textLoader.setAllowStyling(config.isAllowStyling());
    textLoader.setUseColoursFromCSS(config.isUseColoursFromCSS());

    bookView.setLineSpacing(config.getLineSpacing());

    if (config.isFullScreenEnabled()) {
        activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
        activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
        activity.getSupportActionBar().hide();

    } else {
        activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
        activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
        activity.getSupportActionBar().show();
    }

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        if (config.isFullScreenEnabled()) {
            bookView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                    | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);

        }
        if (config.isDimSystemUI()) {
            activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
        }
    }

    if (config.isKeepScreenOn()) {
        activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    } else {
        activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    }

    restoreColorProfile();

    // Check if we need a restart
    if (config.isFullScreenEnabled() != savedConfigState.fullscreen
            || config.isShowPageNumbers() != savedConfigState.usePageNum
            || config.isBrightnessControlEnabled() != savedConfigState.brightness
            || config.isStripWhiteSpaceEnabled() != savedConfigState.stripWhiteSpace
            || !config.getDefaultFontFamily().getName().equalsIgnoreCase(savedConfigState.fontName)
            || !config.getSerifFontFamily().getName().equalsIgnoreCase(savedConfigState.serifFontName)
            || !config.getSansSerifFontFamily().getName().equalsIgnoreCase(savedConfigState.sansSerifFontName)
            || config.getHorizontalMargin() != savedConfigState.hMargin
            || config.getVerticalMargin() != savedConfigState.vMargin
            || config.getTextSize() != savedConfigState.textSize
            || config.isScrollingEnabled() != savedConfigState.scrolling
            || config.isAllowStyling() != savedConfigState.allowStyling
            || config.isUseColoursFromCSS() != savedConfigState.allowColoursFromCSS) {

        textLoader.invalidateCachedText();
        restartActivity();
    }

    Configuration.OrientationLock orientation = config.getScreenOrientation();

    switch (orientation) {
    case PORTRAIT:
        getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        break;
    case LANDSCAPE:
        getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        break;
    case REVERSE_LANDSCAPE:
        getActivity().setRequestedOrientation(8); // Android 2.3+ value
        break;
    case REVERSE_PORTRAIT:
        getActivity().setRequestedOrientation(9); // Android 2.3+ value
        break;
    default:
        getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
    }
}

From source file:im.ene.lab.toro.ext.layeredvideo.PlaybackControlLayer.java

@Override
public void onWindowFocusChanged(boolean hasFocus) {
    if (hasFocus && isFullscreen) {
        // TODO fix this for API 16 ~ 18
        layerManager.getActivity().getWindow().getDecorView().setSystemUiVisibility(
                View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
    }/*from w ww.  ja v a2s.c o m*/
}

From source file:com.affectiva.affdexme.MainActivity.java

/**
 * When the user taps the screen, hide the menu if it is visible and show it if it is hidden.
 **///from www .j a v  a  2  s  .  c o  m
void setMenuVisible(boolean b) {
    isMenuShowingForFirstTime = false;
    isMenuVisible = b;
    if (b) {
        settingsButton.setVisibility(View.VISIBLE);
        cameraButton.setVisibility(View.VISIBLE);
        screenshotButton.setVisibility(View.VISIBLE);

        //We display the navigation bar again
        getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
    } else {

        //We hide the navigation bar
        getWindow().getDecorView()
                .setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                        | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                        | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN);
        settingsButton.setVisibility(View.INVISIBLE);
        cameraButton.setVisibility(View.INVISIBLE);
        screenshotButton.setVisibility(View.INVISIBLE);
    }
}

From source file:net.zorgblub.typhon.fragment.ReadingFragment.java

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void updateFromPrefs() {

    AppCompatActivity activity = (AppCompatActivity) getActivity();

    if (activity == null) {
        return;//w  ww.j a v a 2 s .c o m
    }

    bookView.setTextSize(config.getTextSize());

    int marginH = config.getHorizontalMargin();
    int marginV = config.getVerticalMargin();

    this.textLoader.setFontFamily(config.getDefaultFontFamily());
    this.bookView.setFontFamily(config.getDefaultFontFamily());
    this.textLoader.setSansSerifFontFamily(config.getSansSerifFontFamily());
    this.textLoader.setSerifFontFamily(config.getSerifFontFamily());

    bookView.setHorizontalMargin(marginH);
    bookView.setVerticalMargin(marginV);

    if (!isAnimating()) {
        bookView.setEnableScrolling(config.isScrollingEnabled());
    }

    textLoader.setStripWhiteSpace(config.isStripWhiteSpaceEnabled());
    textLoader.setAllowStyling(config.isAllowStyling());
    textLoader.setUseColoursFromCSS(config.isUseColoursFromCSS());

    bookView.setLineSpacing(config.getLineSpacing());

    if (config.isFullScreenEnabled()) {
        activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
        activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
        activity.getSupportActionBar().hide();

    } else {
        activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
        activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
        activity.getSupportActionBar().show();
    }

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        if (config.isFullScreenEnabled()) {
            activity.getWindow().getDecorView().setSystemUiVisibility(
                    View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                    // | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                            | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                            | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
        }
        if (config.isDimSystemUI()) {
            activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
        }
    }

    if (config.isKeepScreenOn()) {
        activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    } else {
        activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    }

    restoreColorProfile();

    // Check if we need a restart
    if (config.isFullScreenEnabled() != savedConfigState.fullscreen
            || config.isShowPageNumbers() != savedConfigState.usePageNum
            || config.isBrightnessControlEnabled() != savedConfigState.brightness
            || config.isStripWhiteSpaceEnabled() != savedConfigState.stripWhiteSpace
            || !config.getDefaultFontFamily().getName().equalsIgnoreCase(savedConfigState.fontName)
            || !config.getSerifFontFamily().getName().equalsIgnoreCase(savedConfigState.serifFontName)
            || !config.getSansSerifFontFamily().getName().equalsIgnoreCase(savedConfigState.sansSerifFontName)
            || config.getHorizontalMargin() != savedConfigState.hMargin
            || config.getVerticalMargin() != savedConfigState.vMargin
            || config.getTextSize() != savedConfigState.textSize
            || config.isScrollingEnabled() != savedConfigState.scrolling
            || config.isAllowStyling() != savedConfigState.allowStyling
            || config.isUseColoursFromCSS() != savedConfigState.allowColoursFromCSS
            || config.isRikaiEnabled() != savedConfigState.rikaiEnabled
            || dictionaryService.getLastUpdateTimestamp() > this.dictionaryLastUpdate) {
        DictionaryServiceImpl.reset();
        textLoader.invalidateCachedText();
        restartActivity();
    }

    Configuration.OrientationLock orientation = config.getScreenOrientation();

    switch (orientation) {
    case PORTRAIT:
        getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        break;
    case LANDSCAPE:
        getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        break;
    case REVERSE_LANDSCAPE:
        getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE); // Android 2.3+ value
        break;
    case REVERSE_PORTRAIT:
        getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT); // Android 2.3+ value
        break;
    default:
        getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
    }
}

From source file:com.android.leanlauncher.LauncherTransitionable.java

/**
 * Sets up transparent navigation and status bars in LMP.
 * This method is a no-op for other platform versions.
 *///  w  ww. j a  v a  2s.co  m
@TargetApi(19)
private void setupTransparentSystemBarsForLmp() {
    // TODO(sansid): use the APIs directly when compiling against L sdk.
    // Currently we use reflection to access the flags and the API to set the transparency
    // on the System bars.
    if (Utilities.isLmpOrAbove()) {
        try {
            getWindow().getAttributes().systemUiVisibility |= (View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                    | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
            getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
                    | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
            Field drawsSysBackgroundsField = WindowManager.LayoutParams.class
                    .getField("FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS");
            getWindow().addFlags(drawsSysBackgroundsField.getInt(null));

            Method setStatusBarColorMethod = Window.class.getDeclaredMethod("setStatusBarColor", int.class);
            Method setNavigationBarColorMethod = Window.class.getDeclaredMethod("setNavigationBarColor",
                    int.class);
            setStatusBarColorMethod.invoke(getWindow(), Color.TRANSPARENT);
            setNavigationBarColorMethod.invoke(getWindow(), Color.TRANSPARENT);
        } catch (NoSuchFieldException e) {
            Log.w(TAG, "NoSuchFieldException while setting up transparent bars");
        } catch (NoSuchMethodException ex) {
            Log.w(TAG, "NoSuchMethodException while setting up transparent bars");
        } catch (IllegalAccessException e) {
            Log.w(TAG, "IllegalAccessException while setting up transparent bars");
        } catch (IllegalArgumentException e) {
            Log.w(TAG, "IllegalArgumentException while setting up transparent bars");
        } catch (InvocationTargetException e) {
            Log.w(TAG, "InvocationTargetException while setting up transparent bars");
        }
    }
}

From source file:com.android.soma.Launcher.java

/**
 * Finds all the views we need and configure them properly.
 *//* ww  w. j  a  va 2s . c  o  m*/
private void setupViews() {
    final DragController dragController = mDragController;

    mLauncherView = findViewById(R.id.launcher);
    mDragLayer = (DragLayer) findViewById(R.id.drag_layer);
    mWorkspace = (Workspace) mDragLayer.findViewById(R.id.workspace);

    mLauncherView.setSystemUiVisibility(
            View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
    mWorkspaceBackgroundDrawable = getResources().getDrawable(R.drawable.workspace_bg);

    // Setup the drag layer
    mDragLayer.setup(this, dragController);

    // Setup the hotseat
    mHotseat = (Hotseat) findViewById(R.id.hotseat);
    if (mHotseat != null) {
        mHotseat.setup(this);
        mHotseat.setOnLongClickListener(this);
    }

    mOverviewPanel = findViewById(R.id.overview_panel);
    View widgetButton = findViewById(R.id.widget_button);
    widgetButton.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View arg0) {
            showAllApps(true, AppsCustomizePagedView.ContentType.Widgets, true);
        }
    });
    widgetButton.setOnTouchListener(getHapticFeedbackTouchListener());

    View wallpaperButton = findViewById(R.id.wallpaper_button);
    wallpaperButton.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View arg0) {
            startWallpaper();
        }
    });
    wallpaperButton.setOnTouchListener(getHapticFeedbackTouchListener());

    View settingsButton = findViewById(R.id.settings_button);
    settingsButton.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View arg0) {
            startSettings();
        }
    });
    settingsButton.setOnTouchListener(getHapticFeedbackTouchListener());

    //JNI Support Test button
    View jniButton = findViewById(R.id.JNI_button);
    jniButton.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View arg0) {
            startJniTest();
        }
    });
    jniButton.setOnTouchListener(getHapticFeedbackTouchListener());

    mOverviewPanel.setAlpha(0f);

    // Setup the workspace
    mWorkspace.setHapticFeedbackEnabled(false);
    mWorkspace.setOnLongClickListener(this);
    mWorkspace.setup(dragController);
    dragController.addDragListener(mWorkspace);

    // Get the search/delete bar
    mSearchDropTargetBar = (SearchDropTargetBar) mDragLayer.findViewById(R.id.qsb_bar);

    // Setup AppsCustomize
    mAppsCustomizeTabHost = (AppsCustomizeTabHost) findViewById(R.id.apps_customize_pane);
    mAppsCustomizeContent = (AppsCustomizePagedView) mAppsCustomizeTabHost
            .findViewById(R.id.apps_customize_pane_content);
    mAppsCustomizeContent.setup(this, dragController);

    // Setup the drag controller (drop targets have to be added in reverse order in priority)
    dragController.setDragScoller(mWorkspace);
    dragController.setScrollView(mDragLayer);
    dragController.setMoveTarget(mWorkspace);
    dragController.addDropTarget(mWorkspace);
    if (mSearchDropTargetBar != null) {
        mSearchDropTargetBar.setup(this, dragController);
    }

    if (getResources().getBoolean(R.bool.debug_memory_enabled)) {
        Log.v(TAG, "adding WeightWatcher");
        mWeightWatcher = new WeightWatcher(this);
        mWeightWatcher.setAlpha(0.5f);
        ((FrameLayout) mLauncherView).addView(mWeightWatcher, new FrameLayout.LayoutParams(
                FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM));

        boolean show = shouldShowWeightWatcher();
        mWeightWatcher.setVisibility(show ? View.VISIBLE : View.GONE);
    }
    //RajawaliSurface
    /*  mRajawaliSurface = (IRajawaliSurface)mDragLayer.findViewById(R.id.rajwali_surface);
     mRenderer = new CanvasRenderer(this);
     mRajawaliSurface.setSurfaceRenderer(mRenderer);
            
     final FrameLayout fragmentFrame = new FrameLayout(this);
     final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(1024, 1024);
     fragmentFrame.setLayoutParams(params);
     fragmentFrame.setBackgroundColor(getResources().getColor(android.R.color.holo_blue_bright));
     fragmentFrame.setId(R.id.view_to_texture_frame);
     fragmentFrame.setVisibility(View.INVISIBLE);
     mDragLayer.addView(fragmentFrame);
            
     mFragmentToDraw = new FragmentToDraw();*/
    //        this.getSupportFragmentManager().beginTransaction().add(R.id.view_to_texture_frame, mFragmentToDraw, "custom").commit();
}

From source file:xyz.klinker.blur.launcher3.Launcher.java

/**
 * Finds all the views we need and configure them properly.
 *//*from w ww  .j a  v  a2 s.  c  om*/
private void setupViews() {
    final DragController dragController = mDragController;

    mLauncherView = findViewById(R.id.launcher);
    mFocusHandler = (FocusIndicatorView) findViewById(R.id.focus_indicator);
    mDragLayer = (DragLayer) findViewById(R.id.drag_layer);
    mWorkspace = (Workspace) mDragLayer.findViewById(R.id.workspace);
    mWorkspace.setPageSwitchListener(this);
    mPageIndicators = mDragLayer.findViewById(R.id.page_indicator);

    mLauncherView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
    mWorkspaceBackgroundDrawable = getResources().getDrawable(R.drawable.workspace_bg);

    // Setup the drag layer
    mDragLayer.setup(this, dragController);

    // Setup the hotseat
    mHotseat = (Hotseat) findViewById(R.id.hotseat);
    if (mHotseat != null) {
        mHotseat.setOnLongClickListener(this);
    }

    // Setup the overview panel
    setupOverviewPanel();

    // Setup the workspace
    mWorkspace.setHapticFeedbackEnabled(false);
    mWorkspace.setOnLongClickListener(this);
    mWorkspace.setup(dragController);
    dragController.addDragListener(mWorkspace);

    // Get the search/delete bar
    mSearchDropTargetBar = (SearchDropTargetBar) mDragLayer.findViewById(R.id.search_drop_target_bar);

    // Setup Apps and Widgets
    mAppsView = (AllAppsContainerView) findViewById(R.id.apps_view);
    mWidgetsView = (WidgetsContainerView) findViewById(R.id.widgets_view);
    if (mLauncherCallbacks != null && mLauncherCallbacks.getAllAppsSearchBarController() != null) {
        mAppsView.setSearchBarController(mLauncherCallbacks.getAllAppsSearchBarController());
    } else {
        mAppsView.setSearchBarController(new DefaultAppSearchController());
    }

    // Setup the drag controller (drop targets have to be added in reverse order in priority)
    dragController.setDragScoller(mWorkspace);
    dragController.setScrollView(mDragLayer);
    dragController.setMoveTarget(mWorkspace);
    dragController.addDropTarget(mWorkspace);
    if (mSearchDropTargetBar != null) {
        mSearchDropTargetBar.setup(this, dragController);
        mSearchDropTargetBar.setQsbSearchBar(getOrCreateQsbBar());
    }

    if (TestingUtils.MEMORY_DUMP_ENABLED) {
        TestingUtils.addWeightWatcher(this);
    }
}