{"id":13396070,"url":"https://github.com/mxn21/FlowingDrawer","last_synced_at":"2025-03-13T22:31:42.965Z","repository":{"id":36408989,"uuid":"40713924","full_name":"mxn21/FlowingDrawer","owner":"mxn21","description":"swipe display drawer with flowing \u0026 bouncing effects.","archived":false,"fork":false,"pushed_at":"2022-07-20T19:26:19.000Z","size":7801,"stargazers_count":2565,"open_issues_count":3,"forks_count":468,"subscribers_count":79,"default_branch":"master","last_synced_at":"2024-10-29T17:49:20.435Z","etag":null,"topics":["android-ui"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mxn21.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-14T12:29:05.000Z","updated_at":"2024-10-18T14:34:55.000Z","dependencies_parsed_at":"2022-07-29T00:38:33.563Z","dependency_job_id":null,"html_url":"https://github.com/mxn21/FlowingDrawer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxn21%2FFlowingDrawer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxn21%2FFlowingDrawer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxn21%2FFlowingDrawer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxn21%2FFlowingDrawer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mxn21","download_url":"https://codeload.github.com/mxn21/FlowingDrawer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243493857,"owners_count":20299727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-ui"],"created_at":"2024-07-30T18:00:38.975Z","updated_at":"2025-03-13T22:31:41.871Z","avatar_url":"https://github.com/mxn21.png","language":"Java","funding_links":[],"categories":["Index `(light-weight pages)`","抽屉菜单","Index","Java","Libs","第一部分 个性化控件(View)"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# FlowingDrawer \n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-FlowingDrawer-green.svg?style=flat)](https://android-arsenal.com/details/1/2658)\n[![travis-ic](https://travis-ci.org/mxn21/FlowingDrawer.svg?branch=master)](https://travis-ci.org/mxn21/FlowingDrawer)\n\n![Showcase](/screen.gif)\n\nswipe right to display drawer with flowing effects.\n\n\n## Download\n\nInclude the following dependency in your build.gradle file.\n\nGradle:\n\n```Gradle\n    repositories {\n        jcenter()\n    }\n\n    dependencies {\n        implementation 'com.mxn.soul:flowingdrawer-core:2.1.0'\n        implementation 'com.nineoldandroids:library:2.4.0'\n    }\n```\n\n## V2.0.0 Features\n\n * The menu can be positioned along two edges:left and right .\n * Allows the drawer to be opened by dragging the edge or the entire screen.\n\n\n## Usage\n\n*For a working implementation of this project see the `app/` folder and check out the sample app*\n\nactivity_main.xml:\n\n```xml\n    \u003ccom.mxn.soul.flowingdrawer_core.FlowingDrawer\n            xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n            xmlns:android=\"http://schemas.android.com/apk/res/android\"\n            android:id=\"@+id/drawerlayout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:clipChildren=\"false\"\n            android:clipToPadding=\"false\"\n            app:edPosition=\"1\"\n            app:edMenuSize=\"260dp\"\n            app:edMenuBackground=\"#dddddd\"\u003e\n\n        \u003c!--content--\u003e\n        \u003cRelativeLayout\n                android:id=\"@+id/content\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"/\u003e\n\n        \u003c!--menu--\u003e\n        \u003ccom.mxn.soul.flowingdrawer_core.FlowingMenuLayout\n                android:id=\"@+id/menulayout\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\u003e\n\n            \u003cFrameLayout\n                    android:id=\"@+id/id_container_menu\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"/\u003e\n\n        \u003c/com.mxn.soul.flowingdrawer_core.FlowingMenuLayout\u003e\n\n    \u003c/com.mxn.soul.flowingdrawer_core.FlowingDrawer\u003e\n```\n\nTo use a FlowingDrawer, position FlowingDrawer as the root , position your primary content view as the\nfirst child with width and height of match_parent . Add FlowingMenuLayout as child views after the main\ncontent view . FlowingMenuLayout commonly use match_parent for height and width.\n\nDon't set any background on FlowingMenuLayout or FlowingMenuLayout's children, it means their background\nshould be transparent.\n\nDon't set FlowingMenuLayout's width with a fixed width, it's not a useful way to change it's width .\n\nYou can change menu's attribute in FlowingDrawer layout node use custom attribute,like edMenuBackground,edMenuSize,\nedPosition.\n\nUse edPosition attribute corresponding to which side of the view you want the drawer\nto emerge from: left or right.Left menu : edPosition =1 ; Right menu: edPosition =2 .\n\nFor more custom attribute ,you can see in attrs.xml.\n\n\nMainActivity:\n\n```java\n     mDrawer = (FlowingDrawer) findViewById(R.id.drawerlayout);\n     mDrawer.setTouchMode(ElasticDrawer.TOUCH_MODE_BEZEL);\n     mDrawer.setOnDrawerStateChangeListener(new ElasticDrawer.OnDrawerStateChangeListener() {\n                 @Override\n                 public void onDrawerStateChange(int oldState, int newState) {\n                     if (newState == ElasticDrawer.STATE_CLOSED) {\n                         Log.i(\"MainActivity\", \"Drawer STATE_CLOSED\");\n                     }\n                 }\n\n                 @Override\n                 public void onDrawerSlide(float openRatio, int offsetPixels) {\n                     Log.i(\"MainActivity\", \"openRatio=\" + openRatio + \" ,offsetPixels=\" + offsetPixels);\n                 }\n             });\n```\nsetTouchMode can allows the drawer to be opened by dragging the edge or the entire screen.\nsetOnDrawerStateChangeListener can be used to monitor the state and motion of drawer views.\nAvoid performing expensive operations such as layout during animation as it can cause stuttering.\nElasticDrawer.OnDrawerStateChangeListener offers default/no-op implementations of each callback method.\n\n\nLicense\n=======\n\n    Copyright 2015 soul.mxn\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxn21%2FFlowingDrawer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmxn21%2FFlowingDrawer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxn21%2FFlowingDrawer/lists"}