# ZoomLayout **Repository Path**: ts_ohos/zoom-layout ## Basic Information - **Project Name**: ZoomLayout - **Description**: OpenHarmonyOS实现的可滑动Compont效果 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2021-06-05 - **Last Updated**: 2022-09-16 ## Categories & Tags **Categories**: harmonyos-layout **Tags**: None ## README # ZoomLayout #### 介绍 harmonyos实现的ZoomLayout功能 项目源地址:[https://github.com/natario1/ZoomLayout](https://github.com/natario1/ZoomLayout) 移植版本:v1.8.0 该项目主要实现功能是在harmonyos环境下Compont的滑动控制和缩放大小控制 #### 安装教程 方式一: 通过library生成har包,添加har包到集成的libs文件夹内 在entry的gradle内添加如下代码 ``` implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) ``` 方式二: Mavn库 下载使用 ``` buildscript { repositories { ... mavenCentral() } allprojects { repositories { ... mavenCentral() } } ``` ``` implementation 'com.gitee.ts_ohos:ZoomLayout:1.0.0' ``` #### 使用说明 功能具体实现请根据 demo (entry)部分实现构建 ``` buttonZoomLayout.setClickedListener(new Component.ClickedListener() { @Override public void onClick(Component component) { zoomLayout.setVisibility(Component.VISIBLE); zoomLayout_two.setVisibility(Component.HIDE); zoomSurface.setVisibility(Component.HIDE); zoomSurface.removeFromWindow(); playControl.setVisibility(Component.HIDE); zoomVideoView.setVisibility(Component.HIDE); player.stop(); buttonZoomSurface.setTextColor(Color.GRAY); buttonZoomImage.setTextColor(Color.GRAY); buttonZoomLayout.setTextColor(Color.WHITE); } }); ``` ``` ``` ![输入图片说明](https://images.gitee.com/uploads/images/2021/0605/174131_60e6b347_8562620.png "屏幕截图.png") ![输入图片说明](https://images.gitee.com/uploads/images/2021/0605/174144_ba6c627c_8562620.png "屏幕截图.png") ![输入图片说明](https://images.gitee.com/uploads/images/2021/0605/174157_c14579c2_8562620.png "屏幕截图.png") #### 版本迭代 v1.0.0 基于原项目最新版本,初次提交。 #### 源项目许可证 Copyright 2015 Danylo Volokh 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.