# ohos-SwipeLayout **Repository Path**: zhengcheng1/ohos-SwipeLayout ## Basic Information - **Project Name**: ohos-SwipeLayout - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 14 - **Created**: 2024-12-17 - **Last Updated**: 2024-12-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SwipeLayout ## Introduction > **SwipeLayout** is used to set the swipe layouts on the top, bottom, left, and right of the screen. ![sample.png](screenshot/sample3.png) ![sample.png](screenshot/sample4.png) ![sample.png](screenshot/sample5.png) ![sample.png](screenshot/sample6.png) ## How to Install ```shell ohpm install @ohos/swipelayout ``` For details about the OpenHarmony ohpm environment configuration, see [OpenHarmony HAR](https://gitee.com/openharmony-tpc/docs/blob/master/OpenHarmony_har_usage_en.md). ## How to Use ### Using SwipeLayoutLayDown in build() ``` Column() { SwipeLayoutLayDown({ bottomViewLeftW: 200, bottomViewRightW: 300, bottomViewTopH: 60, bottomViewBottomH: 80, mWidth: '100%', mHeight: 100, parentIsTouch: $isTouch }) } ``` ## Available APIs You can set various attributes of the custom containers that support swipe in the top, bottom, left, and right directions by using fields in the **build** method. (Custom containers include **SwipeLayout**, **SwipeLayoutLayDownFullList**, **SwipeLayoutLayDownFullGrid** and **SwipeLayoutLayDownRoot**.) 1. Sets the width of the layout on the left. `bottomViewLeftW` 2. Sets the width of the layout on the right. `bottomViewRightW` 3. Sets the component height. `mHeight` 4. Sets the component width. `mWidth` 5. Sets the animation duration. `mDuration` 6. Sets the height of the layout on the top. `bottomViewTopH` 7. Sets the height of the layout at the bottom. `bottomViewBottomH` ## Constraints This project has been verified in the following versions: - DevEco Studio: 4.1 Canary (4.1.3.317), OpenHarmony SDK: API 11 (4.1.0.36) - DevEco Studio: NEXT Beta1-5.0.3.806, SDK: API 12 Release (5.0.0.66) ## Directory Structure ```` |---- ohos-SwipeLayout | |---- entry # Sample code | |---- SwipeLayout # swipeLayout library |----src |----main |----ets |---- SwipeLayout.ets # Custom container |---- SimpleSwipeListener.ets # Listener for swipe |---- util/Attributes.ets # Enums of swipe mode |---- SwipeLayoutLayDown.ets # Custom container for LayDown effect |---- SwipeLayoutLayDownRoot.ets # Custom container for nesting containers |---- SwipeLayoutPullOut.ets # Custom container for PullOut effect |---- SwipeLayoutLayDownFullGrid.ets # Custom container applicable to the Grid component |---- SwipeLayoutLayDownFullList.ets # Custom container applicable to the List component | |---- index.ets # External APIs | |---- README.md # Readme | |---- README_zh.md # Readme ```` ## How to Contribute If you find any problem when using the project, submit an [issue](https://gitee.com/openharmony-sig/ohos-SwipeLayout/issues) or a [PR](https://gitee.com/openharmony-sig/ohos-SwipeLayout/pulls). ## License This project is licensed under [MIT License](https://gitee.com/openharmony-sig/ohos-SwipeLayout/blob/master/LICENSE).