Skip to content

Commit c8965f0

Browse files
committed
add ZoomToPull Demo
1 parent dc9d351 commit c8965f0

16 files changed

+622
-1
lines changed

DemoOfUI/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@
104104
<activity android:name=".materialmenu.HomeIconActivity" android:theme="@style/MaterialMenuTheme"></activity>
105105
<activity android:name=".materialmenu.MaterialMenuAppcompatActivity"
106106
android:theme="@style/MaterialMenuTheme"></activity>
107-
107+
<activity android:name=".pulltozoomview.PullToZoomActivity"></activity>
108+
<activity android:name=".pulltozoomview.PullToZoomListActivity"></activity>
109+
<activity android:name=".pulltozoomview.PullToZoomScrollActivity"></activity>
108110

109111
<provider
110112
android:name="android.support.v4.content.FileProvider"
Loading
Loading
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:paddingLeft="@dimen/activity_horizontal_margin"
6+
android:paddingRight="@dimen/activity_horizontal_margin"
7+
android:paddingTop="@dimen/activity_vertical_margin"
8+
android:paddingBottom="@dimen/activity_vertical_margin"
9+
tools:context=".MainActivity">
10+
11+
12+
<Button
13+
style="?android:attr/buttonStyle"
14+
android:layout_width="wrap_content"
15+
android:layout_height="wrap_content"
16+
android:text="Zoom List View"
17+
android:id="@+id/btn_list"
18+
android:textSize="22sp"
19+
android:layout_alignParentTop="true"
20+
android:layout_centerHorizontal="true"
21+
android:layout_marginTop="142dp" />
22+
23+
<Button
24+
style="?android:attr/buttonStyle"
25+
android:layout_width="wrap_content"
26+
android:layout_height="wrap_content"
27+
android:text="Zoom Scroll View"
28+
android:id="@+id/btn_scroll"
29+
android:textSize="22sp"
30+
android:layout_below="@id/btn_list"
31+
android:layout_centerHorizontal="true"
32+
android:layout_marginTop="83dp" />
33+
</RelativeLayout>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:custom="http://schemas.android.com/apk/res-auto"
5+
android:orientation="vertical"
6+
android:layout_width="match_parent"
7+
android:layout_height="match_parent">
8+
9+
<com.marshalchen.common.uimodule.pulltozoomview.PullToZoomListView
10+
android:id="@+id/listview"
11+
android:layout_width="match_parent"
12+
android:layout_height="match_parent"
13+
custom:listHeadView="@layout/pull_to_zoom_list_head_zoom_view" />
14+
</LinearLayout>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:custom="http://schemas.android.com/apk/res-auto"
5+
android:orientation="vertical"
6+
android:layout_width="match_parent"
7+
android:layout_height="match_parent">
8+
9+
<com.marshalchen.common.uimodule.pulltozoomview.PullToZoomScrollView
10+
android:id="@+id/scroll_view"
11+
android:layout_width="match_parent"
12+
android:layout_height="match_parent"
13+
custom:scrollZoomView="@layout/pull_to_zoom_profile_zoom_view"
14+
custom:scrollContentView="@layout/pull_to_zoom_profile_content_view"
15+
custom:scrollHeadView="@layout/pull_to_zoom_profile_head_view"/>
16+
</LinearLayout>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:id="@+id/imageView"
6+
android:src="@drawable/test_back"
7+
android:contentDescription="@string/app_name"
8+
android:scaleType="centerCrop"
9+
android:layout_gravity="center_horizontal" />
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
android:background="#ffffff"
7+
android:orientation="vertical">
8+
9+
<TextView
10+
android:layout_width="match_parent"
11+
android:layout_height="wrap_content"
12+
android:padding="20dp"
13+
android:gravity="center_vertical"
14+
android:textSize="20sp"
15+
android:text="test1" />
16+
17+
<TextView
18+
android:layout_width="match_parent"
19+
android:layout_height="wrap_content"
20+
android:padding="20dp"
21+
android:gravity="center_vertical"
22+
android:textSize="20sp"
23+
android:text="test1" />
24+
25+
<TextView
26+
android:layout_width="match_parent"
27+
android:layout_height="wrap_content"
28+
android:padding="20dp"
29+
android:textSize="20sp"
30+
android:gravity="center_vertical"
31+
android:text="test1" />
32+
33+
<TextView
34+
android:layout_width="match_parent"
35+
android:layout_height="wrap_content"
36+
android:padding="20dp"
37+
android:textSize="20sp"
38+
android:gravity="center_vertical"
39+
android:text="test1" />
40+
41+
<TextView
42+
android:layout_width="match_parent"
43+
android:layout_height="wrap_content"
44+
android:background="#eeeeee" />
45+
46+
<TextView
47+
android:layout_width="match_parent"
48+
android:layout_height="wrap_content"
49+
android:padding="20dp"
50+
android:textSize="20sp"
51+
android:gravity="center_vertical"
52+
android:text="test2" />
53+
54+
<TextView
55+
android:layout_width="match_parent"
56+
android:layout_height="wrap_content"
57+
android:padding="20dp"
58+
android:textSize="20sp"
59+
android:gravity="center_vertical"
60+
android:text="test2" />
61+
62+
<TextView
63+
android:layout_width="match_parent"
64+
android:layout_height="wrap_content"
65+
android:padding="20dp"
66+
android:textSize="20sp"
67+
android:gravity="center_vertical"
68+
android:text="test2" />
69+
70+
<TextView
71+
android:layout_width="match_parent"
72+
android:layout_height="wrap_content"
73+
android:padding="20dp"
74+
android:textSize="20sp"
75+
android:gravity="center_vertical"
76+
android:text="test2" />
77+
78+
<TextView
79+
android:layout_width="match_parent"
80+
android:layout_height="wrap_content"
81+
android:background="#eeeeee" />
82+
83+
<TextView
84+
android:layout_width="match_parent"
85+
android:layout_height="wrap_content"
86+
android:padding="20dp"
87+
android:textSize="20sp"
88+
android:gravity="center_vertical"
89+
android:text="test3" />
90+
91+
<TextView
92+
android:layout_width="match_parent"
93+
android:layout_height="wrap_content"
94+
android:padding="20dp"
95+
android:textSize="20sp"
96+
android:gravity="center_vertical"
97+
android:text="test3" />
98+
99+
<TextView
100+
android:layout_width="match_parent"
101+
android:layout_height="wrap_content"
102+
android:padding="20dp"
103+
android:textSize="20sp"
104+
android:gravity="center_vertical"
105+
android:text="test3" />
106+
107+
<TextView
108+
android:layout_width="match_parent"
109+
android:layout_height="wrap_content"
110+
android:padding="20dp"
111+
android:textSize="20sp"
112+
android:gravity="center_vertical"
113+
android:text="test3" />
114+
115+
<TextView
116+
android:layout_width="match_parent"
117+
android:layout_height="wrap_content"
118+
android:background="#eeeeee" />
119+
120+
<TextView
121+
android:layout_width="match_parent"
122+
android:layout_height="wrap_content"
123+
android:padding="20dp"
124+
android:textSize="20sp"
125+
android:gravity="center_vertical"
126+
android:text="test4" />
127+
128+
<TextView
129+
android:layout_width="match_parent"
130+
android:layout_height="wrap_content"
131+
android:padding="20dp"
132+
android:textSize="20sp"
133+
android:gravity="center_vertical"
134+
android:text="test4" />
135+
136+
<TextView
137+
android:layout_width="match_parent"
138+
android:layout_height="wrap_content"
139+
android:padding="20dp"
140+
android:textSize="20sp"
141+
android:gravity="center_vertical"
142+
android:text="test4" />
143+
144+
<TextView
145+
android:layout_width="match_parent"
146+
android:layout_height="wrap_content"
147+
android:padding="20dp"
148+
android:textSize="20sp"
149+
android:gravity="center_vertical"
150+
android:text="test4" />
151+
152+
<TextView
153+
android:layout_width="match_parent"
154+
android:layout_height="wrap_content"
155+
android:background="#eeeeee" />
156+
157+
<TextView
158+
android:layout_width="match_parent"
159+
android:layout_height="wrap_content"
160+
android:padding="20dp"
161+
android:textSize="20sp"
162+
android:gravity="center_vertical"
163+
android:text="test5" />
164+
165+
<TextView
166+
android:layout_width="match_parent"
167+
android:layout_height="wrap_content"
168+
android:padding="20dp"
169+
android:textSize="20sp"
170+
android:gravity="center_vertical"
171+
android:text="test5" />
172+
173+
<TextView
174+
android:layout_width="match_parent"
175+
android:layout_height="wrap_content"
176+
android:padding="20dp"
177+
android:textSize="20sp"
178+
android:gravity="center_vertical"
179+
android:text="test5" />
180+
181+
<TextView
182+
android:layout_width="match_parent"
183+
android:layout_height="wrap_content"
184+
android:padding="20dp"
185+
android:textSize="20sp"
186+
android:gravity="center_vertical"
187+
android:text="test5" />
188+
</LinearLayout>
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="wrap_content">
4+
5+
<RelativeLayout
6+
android:id="@+id/layout_view"
7+
android:layout_width="match_parent"
8+
android:layout_height="match_parent">
9+
10+
<ImageView
11+
android:id="@+id/iv_user_head"
12+
android:layout_width="wrap_content"
13+
android:layout_height="wrap_content"
14+
android:layout_centerHorizontal="true"
15+
android:layout_marginTop="50dp"
16+
android:src="@drawable/test"
17+
android:contentDescription="@string/app_name" />
18+
19+
<TextView
20+
android:id="@+id/tv_user_name"
21+
android:textSize="16sp"
22+
android:layout_width="wrap_content"
23+
android:layout_height="wrap_content"
24+
android:layout_marginTop="8dp"
25+
android:layout_below="@id/iv_user_head"
26+
android:layout_centerHorizontal="true"
27+
android:text=""
28+
android:textColor="#ffffff" />
29+
30+
<LinearLayout
31+
android:id="@+id/ll_action_button"
32+
android:layout_width="match_parent"
33+
android:layout_height="wrap_content"
34+
android:background="#66000000"
35+
android:divider="@drawable/pull_to_zoom_ic_img_line_v"
36+
android:showDividers="middle"
37+
android:dividerPadding="16dp"
38+
android:layout_alignParentBottom="true">
39+
40+
<TextView
41+
android:id="@+id/tv_register"
42+
android:layout_width="match_parent"
43+
android:layout_height="wrap_content"
44+
android:padding="20dp"
45+
android:text="注册"
46+
android:layout_weight="1"
47+
android:textSize="18sp"
48+
android:gravity="center"
49+
android:layout_gravity="center"
50+
android:textColor="#ffffff" />
51+
52+
<TextView
53+
android:id="@+id/tv_login"
54+
android:layout_width="match_parent"
55+
android:layout_height="wrap_content"
56+
android:padding="20dp"
57+
android:text="登录"
58+
android:layout_weight="1"
59+
android:textSize="18sp"
60+
android:gravity="center"
61+
android:layout_gravity="center"
62+
android:textColor="#ffffff" />
63+
</LinearLayout>
64+
</RelativeLayout>
65+
</FrameLayout>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:id="@+id/iv_zoom"
4+
android:layout_width="match_parent"
5+
android:layout_height="wrap_content"
6+
android:src="@drawable/pull_to_zoom_ic_img_profile_bg"
7+
android:scaleType="fitXY"
8+
android:contentDescription="@string/app_name" />

0 commit comments

Comments
 (0)