@Test public void shouldPreinitRenderScriptOnAttachToWindow() { DrawerLayoutWithBlurredBackground drawerLayoutWithBlurredBackground = new DrawerLayoutWithBlurredBackground(RuntimeEnvironment.application); BlurringMachine blurringMachine = mock(BlurringMachine.class); drawerLayoutWithBlurredBackground.blurringMachine = blurringMachine; Bitmap bitmap = mock(Bitmap.class); given(blurringMachine.blur(any(Bitmap.class))) .willReturn(bitmap); drawerLayoutWithBlurredBackground.onAttachedToWindow(); verify(drawerLayoutWithBlurredBackground.blurringMachine) .blur(any(Bitmap.class)); }
@Override protected void onAttachedToWindow() { super.onAttachedToWindow(); removeDefaultBackground(); drawerBackgroundView.addBlurredLayer(); preInitRenderScriptLibraries(); }
DrawerLayoutWithBlurredBackground extends DrawerLayout implements BlurringImageListener { @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); removeDefaultBackground(); drawerBackgroundView.addBlurredLayer(); preInitRenderScriptLibraries(); } }
DrawerLayoutWithBlurredBackground extends DrawerLayout implements BlurringImageListener { @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); removeDefaultBackground(); drawerBackgroundView.addBlurredLayer(); preInitRenderScriptLibraries(); } DrawerLayoutWithBlurredBackground(Context context);  DrawerLayoutWithBlurredBackground(Context context, AttributeSet attrs);  DrawerLayoutWithBlurredBackground(Context context, AttributeSet attrs, int defStyle); }
DrawerLayoutWithBlurredBackground extends DrawerLayout implements BlurringImageListener { @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); removeDefaultBackground(); drawerBackgroundView.addBlurredLayer(); preInitRenderScriptLibraries(); } DrawerLayoutWithBlurredBackground(Context context);  DrawerLayoutWithBlurredBackground(Context context, AttributeSet attrs);  DrawerLayoutWithBlurredBackground(Context context, AttributeSet attrs, int defStyle); @Override void onBlurringFinish(Bitmap blurredImage); @Override void setDrawerListener(DrawerListener listener); @Override void setScrimColor(int color); }
DrawerLayoutWithBlurredBackground extends DrawerLayout implements BlurringImageListener { @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); removeDefaultBackground(); drawerBackgroundView.addBlurredLayer(); preInitRenderScriptLibraries(); } DrawerLayoutWithBlurredBackground(Context context);  DrawerLayoutWithBlurredBackground(Context context, AttributeSet attrs);  DrawerLayoutWithBlurredBackground(Context context, AttributeSet attrs, int defStyle); @Override void onBlurringFinish(Bitmap blurredImage); @Override void setDrawerListener(DrawerListener listener); @Override void setScrimColor(int color);  }