亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

永久隱藏活動中的導航欄

永久隱藏活動中的導航欄

大話西游666 2019-10-18 13:50:02
是否可以永久刪除活動上的導航欄?我想使用出現在平板電腦屏幕按鈕上的按鈕而不是操作欄來刪除該欄。在這里。我知道不建議您這樣做,我沒有做出此決定,但我需要這樣做。在我的布局上,還有另一個按鈕可以退出活動。我的應用程序的其余部分可以具有導航欄。我找到了這段代碼,并對其進行了一些修改。問題是,即使我隱藏了導航欄,也仍然留有黑色空間。我想系統會在考慮導航欄的情況下計算屏幕尺寸?public static class Content extends ImageView implements View.OnSystemUiVisibilityChangeListener, View.OnClickListener, ActionBar.OnMenuVisibilityListener {    Activity mActivity;    TextView mTitleView;    Button mPlayButton;    SeekBar mSeekView;    boolean mAddedMenuListener;    boolean mMenusOpen;    boolean mPaused;    boolean mNavVisible;    int mLastSystemUiVis;    Runnable mNavHider = new Runnable() {        @Override public void run() {            setNavVisibility(false);        }    };    public Content(Context context, AttributeSet attrs) {        super(context, attrs);        setOnSystemUiVisibilityChangeListener(this);        setOnClickListener(this);    }    public void init(Activity activity, TextView title, Button playButton,            SeekBar seek) {        // This called by the containing activity to supply the surrounding        // state of the video player that it will interact with.        mActivity = activity;        mTitleView = title;        mPlayButton = playButton;        mSeekView = seek;        mPlayButton.setOnClickListener(this);        setPlayPaused(true);    }    @Override protected void onAttachedToWindow() {        super.onAttachedToWindow();        if (mActivity != null) {            mAddedMenuListener = true;            mActivity.getActionBar().addOnMenuVisibilityListener(this);        }    }    @Override protected void onDetachedFromWindow() {        super.onDetachedFromWindow();        if (mAddedMenuListener) {            mActivity.getActionBar().removeOnMenuVisibilityListener(this);        }    }
查看完整描述

3 回答

?
函數式編程

TA貢獻1807條經驗 獲得超9個贊

AFAIK,如果沒有root用戶訪問權限,這是不可能的。能夠擁有無法通過系統按鈕退出的應用程序將是一個安全問題。

查看完整回答
反對 回復 2019-10-18
  • 3 回答
  • 0 關注
  • 286 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號