Android:模糊布局后面的列表视图

Android:模糊布局后面的列表视图,android,layout,blur,uiblureffect,Android,Layout,Blur,Uiblureffect,我有一个listview和一个位于listview前面的布局。我希望这个布局有一个背景,就是他背后的模糊的listview。就像图像中的一样。模糊会根据listview滚动而改变。我该怎么做 参考了这个博客 参考这个博客 这个库就是你需要的 在活动中 blurView = (BlurView) findViewById(R.id.blurView); final View decorView = getWindow().getDecorView(); final Vie

我有一个listview和一个位于listview前面的布局。我希望这个布局有一个背景,就是他背后的模糊的listview。就像图像中的一样。模糊会根据listview滚动而改变。我该怎么做

参考了这个博客

参考这个博客


这个库就是你需要的

在活动中

    blurView = (BlurView) findViewById(R.id.blurView);

    final View decorView = getWindow().getDecorView();
    final View rootView = decorView.findViewById(android.R.id.content);
    final Drawable windowBackground = decorView.getBackground();

    blurView.setupWith(rootView)
            .windowBackground(windowBackground)
            .blurAlgorithm(new RenderScriptBlur(this, true)) //Preferable algorithm, needs RenderScript support mode enabled
            .blurRadius(10);

这个库就是你需要的

在活动中

    blurView = (BlurView) findViewById(R.id.blurView);

    final View decorView = getWindow().getDecorView();
    final View rootView = decorView.findViewById(android.R.id.content);
    final Drawable windowBackground = decorView.getBackground();

    blurView.setupWith(rootView)
            .windowBackground(windowBackground)
            .blurAlgorithm(new RenderScriptBlur(this, true)) //Preferable algorithm, needs RenderScript support mode enabled
            .blurRadius(10);

不是问那个艾敏不是问那个艾敏
    renderscriptTargetApi 23
    renderscriptSupportModeEnabled true
    blurView = (BlurView) findViewById(R.id.blurView);

    final View decorView = getWindow().getDecorView();
    final View rootView = decorView.findViewById(android.R.id.content);
    final Drawable windowBackground = decorView.getBackground();

    blurView.setupWith(rootView)
            .windowBackground(windowBackground)
            .blurAlgorithm(new RenderScriptBlur(this, true)) //Preferable algorithm, needs RenderScript support mode enabled
            .blurRadius(10);