File tree Expand file tree Collapse file tree 1 file changed +2
-55
lines changed Expand file tree Collapse file tree 1 file changed +2
-55
lines changed Original file line number Diff line number Diff line change 1
1
DragLayout
2
2
==========
3
3
4
+ * 使用support.v4包下的ViewDragHelper实现QQ5.0侧滑
5
+
4
6
##Screenshots
5
7
![ image] ( https://github.com/BlueMor/DragLayout/blob/master/screenshots/1.gif )
6
-
7
- ![ image] ( https://github.com/BlueMor/DragLayout/blob/master/screenshots/2.png )
8
-
9
-
10
- * 一个制作头像的Android Project
11
- * 完全实现QQ5.0主界面侧滑效果
12
- * 使用新support.v4包下的ViewDragHelper实现
13
- * DragLayout类代码仅200行
14
-
15
- 相对于 https://github.com/daimajia/AndroidSwipeLayout 项目,优点有:
16
- * 左右滑动和上下滑动事件互不冲突(不会卡顿)
17
- * 子view(包括listview,gridview的item)的重新绘制不影响DragLayout的滑动(不会卡顿)
18
-
19
- 参考文档
20
- * http://flavienlaurent.com/blog/2013/08/28/each-navigation-drawer-hides-a-viewdraghelper/
21
-
22
-
23
-
24
- ## ** How To Use** ##
25
- ``` java
26
- < com.bluemor.reddotface.view. DragLayout
27
- android: id= " @+id/dl"
28
- android: layout_width= " match_parent"
29
- android: layout_height= " match_parent" >
30
-
31
- < RelativeLayout
32
- android: layout_width= " match_parent"
33
- android: layout_height= " match_parent" >
34
- < / RelativeLayout >
35
-
36
- < com.bluemor.reddotface.view. MyRelativeLayout
37
- android: layout_width= " match_parent"
38
- android: layout_height= " match_parent" >
39
- < / com.bluemor.reddotface.view. MyRelativeLayout >
40
-
41
- < / com.bluemor.reddotface.view. DragLayout >
42
-
43
-
44
- DragLayout dl = (DragLayout ) findViewById(R . id. dl);
45
- dl. setDragListener(new DragListener () {
46
- @Override
47
- public void onOpen () {
48
- }
49
-
50
- @Override
51
- public void onClose () {
52
- }
53
-
54
- @Override
55
- public void onDrag (float percent ) {
56
- // percent为打开的比例
57
- }
58
- });
59
- ```
60
-
You can’t perform that action at this time.
0 commit comments