# Vertical-Intro
**Repository Path**: herry096/Vertical-Intro
## Basic Information
- **Project Name**: Vertical-Intro
- **Description**: 此库是一款让您的应用更快的集成引导功能的工具类库
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2021-07-31
- **Last Updated**: 2024-06-10
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Vertical-Intro
#### 项目介绍
- 项目名称:Vertical-Intro
- 所属系列:openharmony的第三方组件适配移植
- 功能:实现通用的应用引导功能
- 项目移植状态:主功能完成
- 调用差异:无
- 开发版本:sdk6,DevEco Studio 2.2 Beta1
- 基线版本: Release 2.0
#### 效果演示
#### 安装教程
1.在项目根目录下的build.gradle文件中,
```
allprojects {
repositories {
maven {
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
}
}
}
```
2.在entry模块的build.gradle文件中,
```
dependencies {
implementation 'com.gitee.chinasoft_ohos:ohos-verticalintro:0.0.2-SNAPSHOT'
......
}
```
在sdk6,DevEco Studio 2.2 Bate1下项目可直接运行
如无法运行,删除项目.gradle,.idea,build,gradle,build.gradle文件,
并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下
#### 使用说明
此效果主要是通过自定义view,设置属性动画形成的效果。
1、自己的AbilitySlice继承VerticalIntroSlice
2、设置数据,举例
```java
@Override
public void setData() {
super.setData();
pageColors = new ArrayList<>();
pageColors.add(getString(ResourceTable.Color_colorAccent));
pageColors.add(getString(ResourceTable.Color_color2));
pageColors.add(getString(ResourceTable.Color_colorPrimary));
pageColors.add(getString(ResourceTable.Color_color3));
pageMoudles = getData();
}
private List getData() {
String textValue = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.";
PageMoudle pageMoudleOne = new PageMoudle();
pageMoudleOne.setRecoureId(ResourceTable.Graphic_intro_second_vector);
pageMoudleOne.setBackGroudRgbColor(RgbColor.fromArgbInt(Color.getIntColor(pageColors.get(0))));
pageMoudleOne.setTitle("Lorem Ipsum Lorem Ipsum");
pageMoudleOne.setText(textValue + textValue + textValue);
pageMoudleOne.setTitleSize(17);
pageMoudleOne.setTextSize(14);
List datas = new ArrayList<>();
datas.add(pageMoudleOne);
PageMoudle pageMoudleTwo = new PageMoudle();
pageMoudleTwo.setRecoureId(ResourceTable.Graphic_four);
pageMoudleTwo.setBackGroudRgbColor(RgbColor.fromArgbInt(Color.getIntColor(pageColors.get(1))));
pageMoudleTwo.setTitle("Lorem Ipsum Lorem Ipsum ");
pageMoudleTwo.setText(textValue + textValue);
datas.add(pageMoudleTwo);
PageMoudle pageMoudleThree = new PageMoudle();
pageMoudleThree.setRecoureId(ResourceTable.Graphic_ohos);
pageMoudleThree.setBackGroudRgbColor(RgbColor.fromArgbInt(Color.getIntColor(pageColors.get(2))));
pageMoudleThree.setTitle("Lorem Ipsum");
pageMoudleThree.setText(textValue);
datas.add(pageMoudleThree);
PageMoudle pageMoudleFour = new PageMoudle();
pageMoudleFour.setRecoureId(ResourceTable.Media_new_intro);
pageMoudleFour.setBackGroudRgbColor(RgbColor.fromArgbInt(Color.getIntColor(pageColors.get(3))));
pageMoudleFour.setTitle("Lorem Ipsum");
pageMoudleFour.setText(textValue + textValue + textValue);
datas.add(pageMoudleFour);
return datas;
}
```
自定义VerticalIntroSlice类重要方法
| name | 返回值 | info |
|-------------------------|-------------|--------------------------------------------------------|
| initView | void | 初始化view |
| initTitleColors | void | 设置初始化数据 |
| onPageSliding | void | 监听页面变化 |
| setPageApale | void | 设置页面中几个ziview透明度变化 |
| onPageChosen | void | 当view滑动到当前页面 |
| onTouchEvent | boolean | 设置view的触摸事件 |
| startChangeButtonBg | void | 设置底部button的动画操作以及背景色变化 |
#### 测试信息
CodeCheck代码测试无异常
CloudTest代码测试无异常
病毒安全检测通过
当前版本demo功能与原组件基本无差异
#### 版本迭代
- 0.0.2-SNAPSHOT
#### 版权和许可信息
Vertical Intro library for Android
Copyright (c) 2017 Arman Chatikyan (https://github.com/armcha/Vertical-Intro).
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.