1 Star 1 Fork 0

CHINASOFT2_OHOS / ScrollNumber

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 3.17 KB
一键复制 编辑 原始数据 按行查看 历史
xinglu 提交于 2021-08-13 09:57 . fix(*) 发布正式版1.0.1

ScrollNumber

项目介绍

  • 项目名称:ScrollNumber
  • 所属系列:openharmony的第三方组件适配移植
  • 功能:一个 简单、优雅、易用 的滚动数字控件!
  • 项目移植状态:主功能完成
  • 调用差异:无
  • 开发版本:sdk6,DevEco Studio2.2 beta1
  • 基线版本:Release master

效果演示

scrollnumber_harmony

安装教程

在moudle级别下的build.gradle文件中添加依赖

// 添加maven仓库
repositories {
   maven {
       url 'https://s01.oss.sonatype.org/content/repositories/releases/'
   }
}

// 添加依赖库
dependencies {
    implementation 'com.gitee.chinasoft_ohos:ScrollNumber:1.0.1'
}

在sdk5,DevEco Studio2.1 beta4下项目可直接运行 如无法运行,删除项目.gradle,.idea,build,gradle,build.gradle文件, 并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下

使用说明

  • xml属性
 <top.wuhaojie.library.MultiScrollNumber
        ohos:id="$+id:scroll_number"
        ohos:height="match_content"
        ohos:width="match_parent" />
  • Java 调用示例

   top.wuhaojie.library.MultiScrollNumber scrollNumber = (top.wuhaojie.library.MultiScrollNumber) findComponentById(ResourceTable.Id_scroll_number);
        int[] ints = {top.wuhaojie.library.ResourceTable.Color_red01, top.wuhaojie.library.ResourceTable.Color_orange01,
            top.wuhaojie.library.ResourceTable.Color_blue01, top.wuhaojie.library.ResourceTable.Color_green01, top.wuhaojie.library.ResourceTable.Color_purple01};
        scrollNumber.setTextColors(ints);

//        scrollNumber.setTextSize(64);

//        scrollNumber.setNumber(64, 2048);
//        scrollNumber.setInterpolator(new DecelerateInterpolator());


        scrollNumber.setScrollVelocity(100);
        scrollNumber.setTextFont("myfont.ttf");
        scrollNumber.setNumber(20.48);

测试信息

CodeCheck代码测试无异常

CloudTest代码测试无异常

病毒安全检测通过

当前版本demo功能与原组件基本无差异

版本迭代

  • 1.0.1

版权和许可信息

The MIT License (MIT)

Copyright (c) 2015 WuHaojie

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1
https://gitee.com/chinasoft2_ohos/ScrollNumber.git
git@gitee.com:chinasoft2_ohos/ScrollNumber.git
chinasoft2_ohos
ScrollNumber
ScrollNumber
master

搜索帮助