android - ViewPager not shown after setting layout_weight="1" -
i have layout below
<linearlayout android:id="@+id/home_screen" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <android.support.v4.view.viewpager android:id="@+id/slide_pager" android:layout_width="wrap_content" android:layout_weight="1" android:layout_height="0dp" > </android.support.v4.view.viewpager> <relativelayout android:id="@+id/footer" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:visibility="visible" > < .. views /> </relativelayout> </linearlayout>
when setting height of relativelayout
footer 200dp , see viewpager
.if footer 'wrap_content' viepager
disappeared. tried setting weight of viewpager
1 of no use . want footer wrap_content
. , viewpager
occupy remaining space.
thank you.
the issue same after setting layout_height
wrap_content.
if in vertical linearlayout, set width 0dp, not going shown. happens in horizontal linearlayout , 0dp of height.
just change width wrap_content (or whatever else).
Comments
Post a Comment