退出全屏的活动有时候树叶在操作栏中的文物和系统,航区全屏、栏中、树叶、文物

2023-09-12 23:41:45 作者:笑该动人,

我有一个正常的活动(A),可见操作栏会启动另外的全屏活动(B)来显示照片。当(B)完成和活动(A)显​​示回有时我可以看到下面的图片:

请注意可视化的操作栏和导航领域的失真。 上述文物才会消失时,我开始与该活动交互,滚动它,等等。

全屏活动code:

 保护无效的onCreate(包savedInstanceState){
    supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow()setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN)。

    super.onCreate(savedInstanceState);

    动作条supportActionBar = getSupportActionBar();
    supportActionBar.hide();
}
 

在AndroidManifest.xml中没有提示的使用。 支持库使用(appcompat) 在转载在Nexus 4,安卓5.0.1

唯一的风格定制,我有:

 <样式名称=Theme.MyApp父=@风格/ Theme.AppCompat工具:忽略=NewApi>
    <! - 文本外观 - >
    <项目名称=机器人:textColorLink> @色/ LINKCOLOR< /项目>
< /风格>
 
win10如何取消窗口靠边自动最大化全屏功能 win10任务栏挡住了最大化后的窗口

有谁知道任何线索,这是为什么?

解决方案

这是棒棒堂的Nexus设备的错误。至于解决方法,将有可能禁用清单活动的声明硬件加速: 机器人:hardwareAccelerated =假(这会降低图形性能)

I have a normal Activity (A) with visible Action Bar which launches another fullscreen activity (B) to display photos. When (B) finishes and activity (A) is displayed back sometimes I can see the following picture:

Please note visual distortion of action bar and navigation areas. The above artifacts disappear only when I start interacting with the activity, scrolling it, etc.

Full screen activity code:

protected void onCreate(Bundle savedInstanceState) {
    supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

    super.onCreate(savedInstanceState);

    ActionBar supportActionBar = getSupportActionBar();
    supportActionBar.hide();
}

No hints in AndroidManifest.xml are used. Support libraries are used (appcompat) Reproduced on Nexus 4, Android 5.0.1

The only style customization that I have:

 <style name="Theme.MyApp" parent="@style/Theme.AppCompat" tools:ignore="NewApi">
    <!-- Text appearance -->
    <item name="android:textColorLink">@color/linkColor</item>
</style>

Does anybody know any clues why is that ?

解决方案

It is a bug on Lollipop Nexus devices. As workaround it would be possible to disable hardware acceleration on manifest activity's declaration: android:hardwareAccelerated="false" (this slows graphic performances).