当前位置: 首页>>代码示例>>Java>>正文


Java View.SYSTEM_UI_FLAG_FULLSCREEN属性代码示例

本文整理汇总了Java中android.view.View.SYSTEM_UI_FLAG_FULLSCREEN属性的典型用法代码示例。如果您正苦于以下问题:Java View.SYSTEM_UI_FLAG_FULLSCREEN属性的具体用法?Java View.SYSTEM_UI_FLAG_FULLSCREEN怎么用?Java View.SYSTEM_UI_FLAG_FULLSCREEN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.view.View的用法示例。


在下文中一共展示了View.SYSTEM_UI_FLAG_FULLSCREEN属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if(Build.VERSION.SDK_INT < 16){
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }else {
        View decorView = getWindow().getDecorView();
        int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
        decorView.setSystemUiVisibility(uiOptions);
    }

    setContentView(R.layout.activity_picture_show);
    Intent intent = getIntent();
    pictureWebUrl = intent.getStringExtra(PICTUREURL);
    pictureId = pictureWebUrl.substring(pictureWebUrl.lastIndexOf("/") + 1);
    progressBar = (ProgressBar) findViewById(R.id.pb_progress);
    getPictureUrl();
}
 
开发者ID:NicoLiutong,项目名称:miaosou,代码行数:18,代码来源:PictureShowActivity.java

示例2: onCreate

@Override
protected void onCreate(Bundle savedInstanceState) {
    ActivityCompat.setExitSharedElementCallback(this, exitTransitionCallback);
    super.onCreate(savedInstanceState);

    int mUIFlag = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
            | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
            | View.SYSTEM_UI_FLAG_LOW_PROFILE
            | View.SYSTEM_UI_FLAG_FULLSCREEN
            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;

    getWindow().getDecorView().setSystemUiVisibility(mUIFlag);

    setContentView(R.layout.activity_gallery);
    ButterKnife.bind(this);

    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setDisplayShowHomeEnabled(true);

    ArrayList<String> imagesList = new ArrayList<>();
    for (int i = 1; i <= 23; i++)
        imagesList.add("http://ssninstincts.org.in/img/gallery/big/" + i + ".jpg");

    galleryAdapter = new GalleryAdapter(this, imagesList);
    StaggeredGridLayoutManager gridLayoutManager =
            new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
    gridLayoutManager.setGapStrategy(StaggeredGridLayoutManager.GAP_HANDLING_MOVE_ITEMS_BETWEEN_SPANS);
    galleryRecyclerView.setHasFixedSize(true);
    galleryRecyclerView.setLayoutManager(gridLayoutManager);
    galleryRecyclerView.setAdapter(galleryAdapter);
}
 
开发者ID:adithya321,项目名称:Instincts-2k17,代码行数:33,代码来源:GalleryActivity.java

示例3: onCreate

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);
    View decorView = getWindow().getDecorView();
    int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
    decorView.setSystemUiVisibility(uiOptions);
    ActionBar actionBar = getActionBar();
    if (null != actionBar) actionBar.hide();
    ButterKnife.bind(this);
    FirebaseAuth auth = FirebaseAuth.getInstance();
    if (auth.getCurrentUser() != null) {
        showWhiteSnackBar(R.string.sign_in_successful);
        googleLoginButton.setVisibility(View.INVISIBLE);
        Intent intent = new Intent(getApplicationContext(), MainActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(intent);
        finish();
    }

}
 
开发者ID:vixir,项目名称:Perfect-Day,代码行数:21,代码来源:LoginActivity.java

示例4: setImmersive

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setImmersive() {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
        return;
    }
    int newUiOptions = getWindow().getDecorView().getSystemUiVisibility();

    // Navigation bar hiding:  Backwards compatible to ICS.
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
        newUiOptions ^= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
    }

    // Status bar hiding: Backwards compatible to Jellybean
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        newUiOptions ^= View.SYSTEM_UI_FLAG_FULLSCREEN;
    }

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
        newUiOptions ^= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
    }

    getWindow().getDecorView().setSystemUiVisibility(newUiOptions);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
        setImmersive(true);
    }
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:26,代码来源:VideoCastControllerActivity.java

示例5: hideStatusBar

/**
 * 隐藏状态栏
 * <p>
 * 在setContentView前调用
 */
protected void hideStatusBar() {
    final int sdkVer = Build.VERSION.SDK_INT;
    if (sdkVer < 16) {
        //4.0及一下
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    } else {
        View decorView = getWindow().getDecorView();
        int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
        decorView.setSystemUiVisibility(uiOptions);
        ActionBar actionBar = getActionBar();
        if (actionBar != null) {
            actionBar.hide();
        }
    }
}
 
开发者ID:chengzichen,项目名称:KrGallery,代码行数:21,代码来源:MainActivity.java

示例6: onWindowFocusChanged

/**
 * Called when view focus is changed
 */
@Override
public void onWindowFocusChanged(boolean hasFocus) {
    super.onWindowFocusChanged(hasFocus);
    if (hasFocus && immersiveMode) {
        final int uiOptions = 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;

        getWindow().getDecorView().setSystemUiVisibility(uiOptions);
    }
}
 
开发者ID:Andy-Ta,项目名称:COB,代码行数:17,代码来源:CordovaActivity.java

示例7: enterFullScreen

private void enterFullScreen() {
    if(mToolbar == null || rootView == null || bottomView == null) return;

    //bottomView.setVisibility(View.GONE);

    int flag = View.SYSTEM_UI_FLAG_LOW_PROFILE;
    if(ApiHelper.HAS_VIEW_SYSTEM_UI_FLAG_LAYOUT_STABLE)
        flag = View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;

    mToolbar.setVisibility(View.INVISIBLE);
    rootView.setSystemUiVisibility(flag);
    fullScreen = true;
}
 
开发者ID:YuntaoWei,项目名称:PictureShow,代码行数:13,代码来源:PhotoActivity.java

示例8: onSystemUiVisibilityChange

@Override
public void onSystemUiVisibilityChange(int i) {
    if ((i & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
        toggleToolbar(true);
    } else {
        // The system bars are NOT visible.
    }
}
 
开发者ID:garretyoder,项目名称:Cluttr,代码行数:8,代码来源:ViewActivity.java

示例9: getSystemUiVisibility

@TargetApi(19)
private static int getSystemUiVisibility() {
  int flags = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN;
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
    flags |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
  }
  return flags;
}
 
开发者ID:Piasy,项目名称:AppRTC-Android,代码行数:8,代码来源:CallActivity.java

示例10: fullscreen

private void fullscreen() {
    View decorView = getWindow().getDecorView();
    // Hide the status bar.
    int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
    decorView.setSystemUiVisibility(uiOptions);
    // Remember that you should never show the action bar if the
    // status bar is hidden, so hide that too if necessary.
    //        ActionBar actionBar = getActionBar();
    //        actionBar.hide();
}
 
开发者ID:FreeSunny,项目名称:Amazing,代码行数:10,代码来源:ConstraintActivity.java

示例11: hideStatusBar

private void hideStatusBar() {
    // If the Android version is lower than Jellybean, use this call to hide
    // the status bar.
    if (Build.VERSION.SDK_INT < 16) {
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }

    //Hide the Status Bar on Android 4.1 and Higher
    View decorView = getWindow().getDecorView();
    // Hide the status bar.
    int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
    decorView.setSystemUiVisibility(uiOptions);
}
 
开发者ID:CityZenApp,项目名称:Android-Development,代码行数:14,代码来源:SplashScreenActivity.java

示例12: onCreate

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (BuildConfig.BACK_BUTTON_QUITS) {
        createQuitDialog();
    }

    mSystemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        mSystemUiVisibility |= View.SYSTEM_UI_FLAG_FULLSCREEN;
        mSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
        mSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
        mSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            mSystemUiVisibility |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
        }
    }

    mPlayer = PlayerHelper.create(this);
    mPlayer.setKeepScreenOn();
    setContentView(mPlayer.getView());

    if (!addBootstrapInterface(mPlayer)) {
        Uri.Builder projectURIBuilder = Uri.fromFile(new File(getString(R.string.mv_project_index))).buildUpon();
        Bootstrapper.appendQuery(projectURIBuilder, getString(R.string.query_noaudio));
        if (BuildConfig.SHOW_FPS) {
            Bootstrapper.appendQuery(projectURIBuilder, getString(R.string.query_showfps));
        }
        mPlayer.loadUrl(projectURIBuilder.build().toString());
    }
}
 
开发者ID:AltimitSystems,项目名称:mv-android-client,代码行数:33,代码来源:WebPlayerActivity.java

示例13: onCreate

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);
    View decorView = getWindow().getDecorView();
    int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
    decorView.setSystemUiVisibility(uiOptions);
    ActionBar actionBar = getActionBar();
    if (null != actionBar) actionBar.hide();
    mBottomBar.setOnTabSelectListener(
            new OnTabSelectListener() {
                @Override
                public void onTabSelected(@IdRes int tabId) {
                    Fragment fragment;
                    switch (tabId) {
                        case R.id.bot_bar_today:
                            fragment = new TodayTasksFragment();
                            break;
                        case R.id.bot_bar_list:
                            fragment = new ListTasksFragment();
                            break;
                        case R.id.bot_bar_more:
                            fragment = new MoreInfoFragment();
                            break;
                        default:
                            fragment = new TodayTasksFragment();
                    }
                    FragmentManager fragmentManager = getSupportFragmentManager();
                    FragmentTransaction ft = fragmentManager.beginTransaction();
                    ft.replace(R.id.flContent, fragment, fragment.getClass().getName());
                    ft.commit();
                }
            });
}
 
开发者ID:vixir,项目名称:Perfect-Day,代码行数:35,代码来源:MainActivity.java

示例14: getFullscreenUiFlags

private int getFullscreenUiFlags() {
    int flags = View.SYSTEM_UI_FLAG_LOW_PROFILE | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;

    flags |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE
            | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
            | View.SYSTEM_UI_FLAG_FULLSCREEN
            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;

    return flags;
}
 
开发者ID:maddog05,项目名称:whatanime-android,代码行数:11,代码来源:VideoPreviewActivity.java

示例15: hideStatusbar

public static void hideStatusbar(Activity context) {
    if (Build.VERSION.SDK_INT < 16) {
        context.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
    } else {
        View decorView = context.getWindow().getDecorView();
        int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
        decorView.setSystemUiVisibility(uiOptions);
    }
}
 
开发者ID:akshay2211,项目名称:Oblique,代码行数:10,代码来源:Utils.java


注:本文中的android.view.View.SYSTEM_UI_FLAG_FULLSCREEN属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。