Created by: joshfriend
If the panel is completely invisible initially, you may want to remove the shadow until the panel is visible. In the PanelSlideListener
:
@Override
public void onPanelSlide(View view, float v) {
switch (panel.getPanelState()) {
case COLLAPSED:
// Collapsed height is 0dp, so we don't want the shadow
// showing unless the panel is visible
panel.setShadowDrawable(null);
break;
default:
panel.setShadowDrawable(
getResources().getDrawable(R.drawable.below_shadow)
);
break;
}
}