首先上图,左边为菜单栏显示的样式,右边为滑动过程的样式,滑动结束后应该是菜单栏完全影藏
上代码
布局文件:
1、activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/slideView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<com.example.myslideview.MySlideView
android:id="@+id/myView"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</com.example.myslideview.MySlideView>
</LinearLayout>
2、slide_view.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<LinearLayout
android:id="@+id/slideView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
</LinearLayout>
</LinearLayout>
3、view1.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="5dp" >
<ListView
android:id="@+id/lstView1"
android:layout_width="match_parent"
android:layout_height="match_parent" >