android - Why my main background wrap content instead of match parent? -


i have been doing nested recyclerview lately, , post managed solve problem. why main background wrap content custom layout instead of match parent?

<framelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffc18d" android:id="@+id/flayout"> <android.support.v7.widget.cardview     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_gravity="center_horizontal"     android:layout_marginleft="5dp"     android:layout_marginright="5dp"     card_view:cardelevation="2dp"     card_view:cardusecompatpadding="true"     card_view:cardcornerradius="3dp">     <linearlayout         android:layout_height="wrap_content"         android:layout_width="match_parent"         android:orientation="vertical"         android:id="@+id/lltextholder">         <textview             android:text="title"             android:textappearance="?android:attr/textappearancemedium"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:textstyle="bold"             android:textcolor="#000000"             android:id="@+id/tvcardheader"             android:layout_marginbottom="10dp"             android:layout_marginleft="5dp" />         <android.support.v7.widget.recyclerview             android:id="@+id/takwimrecyclerviewlist"             android:layout_width="match_parent"             android:layout_height="wrap_content" />     </linearlayout> </android.support.v7.widget.cardview> 

and here screenshot.

enter image description here

any ideas why happening?

wrapcontent means wrap content according size i.e shrink or expand according. matchparent match parent regardless of size , not good.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -