DrawerBackgroundView { public void disableBlurredLayers() { blurBackground.setVisibility(View.GONE); orginalBackground.setVisibility(View.GONE); } DrawerBackgroundView(DrawerLayoutWithBlurredBackground drawerLayoutWithBlurredBackground); synchronized void addBlurredLayer(); synchronized void setImageBitmap(Bitmap blurredImage); synchronized void reset(); synchronized void setAlpha(float alphaLevel); void disableBlurredLayers(); void enableBlurredLayers(); static final float NOT_TRANSPARENT_ALPHA_LEVEL; }
@Test public void shouldHideBlurredBackgroundOnDisabling() { drawerBackgroundView.blurBackground.setVisibility(View.VISIBLE); drawerBackgroundView.orginalBackground.setVisibility(View.VISIBLE); drawerBackgroundView.disableBlurredLayers(); assertThat(drawerBackgroundView.blurBackground.getVisibility()).isEqualTo(View.GONE); assertThat(drawerBackgroundView.orginalBackground.getVisibility()) .isEqualTo(View.GONE); }