當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。