# worldline_FoldableLayout **Repository Path**: HarmonyOS-tpc/worldline_FoldableLayout ## Basic Information - **Project Name**: worldline_FoldableLayout - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2021-10-25 - **Last Updated**: 2023-04-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FoldableLayout ## Introduction The foldable layout is a layout, which can have two child layouts, one for the cover, and one for the details. The foldable layout takes care of the folding animation between those two layouts. ## Usage Instructions 1. Create 2 layouts with cover layout and detail layout. 2. Set these 2 layouts in adapter and pass these to foldableLayout. FoldableLayout foldableLayout = new FoldableLayout(componentContainer.getContext()); foldableLayout.setupViews(ResourceTable.Layout_list_item_cover, ResourceTable.Layout_list_item_detail, 100, mContext, true); 3. Handle click on items foldableLayout.unfoldWithAnimation(component, newPixelMap); foldableLayout.foldWithAnimation(component,null); ## Installation tutorial Solution 1: local har package integration 1. Add the .har package to the lib folder. 2. Add DialogV3 (dialog-release.har) to the lib folder 3. Add the following code to the gradle of the entry: dependencies { implementation fileTree(dir: 'lib', include: ['*.jar', '*.har']) implementation files('lib/dialog-release.har') implementation 'io.openharmony.tpc.thirdlib:glide:1.0.9' } Solution 2: Add following dependencies in your build.gradle: Add DailogV3 (dailog-release.har) to the lib folder dependencies { implementation project(':foldablelayout') implementation fileTree(dir: 'lib', include: ['*.jar', '*.har']) implementation files('lib/dialog-release.har') implementation 'io.openharmony.tpc.thirdlib:glide:1.0.9' } ## License 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.