gyf-dev / gyf-dev/ImmersionBar

隐藏状态栏后再恢复显示状态栏如何避免界面抖动

Open
#511 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
11.5k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

您好:
我遇到一下问题
界面一 ActivityA 初始化时隐藏状态栏
ImmersionBar.with(this)
.hideBar(BarHide.FLAG_HIDE_STATUS_BAR) //隐藏状态栏或导航栏或两者,不写默认不隐藏
.init(); //必须调用方可沉浸式
步骤二 跳转到界面二 SecondActivity

public class SecondActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_second);
}

}

界面二 布局会抖动,状态栏和布局不是同事绘制的;状态栏 开始时白色,后加载完成;
再oppo手机上尤其明显
机型 OPPO A57 android 6.0.1 ColorOS V3.0

请问有什么方法可以解决
或者有什么办法,在点击布局的时候,状态栏悬浮显示, 再点击又隐藏;类似手机图库查看图片的效果;

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the transition from ActivityA, where ImmersionBar.hideBar(BarHide.FLAG_HIDE_STATUS_BAR).init() hides the status bar, to SecondActivity using activity_second.xml on the listed OPPO A57 configuration. Start by examining the ImmersionBar setup and SecondActivity.onCreate; done means restoring or displaying the status bar without visible layout or status-bar flicker.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.