如何添加一个简单的8dp页眉/页脚到Android的RecyclerView?
有没有办法添加一个简单的页眉/页脚到RecyclerView?
 在这里你可以看到我有什么。 第一张卡片触摸工具栏 
 在这里,你可以看到我想要的。 底部和卡之间填充8dp。 
我到目前为止尝试的方法:
我确信有一个我不知道的简单解决scheme。
添加一个顶部填充和设置clipToPadding为false将做的伎俩。 
 像这样的东西: 
  <android.support.v7.widget.RecyclerView android:id="@+id/recyclerview" android:paddingTop="8dp" android:clipToPadding="false" android:layout_width="match_parent" android:layout_height="match_parent" /> 
 如果您使用带有layout_weight的RecyclerView,并且paddingBottom不适合您,请确保将layout_height设置为0dp ! 否则,奇怪的是,paddingTop的作品,但paddingBottom不: 
 <android.support.v7.widget.RecyclerView android:id="@+id/recycler" android:paddingBottom="20dp" android:clipToPadding="false" android:layout_weight="1" android:layout_width="match_parent" android:layout_height="0dp" />