5 Star 2 Fork 0

HarmonyOS-TPC / CountAnimationTextView

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

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

fork地址:https://github.com/MasayukiSuda/CountAnimationTextView

fork版本号/日期:0.1.2 / 2016/3/22

CountAnimationTextView

CountAnimationTextView 一个很小的库使对Text的动画计数变得非常容易

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

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

完成度:100%

调用差异:无

导入方法

1.har导入

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

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

2.Library引用

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

implementation project(':cat')

or

allprojects{
    repositories{
        mavenCentral()
    }
}
implementation 'io.openharmony.tpc.thirdlib:CountAnimationTextView:1.0.1'

CountAnimationTextView

A tiny library makes very easier count animation of Text.

Usage

Include the CountAnimationTextView widget in your layout.

 <com.daasuu.cat.CountAnimationTextView
            ohos:id="$+id:count_animation_textView"
            ohos:height="match_content"
            ohos:width="match_content"
            ohos:text="0"
            ohos:text_size="32fp"/>

In your onStart method , bind the widget.

    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_main);
        mCountAnimationTextView = (CountAnimationTextView) findComponentById(ResourceTable.Id_count_animation_textView);
}

Animate Count with Duration

    mCountAnimationTextView
        .setAnimationDuration(5000)
        .countAnimation(0, 99999);

Animate Count with DecimalFormat

    mCountAnimationTextView
        .setDecimalFormat(new DecimalFormat("###,###,###"))
        .setAnimationDuration(10000)
        .countAnimation(0, 9999999);

Animate Count with interPolator

    mCountAnimationTextView
        .setInterpolator(new AccelerateInterpolator())
        .countAnimation(0, 9999999);

License

Copyright 2015 MasayukiSuda

MIT License

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.

空文件

简介

CountAnimationTextView 一个很小的库使对Text的动画计数变得非常容易 展开 收起
Java
取消

发行版

暂无发行版

贡献者

全部

近期动态

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

搜索帮助