【开源】Dragger

Dragger

使用说明:

 

你可以将这个库当成view来用:

将DraggerView添加到root layout,并且在里面加入两个layout。 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<com.github.library.DraggerView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    dragger_layout:drag_view_id="@+id/drag_view"
    dragger_layout:shadow_view_id="@+id/shadow_view"
    dragger_layout:drag_position="top">
 
    <FrameLayout
          android:id="@+id/shadow_view"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@color/transparent"
          android:visibility="invisible"/>
 
      <LinearLayout
          android:id="@+id/drag_view"
          android:layout_width="match_parent"
          android:layout_height="match_parent"/>
 
</com.github.library.DraggerView>

style文件中这样设置

1
2
3
4
5
6
7
<style name="YourTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="android:windowIsTranslucent">true</item>
      <item name="android:windowBackground">@android:color/transparent</item>
      <item name="android:windowNoTitle">true</item>
      <item name="windowActionBar">false</item>
      <item name="android:windowAnimationStyle">@null</item>
</style>

manifest中

1
2
3
<activity
    android:name="com.github.dragger.BaseActivity"
    android:theme="@style/YourTheme"/>

posted on 2015-05-05 10:45  wasdchenhao  阅读(275)  评论(0)    收藏  举报

导航