1、缓冲背景色
<ListView
android:
/>
2、给ListView添加头布局
a、头布局文件
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <FrameLayout android:layout_width="match_parent" android:layout_height="180dp" > <com.itheima.zhsh66.view.HorizontalScrollViewPager android:id="@+id/vp_tab_detail" android:layout_width="match_parent" android:layout_height="match_parent" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:background="#a000" android:padding="5dp" > <TextView android:id="@+id/tv_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="标题" android:textColor="#fff" android:textSize="18sp" /> <com.viewpagerindicator.CirclePageIndicator android:id="@+id/indicator" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:padding="10dip" app:fillColor="#f00" app:pageColor="#9e9e9e" app:radius="3dp" app:strokeWidth="0dp" /> </RelativeLayout> </FrameLayout> </LinearLayout>