找回密码
 立即注册
the布局layout左边 | android开发 2022-11-07 46 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
Android滑动菜单制作RenRenSlidingLayout源代码,侧滑布局对象,关于通过手指滑动将左边的菜单布局进行显示或隐藏,menu按钮,点击按钮展现左边布局,再点击一次隐藏左边布局,作关于contentListView的适配器,放在content布局中的ListView,将监听滑动事情绑定在contentListView上,实现点击一下menu展现左边布局,再点击一下隐藏左边布局的功能,翻滚显示和隐藏左边布局时,手指滑动需求到达的速度,左边布局最多可以滑动到的左边际。值由左边布局的宽度来定,marginLeft到达此值之后,不能再削减。绑定监听侧滑事情的View,即在绑定的View进行滑动才可以显示和隐藏左边布局。在onLayout中重新设定左边布局和右侧布局的参数。源码中重写SlidingLayout的结构函数,其间获取了屏幕的宽度。

(Android sliding menu makes RenRenSlidingLayout source code, sidesliding layout objects, and shows or hides the menu layout on the left through finger sliding. Menu button, click the button to show the layout on the left, click again to hide the layout on the left, and then click again to act as an adapter for the contentListView, put the ListView in the content layout, bind the monitoring sliding events to the contentListView, and click the menu to show the layout on the left, Click the function of hiding the left layout again. When scrolling to display and hide the left layout, the speed at which the finger needs to slide can be as high as the left edge of the left layout. The value is determined by the width of the left layout. MarginLeft cannot be cut after reaching this value. Bind the view listening to sideslip events, that is, the left layout can be displayed and hidden only when the bound view is slided. Reset the parameters of the left layout and the right layout in onLayout. The source code rewrites the structure function of SlidingLayout, in which the screen width is obtained.)

[下载]12113095382.rar




上一篇:Android与Js交互源码实例
下一篇:Android贪吃蛇(源码演示)