我在NestedScrollview中有一个Recyclerview ..一切正常,除了一个thig.我在NestedScrollview中有三个视图,前两个是LinearLayout然后是Recyclerview.当我运行我的应用程序时,活动不显示前两个布局,它从Recyclerview的顶部开始.
它如何显示我的布局:
它的假设如何显示:
我在viewpager下加载这个enite布局,我的viewpager是Coordinator Layout的子代.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/home_layout_background">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<com.daimajia.slider.library.SliderLayout
android:id="@+id/image_slider"
android:layout_width="match_parent"
android:layout_height="@dimen/image_slider_height"
android:layout_marginTop="@dimen/image_slider_top_margin" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/popular_fragment_side_padding"
android:layout_marginRight="@dimen/popular_fragment_side_padding"
android:layout_marginTop="@dimen/popular_fragment_side_padding"
android:orientation="horizontal"
android:weightSum="4">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<RelativeLayout
android:id="@+id/free_delivery"
android:layout_width="76dp"
android:layout_height="76dp"
android:layout_centerInParent="true"
android:background="@color/white">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true">
<ImageView
android:id="@+id/btnImageViewFreeDelivery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@drawable/icon_free_delivery" />
<TextView
android:id="@+id/btnTextFreeDelivery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/btnImageViewFreeDelivery"
android:layout_centerHorizontal="true"
android:layout_marginTop="2dp"
android:text="@string/free_delivery_txt"
android:textColor="@color/popular_fragment_four_btn_txt"
android:textSize="@dimen/popular_fragment_four_btn_txt_size" />
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<RelativeLayout
android:id="@+id/flash_deals"
android:layout_width="76dp"
android:layout_height="76dp" …Run Code Online (Sandbox Code Playgroud)