ステータスバーが表示されなくなりました。私は私が説明してみましょう私は練習を実装しており、さらにedittext,
のキーボードの場所のandroid:windowSoftInputMode="adjustResize"
にマニフェストファイルを配置していますそれはうまくいきますが、私はnavigation bar
を隠したいので、"Theme.Holo.Light.NoActionBar.Fullscreen"
テーマを使用しています。しかし、キーボードに表示されるアプリケーションのナビゲーションバーもスクロールします。キーボードが表示されているときにスクロールするナビゲーションバーと通知バーを非表示にするにはどうすればよいですか? ステータスバーを非表示にするには
0
A
答えて
0
私は、これはあなたを助ける=>http://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)
=> setSystemUiVisibility(newVis)だと思います。 //このメソッドはあなたを助けます
=>これは情報のクラスであり、理解を深めることです。
public static classコンテンツがScrollViewを継承します View.OnSystemUiVisibilityChangeListener、View.OnClickListener { TextView mText; TextView mTitleView; SeekBar mSeekView; ; boolean mNavVisible; int mBaseSystemUiVisibility = SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | SYSTEM_UI_FLAG_LAYOUT_STABLE; int mLastSystemUiVis;
Runnable mNavHider = new Runnable() {
@Override public void run() {
setNavVisibility(false);
}
};
public Content(Context context, AttributeSet attrs) {
super(context, attrs);
mText = new TextView(context);
mText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
mText.setText(context.getString(R.string.alert_dialog_two_buttons2ultra_msg));
mText.setClickable(false);
mText.setOnClickListener(this);
mText.setTextIsSelectable(true);
addView(mText, new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
setOnSystemUiVisibilityChangeListener(this);
}
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 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 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 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 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);
}
void setBaseSystemUiVisibility(int visibility) {
mBaseSystemUiVisibility = visibility;
}
void setNavVisibility(boolean visible) {
int newVis = mBaseSystemUiVisibility;
if (!visible) {
newVis |= SYSTEM_UI_FLAG_LOW_PROFILE | SYSTEM_UI_FLAG_FULLSCREEN;
}
final boolean changed = newVis == getSystemUiVisibility();
// Unschedule any pending event to hide navigation if we are
// changing the visibility, or making the UI visible.
if (changed || visible) {
Handler h = getHandler();
if (h != null) {
h.removeCallbacks(mNavHider);
}
}
// Set the new desired visibility.
setSystemUiVisibility(newVis);
mTitleView.setVisibility(visible ? VISIBLE : INVISIBLE);
mSeekView.setVisibility(visible ? VISIBLE : INVISIBLE);
}
}の
関連する問題
- 1. ステータスバーを非表示には、
- 2. ナビゲーションとステータスバーを非表示にする
- 3. ステータスバーを非表示にする
- 4. UWPのステータスバーを非表示にする
- 5. TabNavigator - ステータスバーを非表示にする
- 6. ステータスバーCordovaを非表示にする
- 7. iOS10:ステータスバーを非表示UITabBarController()
- 8. ステータスバーを非表示 - IOS
- 9. Navbarを非表示にして、ステータスバーに背景を表示
- 10. の非表示ステータスバーが完全に
- 11. ランタイム非表示/表示ステータスバーiOS 9+
- 12. ios 10のステータスバーを非表示にする方法は?
- 13. ステータスバーを非表示にする方法は?
- 14. オンデマンドでステータスバーを非表示にする方法は?
- 15. アンドロイド4にステータスバーを非表示にする方法アンドロイド4
- 16. Firefoxのリンク先を表示するステータスバーを非表示にする方法
- 17. ギャラリーインテントを開始するときにステータスバーを非表示にするには
- 18. React Nativeでステータスバーを非表示にする
- 19. Android 4.1以降でステータスバーを非表示にする方法
- 20. スプラッシュ画面でステータスバーを非表示にする方法
- 21. Microsoft Officeオンラインビューアのステータスバーを非表示にする方法
- 22. 起動イメージのステータスバーを非表示にする
- 23. IE8のアドレスバーとステータスバーを非表示にする
- 24. iPadのUIModalPresentationFormSheet - ステータスバーを非表示にする
- 25. ステータスバーを非表示にする特定のViewコントローラで*特定*
- 26. vim-airline - ステータスバーのファイルタイプを非表示にする
- 27. Swift 3.0のUIPageViewControllerのステータスバーを非表示にするiOS
- 28. Android:Chromeのステータスバーを非表示にするカスタムタブ
- 29. Ionic 2のステータスバーを非表示にする
- 30. アクションバーとステータスバーを非表示にする没入型フルスクリーン
可能な重複http://stackoverflow.com/questions/5431365/how-to-hide-status-bar-in-android –