6 Star 2 Fork 0

HarmonyOS-TPC / ParallaxViewPager

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

该三方开源库从github fork过来,主要将底层接口调用的实现修改成鸿蒙接口的实现,将三方库鸿蒙化,供开发鸿蒙应用的开发者使用

fork地址:https://github.com/ybq/ParallaxViewPager

fork版本号/日期:1.0.1 / 2015/12/10

demo演示

原项目Readme地址:https://github.com/ybq/ParallaxViewPager/blob/master/README.md

项目移植状态:支持组件所有基本功能

完成度:100%

调用差异:动画差值器需在代码中设置,无法通过xml方式设置

ParallaxViewPager

导入方法

1.har导入

将har包放入lib文件夹并在build.gradle添加

implementation fileTree(dir: 'libs', include: ['*.har'])

2.Library引用

添加本工程中UcropLib模块到任意工程中,在需要使用的模块build.gradle中添加

implementation project(':library')

或者

allprojects{
    repositories{
        mavenCentral()
    }
}
implementation 'io.openharmony.tpc.thirdlib:ParallaxViewPager:1.0.2'

使用方法

1 .在布局文件中添加以下代码

    <com.github.ybq.parallaxviewpager.ParallaxViewPager
            ohos:id="$+id:pvp_main"
            ohos:height="match_parent"
            ohos:width="match_parent"
            ohos:outset="0.62"
            ohos:overlay_mode="0"
            ohos:shadow_width="60"
    />

2.在代码中初始化参数

//初始化控件
parallaxViewPager = (ParallaxViewPager) findComponentById(ResourceTable.Id_pvp_main);
//设置控件的Provider
parallaxViewPager.setProvider();
//设置控件的模式
parallaxViewPager.setSliderMode(Mode.LEFT_OVERLAY);
//设置控件的动画差值器
parallaxViewPager.setInterpolator(new DecelerateInterpolator());

3.一些功能设置介绍

ParallaxViewPager.setSlideMode(Mode mode)//设置parallaxViewPager的动画模式
ParallaxViewPager.getSlideMode()//获取parallaxViewPager的动画模式
ParallaxViewPager.setProvider();//设置parallaxViewPager显示的布局
ParallaxViewPager.setInterpolator();//设置动画的差值器
ParallaxViewPager.getInterpolator();//获取动画的差值器
ParallaxViewPager.setOutset()//设置动画的偏移
ParallaxViewPager.getOutset ();//获取动画的偏移
ParallaxViewPager.setRightShadow()//设置右边的shadow
ParallaxViewPager.setLeftShadow();//设置左边的shadow

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.

空文件

简介

HarmonyOS Parallax-ViewPager 展开 收起
Java
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/HarmonyOS-tpc/ParallaxViewPager.git
git@gitee.com:HarmonyOS-tpc/ParallaxViewPager.git
HarmonyOS-tpc
ParallaxViewPager
ParallaxViewPager
master

搜索帮助