我有一个Recyclerview视图的两个xml布局。我正在使用LinearLayoutManager。
XML1:
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp">
<...ChildViews...>
</android.support.v7.widget.CardView>
XML2
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp">
<...ChildViews...>
</android.support.v7.widget.CardView>
</FrameLayout>
如果我给xml1充气,那么没有保证金。但是在xml2的通货膨胀时,则会产生保证金。是什么原因?