@Override protected void onWindowVisibilityChanged(int visibility) { super.onWindowVisibilityChanged(visibility); // When we become visible, we show our navigation elements briefly // before hiding them. setNavVisibility(true); getHandler().postDelayed(mNavHider, 2000); }
@Override protected void onWindowVisibilityChanged(int visibility) { super.onWindowVisibilityChanged(visibility); // When we become visible, we show our navigation elements briefly // before hiding them. setNavVisibility(true); getHandler().postDelayed(mNavHider, 2000); }
@Override public void run() { setNavVisibility(false); } };
@Override public void onClick(View v) { // When the user clicks, we toggle the visibility of navigation elements. int curVis = getSystemUiVisibility(); setNavVisibility((curVis&SYSTEM_UI_FLAG_LOW_PROFILE) != 0); }
@Override public void onSystemUiVisibilityChange(int visibility) { // Detect when we go out of low-profile mode, to also go out // of full screen. We only do this when the low profile mode // is changing from its last state, and turning off. int diff = mLastSystemUiVis ^ visibility; mLastSystemUiVis = visibility; if ((diff&SYSTEM_UI_FLAG_LOW_PROFILE) != 0 && (visibility&SYSTEM_UI_FLAG_LOW_PROFILE) == 0) { setNavVisibility(true); } }
public void init(TextView title, SeekBar seek) { // This called by the containing activity to supply the surrounding // state of the content browser that it will interact with. mTitleView = title; mSeekView = seek; setNavVisibility(true); }
@Override public void onClick(View v) { // When the user clicks, we toggle the visibility of navigation elements. int curVis = getSystemUiVisibility(); setNavVisibility((curVis&SYSTEM_UI_FLAG_LOW_PROFILE) != 0); }
@Override protected void onScrollChanged(int l, int t, int oldl, int oldt) { super.onScrollChanged(l, t, oldl, oldt); // When the user scrolls, we hide navigation elements. setNavVisibility(false); }
@Override public void onSystemUiVisibilityChange(int visibility) { // Detect when we go out of low-profile mode, to also go out // of full screen. We only do this when the low profile mode // is changing from its last state, and turning off. int diff = mLastSystemUiVis ^ visibility; mLastSystemUiVis = visibility; if ((diff&SYSTEM_UI_FLAG_LOW_PROFILE) != 0 && (visibility&SYSTEM_UI_FLAG_LOW_PROFILE) == 0) { setNavVisibility(true); } }
@Override protected void onScrollChanged(int l, int t, int oldl, int oldt) { super.onScrollChanged(l, t, oldl, oldt); // When the user scrolls, we hide navigation elements. setNavVisibility(false); }
@Override public void run() { setNavVisibility(false); } };
public void init(TextView title, SeekBar seek) { // This called by the containing activity to supply the surrounding // state of the content browser that it will interact with. mTitleView = title; mSeekView = seek; setNavVisibility(true); }