list_header.xml
2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0" encoding="utf-8"?>
<com.ivt.plus.widget.PullToRefreshHeaderView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/config_background_color"
android:orientation="horizontal">
<!--
gravity="bottom" is important, which ensures that
the header view when shown, has an effect of being pulled from the bottom
The following redundant RelativeLayouts are also necessary, which ensure that
when the header view is being pulled(height is being increased), the ImageViews
and TextViews inside will always remain the original height(not squeezed)
-->
<LinearLayout
android:id="@+id/vg_header_container"
android:layout_width="fill_parent"
android:layout_height="@dimen/overscroll_listview_header_height"
android:gravity="bottom">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="@dimen/overscroll_listview_header_height"
android:gravity="center">
<ImageView
android:id="@+id/iv_down_arrow"
android:layout_width="17dp"
android:layout_height="17dp"
android:layout_centerVertical="true"
android:contentDescription="@null"
android:src="@drawable/overscroll_listview_arrow" />
<ProgressBar
android:id="@+id/pb_refreshing"
style="?android:attr/progressBarStyleLarge"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_centerVertical="true"
android:indeterminate="true"
android:visibility="gone" />
<TextView
android:id="@+id/tv_refresh"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="15dip"
android:gravity="center"
android:minWidth="120dip"
android:textColor="@color/text_a9"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
</com.ivt.plus.widget.PullToRefreshHeaderView>