Search code examples
androiddrawerlayout

How set padding (or margin) to android.support.v4.widget.DrawerLayout, but


I have a list with many elements, and this list - in DrawerLayout. Here http://www.google.com/design/spec/patterns/navigation-drawer.html - Vertical spacing - 8dp, that what me need.

How set padding or margin (8dp) to DrawerLayout, that after scroll down my list , this padding or margin be scrolled along with the list. Not be stayed always in on top ... (I want behaviour like scrolling items on ScroolViews)...

Thanks


Solution

  • With padding="8dp", use clipToPadding="false". The children views will be drawn on top of your padding when you scroll your listview.