I'm trying to create a Custom Sliding Drawer (SD) derived from the SlidingDrawer class. A simple custom SD displays fine when used in the layout. However, if I override the onMeasure method and setMeasureddimension to specific values, the SD does not display any more in the layout.

Can anyone please suggest if there is any solution to override onMeasure of a SlidingDrawer?