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


Java View.SYSTEM_UI_FLAG_LOW_PROFILE属性代码示例

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


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

示例1: setUiVisibility

@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private void setUiVisibility(boolean isVisible) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT &&
      (isLandscape || isImmersiveInPortrait)){
    setUiVisibilityKitKat(isVisible);
    if (isInMultiWindowMode) {
      animateToolBar(isVisible);
    }
    return;
  }

  int flags = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
  if (!isVisible) {
    flags |= View.SYSTEM_UI_FLAG_LOW_PROFILE | View.SYSTEM_UI_FLAG_FULLSCREEN;
  }
  viewPager.setSystemUiVisibility(flags);
  if (isInMultiWindowMode) {
    animateToolBar(isVisible);
  }
}
 
开发者ID:Elias33,项目名称:Quran,代码行数:20,代码来源:PagerActivity.java

示例2: 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

示例3: SystemUiHiderHoneycomb

/**
 * Constructor not intended to be called by clients. Use
 * {@link SystemUiHider#getInstance} to obtain an instance.
 */
protected SystemUiHiderHoneycomb(Activity activity, View anchorView, int flags) {
    super(activity, anchorView, flags);

    mShowFlags = View.SYSTEM_UI_FLAG_VISIBLE;
    mHideFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE;
    mTestFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE;

    if ((mFlags & FLAG_FULLSCREEN) != 0) {
        // If the client requested fullscreen, add flags relevant to hiding
        // the status bar. Note that some of these constants are new as of
        // API 16 (Jelly Bean). It is safe to use them, as they are inlined
        // at compile-time and do nothing on pre-Jelly Bean devices.
        mShowFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
        mHideFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                | View.SYSTEM_UI_FLAG_FULLSCREEN;
    }

    if ((mFlags & FLAG_HIDE_NAVIGATION) != 0) {
        // If the client requested hiding navigation, add relevant flags.
        mShowFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
        mHideFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
        mTestFlags |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
    }
}
 
开发者ID:Linguaculturalists,项目名称:Phoenicia,代码行数:29,代码来源:SystemUiHiderHoneycomb.java

示例4: 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

示例5: SystemUiHiderHoneycomb

/**
 * Constructor not intended to be called by clients. Use
 * {@link SystemUiHider#getInstance} to obtain an instance.
 */
protected SystemUiHiderHoneycomb(Activity activity, View anchorView, int flags) {
	super(activity, anchorView, flags);

	mShowFlags = View.SYSTEM_UI_FLAG_VISIBLE;
	mHideFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE;
	mTestFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE;

	if ((mFlags & FLAG_FULLSCREEN) != 0) {
		// If the client requested fullscreen, add flags relevant to hiding
		// the status bar. Note that some of these constants are new as of
		// API 16 (Jelly Bean). It is safe to use them, as they are inlined
		// at compile-time and do nothing on pre-Jelly Bean devices.
		mShowFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
		mHideFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_FULLSCREEN;
	}

	if ((mFlags & FLAG_HIDE_NAVIGATION) != 0) {
		// If the client requested hiding navigation, add relevant flags.
		mShowFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
		mHideFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
		mTestFlags |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
	}
}
 
开发者ID:joaomneto,项目名称:TitanCompanion,代码行数:27,代码来源:SystemUiHiderHoneycomb.java

示例6: SystemUiHiderHoneycomb

/**
 * Constructor not intended to be called by clients. Use {@link SystemUiHider#getInstance} to
 * obtain an instance.
 */
protected SystemUiHiderHoneycomb(Activity activity, View anchorView, int flags) {
    super(activity, anchorView, flags);

    mShowFlags = View.SYSTEM_UI_FLAG_VISIBLE;
    mHideFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE;
    mTestFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE;

    if ((mFlags & FLAG_FULLSCREEN) != 0) {
        // If the client requested fullscreen, add flags relevant to hiding
        // the status bar. Note that some of these constants are new as of
        // API 16 (Jelly Bean). It is safe to use them, as they are inlined
        // at compile-time and do nothing on pre-Jelly Bean devices.
        mShowFlags |= 0x00000400;// View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
        mHideFlags |= 0x00000400 //View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                      | 0x00000004; // View.SYSTEM_UI_FLAG_FULLSCREEN;
    }

    if ((mFlags & FLAG_HIDE_NAVIGATION) != 0) {
        // If the client requested hiding navigation, add relevant flags.
        mShowFlags |= 0x00000200;//View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
        mHideFlags |= 0x00000200//View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                      | 0x00000002;//View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
        mTestFlags |= 0x00000002;//View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
    }
}
 
开发者ID:starcor-company,项目名称:starcor.xul,代码行数:29,代码来源:SystemUiHiderHoneycomb.java

示例7: setUiVisibilityKitKat

@TargetApi(Build.VERSION_CODES.KITKAT)
private void setUiVisibilityKitKat(boolean isVisible) {
  int flags = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
      | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
      | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
  if (!isVisible) {
    flags |= View.SYSTEM_UI_FLAG_LOW_PROFILE
        | View.SYSTEM_UI_FLAG_FULLSCREEN
        | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
        | View.SYSTEM_UI_FLAG_IMMERSIVE;
  }
  viewPager.setSystemUiVisibility(flags);
}
 
开发者ID:Elias33,项目名称:Quran,代码行数:13,代码来源:PagerActivity.java

示例8: setUpViewForFullscreen

private void setUpViewForFullscreen() {
    if (isFullscreenLayout() && !isMultipaneLayout()) {
        View decorView = getWindow().getDecorView();
        int uiOptions = decorView.getSystemUiVisibility();
        uiOptions ^= View.SYSTEM_UI_FLAG_LOW_PROFILE;
        uiOptions ^= View.SYSTEM_UI_FLAG_FULLSCREEN;
        uiOptions ^= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
        uiOptions ^= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
        uiOptions ^= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
        uiOptions ^= View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
        decorView.setSystemUiVisibility(uiOptions);
    }
}
 
开发者ID:ecarrara-araujo,项目名称:yabaking,代码行数:13,代码来源:StepsNavigationActivity.java

示例9: onCreate

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    ActivityCompat.postponeEnterTransition(this);
    ActivityCompat.setEnterSharedElementCallback(this, enterTransitionCallback);

    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_view_pager_gallery);

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    toolbar.setTitle("Gallery");
    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    galleryViewPagerAdapter = new GalleryViewPagerAdapter(this);

    viewPager = (ViewPager) findViewById(R.id.container);
    viewPager.setAdapter(galleryViewPagerAdapter);

    int position = selectedIndex = getIntent().getIntExtra(EXTRA_POSITION, 0);
    viewPager.setCurrentItem(position);
    viewPager.setOnPageChangeListener(pageChangeListener);
    viewPager.getViewTreeObserver().addOnGlobalLayoutListener(pagerLayoutListener);
}
 
开发者ID:adithya321,项目名称:Instincts-2k17,代码行数:33,代码来源:GalleryViewPagerActivity.java

示例10: onCreate

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    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_splash);
    ButterKnife.bind(this);

    DisplayMetrics displayMetrics = this.getResources().getDisplayMetrics();
    spinArrow.setTranslationX(-2000);
    wheelView.setTranslationX(2000);
    wheelView.setWheelRadius(displayMetrics.widthPixels / 2);
    wheelView.setWheelItemRadius(displayMetrics.widthPixels / 6);

    new Handler().postDelayed(new Runnable() {
        @Override
        public void run() {
            startSecondActivity();
        }
    }, 1000);
}
 
开发者ID:adithya321,项目名称:Instincts-2k17,代码行数:29,代码来源:SplashActivity.java

示例11: createTestFlags

@Override
protected int createTestFlags() {
    if (mLevel >= SystemUiHelper.LEVEL_LEAN_BACK) {
        // Intentionally override test flags.
        return View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
    }

    return View.SYSTEM_UI_FLAG_LOW_PROFILE;
}
 
开发者ID:h4h13,项目名称:RetroMusicPlayer,代码行数:9,代码来源:SystemUiHelperImplICS.java

示例12: onCreate

@Override
protected void onCreate(Bundle savedInstanceState) {
    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_register);
    ButterKnife.bind(this);

    getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);

    ShowEnterAnimation();

    fab.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            animateRevealClose();
        }
    });

    databaseReference = FirebaseDatabase.getInstance().getReference();
    currentUser = FirebaseAuth.getInstance().getCurrentUser();
    auth = FirebaseAuth.getInstance();
    authStateListener = new FirebaseAuth.AuthStateListener() {
        @Override
        public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
            FirebaseUser user = firebaseAuth.getCurrentUser();
            if (user != null) {
                Log.d(TAG, "onAuthStateChanged:signed_in:" + user.getUid());
            } else {
                Log.d(TAG, "onAuthStateChanged:signed_out");
            }
        }
    };

    try {
        populateProfile();
    } catch (Exception e) {
        LogHelper.e(TAG, e.toString());
    }
}
 
开发者ID:adithya321,项目名称:Instincts-2k17,代码行数:48,代码来源:RegisterActivity.java

示例13: onCreate

@Override
protected void onCreate(Bundle savedInstanceState) {
    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_login);
    ButterKnife.bind(this);

    getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);

    auth = FirebaseAuth.getInstance();
    authListener = new FirebaseAuth.AuthStateListener() {
        @Override
        public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
            FirebaseUser user = firebaseAuth.getCurrentUser();
            if (user != null) {
                Log.d(TAG, "onAuthStateChanged:signed_in:" + user.getUid());
            } else {
                Log.d(TAG, "onAuthStateChanged:signed_out");
            }
        }
    };

    moveClouds();
}
 
开发者ID:adithya321,项目名称:Instincts-2k17,代码行数:33,代码来源:LoginActivity.java

示例14: createHideFlags

@Override
protected int createHideFlags() {
    int flag = View.SYSTEM_UI_FLAG_LOW_PROFILE;

    if (mLevel >= SystemUiHelper.LEVEL_LEAN_BACK) {
        flag |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
    }

    return flag;
}
 
开发者ID:ujjwalagrawal17,项目名称:CodeCompilerApp,代码行数:10,代码来源:SystemUiHelperImplICS.java

示例15: onCreate

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // 设置无标题
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    // 设置全屏
    Window window = getWindow();
    window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    // 隐藏虚拟按键
    WindowManager.LayoutParams params = window.getAttributes();
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
        params.systemUiVisibility = View.SYSTEM_UI_FLAG_LOW_PROFILE;
    }
    window.setAttributes(params);
    // 强行开启屏幕旋转效果
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);

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

    Intent intent = getIntent();
    mMiaoPaiUrl = intent.getStringExtra(INTENT_MIAO_PAI_URL);
    mVideoUrl = intent.getStringExtra(INTENT_VIDEO_URL);

    setListener();  // 设置监听器
    init();         // 初始化VideoView
}
 
开发者ID:liying2008,项目名称:Simpler,代码行数:27,代码来源:VideoPlayerActivity.java


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