# ohos-FlipView **Repository Path**: ts_ohos/ohos-FlipView ## Basic Information - **Project Name**: ohos-FlipView - **Description**: 一个自定义视图翻转动画。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-31 - **Last Updated**: 2022-09-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README harmonyos-FlipView ========= 本项目是基于开源项目android-FlipView进行harmonyos化的移植和开发的,可以通过项目标签以及 [github地址](https://github.com/emilsjolander/android-FlipView) 移植版本:源master v1.1.0 版本 ## 项目介绍 ### 项目名称:harmonyos-FlipView ### 所属系列:harmonyos的第三方组件适配移植 ### 功能: 一个自定义视图翻转动画。 ### 项目移植状态:部分移植,harmonyos目前没有绘制布局的方法,后续harmonyos支持了再修改添加 ### 调用差异:基本没有使用差异,请参照demo使用 ### 原项目Doc地址:https://github.com/emilsjolander/android-FlipView ### 编程语言:java ### 项目截图(涉及文件仅供demo测试使用) ![demo运行效果](art/art.png) ![运行效果](art/demo.gif) ## 安装教程 #### 方案一 可以先下载项目,将项目中的library库提取出来放在所需项目中通过build配置 ```Java dependencies { implementation project(":library") } ``` #### 方案二 - 1.项目根目录的build.gradle中的repositories添加: ```groovy buildscript { repositories { ... mavenCentral() } ... } allprojects { repositories { ... mavenCentral() } } ``` - 2.开发者在自己的项目中添加依赖 ```groovy dependencies { implementation 'com.gitee.ts_ohos:OhosflipView:1.0.0' } ``` About ----- This library is made to be very easy to use and at the same time be feature complete. With only a few lines of code you can have a flipping animation between your views, this looks and acts very much like the Flipboard application. All flipping animations should be very smooth and i have added lighting effects so the flipping look more realistic. Honeycomb (api lvl 11) or above is required for this library to work properly, however it will compile (and run, though without good performance) for much lower versions with just a few tweaks. Usage ----- After installing, create a layout file container a something similar to this: In your activity/fragment you should do somthing like this: flipView = (FlipView) findComponentById(ResourceTable.Id_flip_view); flipView.setFoldShading(new SimpleFoldShading()); flipView.setAdapter(new FlipView.FoldableAdapter(Items.getFoldableItems(getContext()))); Contributing ------------ Pull requests and issues are very welcome! Feature request are also welcome but i can't make any promise that they will make it in. I would like to keep the library as general as possible, if you are unsure you can just ask before you code ;)