# FlowingDrawer **Repository Path**: hihopeorg/FlowingDrawer ## Basic Information - **Project Name**: FlowingDrawer - **Description**: 可左右滑动的抽屉容器 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-04-21 - **Last Updated**: 2021-11-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FlowingDrawer **本项目是基于开源项目FlowingDrawer进行ohos化的移植和开发的,可以通过项目标签以及github地址(https://github.com/mxn21/FlowingDrawer )追踪到原项目版本** #### 项目介绍 - 项目名称:FlowingDrawer - 所属系列:ohos的第三方组件适配移植 - 功能: 可左右滑动的抽屉容器 - 项目移植状态:完成 - 调用差异:无 - 项目作者和维护人:hihope - 联系方式:hihope@hoperun.com - 原项目Doc地址:https://github.com/mxn21/FlowingDrawer - 原项目基线版本:无release版本,sha1:48ef47b7294fddae423f0164cfacd6c8470dc227 - 编程语言:Java - 外部库依赖:无 #### 效果 #### 安装教程 方法一: 1. 编译har包flowingdrawer_core.har。 2. 启动 DevEco Studio,将编译的har包,导入工程目录“app->libs”下。 3. 在moudle级别下的build.gradle文件中添加依赖,在dependences标签中增加对libs目录下har包的引用。 ```groovy repositories { flatDir { dirs 'libs' } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) implementation(name: 'flowingdrawer_cor', ext: 'har') } ``` 4. 在导入的har包上点击右键,选择“Add as Library”对包进行引用,选择需要引用的模块,并点击“OK”即引用成功。 方法二: 1. 在工程的build.gradle的allprojects中,添加HAR所在的Maven仓地址 ``` repositories { maven { url 'http://106.15.92.248:8081/repository/Releases/' } } ``` 2. 在应用模块的build.gradle的dependencies闭包中,添加如下代码: ``` dependencies { implementation 'com.mxn.soul.ohos:flowingdrawer:1.0.2' } ``` #### 使用说明 布局文件定义: ```xml ``` sample中设置属性: ```java flowingDrawer.toggleMenu(); //关闭menu flowingDrawer.setMenuSize(400); //设置menu宽度 flowingDrawer.setOnDrawerStateChangeListener((oldState, newState) -> { if (newState == ElasticDrawer.STATE_CLOSED){ } }); ``` #### 版本迭代 - 1.0.2 #### 版权和许可信息 Copyright 2015 soul.mxn Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.