Skip to content

使用 blur 库的界面,按返回键会闪屏 #824

@VankaIn

Description

@VankaIn
  • Library version 1.3.3
    使用库RealtimeBlurView ,BlurKit-Android ,实现模糊效果,但是当打开使用该库的界面,然后按返回键会闪屏。复现视频
    以下是使用RealtimeBlurView之后的代码,更改 demo 中 wechat_fragment_new_feature.xml 代码可复现:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical">

    <include layout="@layout/toolbar"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:layout_marginLeft="16dp"
        android:layout_marginRight="16dp"
        android:layout_marginTop="48dp"
        android:text="@string/new_tip_start"
        android:textColor="@android:color/black"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:layout_marginLeft="16dp"
        android:text="extraTransaction()\n.setCustomAnimations(enter,exit...)\n.start()"/>

    <Button
        android:id="@+id/btn_start"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="16dp"
        android:layout_marginRight="16dp"
        android:text="start()"
        android:textAllCaps="false"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:layout_marginLeft="16dp"
        android:layout_marginRight="16dp"
        android:layout_marginTop="32dp"
        android:text="@string/new_tip_start_dont_hide"
        android:textColor="@android:color/black"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:layout_marginLeft="16dp"
        android:text="extraTransaction()\n.setCustomAnimations(enter,exit...)\n.startDontHideSelf()"/>

    <!--以下是更改的代码-->
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <Button
            android:id="@+id/btn_start_dont_hide"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            android:text="startDontHideSelf()"
            android:textAllCaps="false"/>

        <com.github.mmin18.widget.RealtimeBlurView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:realtimeBlurRadius="20dp"
            app:realtimeOverlayColor="#8000" />

    </RelativeLayout>


</LinearLayout>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions