# GuillotineMenu-ohos **Repository Path**: HarmonyOS-tpc/GuillotineMenu-ohos ## Basic Information - **Project Name**: GuillotineMenu-ohos - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-17 - **Last Updated**: 2024-05-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # GuillotineMenu GuillotineMenu : Neat library, that provides a simple way to implement guillotine-styled animation. ## Usage Instructions 1. Create a layout for the navigation menu (`guillotine.xml` in entry), which will later open and close guillotine-style. The only tricky part here is that the navigation layout should be on top of any other content and will disappear after closing animation ends. That is why content layout (`ability_main.xml` in entry) should also have hamburger icon at the same coordinates as navigation menu has. 2. After that, all build animation by passing navigation layout object, navigation and content layout hamburger objects to `GuillotineAnimation.GuillotineBuilder` in `onStart` method ``` new GuillotineAnimation.GuillotineBuilder(guillotineMenu, guillotineMenu.findComponentById(ResourceTable.Id_guillotine_hamburger), contentHamburger) .setStartDelay(RIPPLE_DURATION) .setActionBarViewForAnimation(toolbar) .setClosedOnStart(true) .build(); ``` Here `setActionBarViewForAnimation` method enables bounce effect of Toolbar at the end of the guillotine closing animation. # Installation Instructions 1.For using GuillotineMenu-ohos module in sample application, include the below library dependency to generate hap/library.har. Modify entry build.gradle as below : ``` dependencies { implementation project(path: ':library') } ``` 2.For using GuillotineMenu-ohos in separate application, add the "library.har" in libs folder of "entry" module. Modify entry build.gradle as below : ``` dependencies { implementation fileTree(dir: 'libs', include: ['*.har']) } ``` 3.For using GuillotineMenu-ohos from a remote repository in separate application, add the below dependency in entry/build.gradle file. Modify entry build.gradle as below : ``` dependencies { implementation 'io.openharmony.tpc.thirdlib:GuillotineMenu-ohos:1.0.0' } ``` ## License Copyright 2017, Yalantis 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.