预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

亲,该文档总共15页,到这已经超出免费预览范围,如果喜欢就直接下载吧~

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

双向滑动(...)-电脑资料    亮点是使用外部文件修改了触摸屏的触摸位置,导入动画效果nineoldandroids的jar包其中需要注意的是布局文件中的android:name<codeclass="language-html"hljs=""><relativelayoutandroid:background="@drawable/qq"android:layout_height="match_parent"android:layout_width="match_parent"></relativelayout></code><b><codeclass="language-html"hljs=""><fragmentandroid:id="@+id/id_left_menu"android:layout_gravity="left"android:layout_height="match_parent"android:layout_width="200dp"android:name="com.zhy.demo_zhy_17_drawerlayout.MenuLeftFragment"android:tag="LEFT"><fragmentandroid:id="@+id/id_right_menu"android:layout_gravity="right"android:layout_height="match_parent"android:layout_width="100dp"android:name="com.zhy.demo_zhy_17_drawerlayout.MenuRightFragment"android:tag="RIGHT"></fragment></fragment></code></button>效果实现主程序<codeclass="language-java"hljs="">packagecom.test.mysliderqq;importandroid.annotation.TargetApi;importandroid.app.Activity;importandroid.graphics.Point;importandroid.os.Build;importandroid.os.Bundle;importandroid.support.v4.app.FragmentActivity;importandroid.support.v4.widget.DrawerLayout;importandroid.support.v4.widget.DrawerLayout.DrawerListener;importandroid.support.v4.widget.ViewDragHelper;importandroid.view.Gravity;importandroid.view.View;importandroid.view.Window;importjava.lang.reflect.Field;importcom.nineoldandroids.view.ViewHelper;@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)publicclassMainActivityextendsFragmentActivity{privateDrawerLayoutmDrawerLayout;@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);requestWindowFeature(Window.FEATURE_NO_TITLE);setContentView(R.layout.activity_main);initView();initEvents();}publicvoidOpenRightMenu(Viewview){mDrawerLayout.openDrawer(Gravity.RIGHT);mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED,Gravity.RIGHT);}privatevoidinitEvents(){mDrawerLayout.setDrawerListener(newDrawerListener(){@Overridepubli