顯示帶模糊效果的DialogFragment:BlurDialogFragment

jopen 10年前發布 | 56K 次閱讀 Android開發 移動開發 BlurDialogFragment

這個項目能夠實現一個顯示帶模糊效果的DialogFragment。 模糊的部分是通過FastBlur算法實現。
顯示帶模糊效果的DialogFragment:BlurDialogFragment

Simple usage using inheritance

If you are using android.app.DialogFragment : extends BlurDialogFragment. Play with the blur radius and the down scale factor to obtain the perfect blur.

Don't forget to enable log in order to keep on eye the perfomance.

/**
 * Simple fragment with blurring effect behind.
 */
public class SampleDialogFragment extends BlurDialogFragment {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.debug(true);
        this.setBlurRadius(4);
        this.setDownScaleFactor(5.0f);

        ...
    }

    ...
}

項目主頁:http://www.baiduhome.net/lib/view/home/1416280263289

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!