Code example for BitmapDrawable

    @SuppressWarnings("RedundantCast") //For some reason this is needed because of a compile error without it 
    public void testBackgroundDrawable() { 
      BitmapDrawable bitmapDrawable = new BitmapDrawable();
      assertThat((BitmapDrawable) popupWindow.getBackground()).isSameAs(bitmapDrawable);
    public void testTouchInterceptor() { 
      popupWindow.setTouchInterceptor(new View.OnTouchListener() {
        public boolean onTouch(View v, MotionEvent event) {
          return event.getAction() == ACTION_DOWN;
Stop searching for code, let great code find you!  Add Codota to your java IDE