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>
View Code

相关文章:

  • 2022-12-23
  • 2021-06-25
  • 2021-04-07
  • 2021-09-10
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2021-09-01
  • 2022-12-23
相关资源
相似解决方案