All Projects → bingxio → ProgressText

bingxio / ProgressText

Licence: Apache-2.0 license
A text progress bar with animation effect, highly customized.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to ProgressText

Roundprogresstextview
TextView with Round Pogress
Stars: ✭ 18 (+38.46%)
Mutual labels:  progress, progressbar, textview
Progress Bar
Multiplatform netstandard 2.0 C# console progress bar, with support for single or multithreaded progress updates.
Stars: ✭ 53 (+307.69%)
Mutual labels:  progress, progressbar
Progress
Progress replacing ProgressDialog
Stars: ✭ 52 (+300%)
Mutual labels:  progress, progressbar
Progress
基于Vue 2.x 的进度条,支持直线和环形(顺时针和逆时针)。Vue-based progress component, support line and circle(clockwise or couterclockwise).
Stars: ✭ 130 (+900%)
Mutual labels:  progress, progressbar
Ngx Progressbar
Angular progress bar ☄
Stars: ✭ 813 (+6153.85%)
Mutual labels:  progress, progressbar
Vue Step Progress
A simple Vue component that displays a Progress Bar with labels for each step
Stars: ✭ 26 (+100%)
Mutual labels:  progress, progressbar
Ruby Progressbar
Ruby/ProgressBar is a text progress bar library for Ruby.
Stars: ✭ 1,378 (+10500%)
Mutual labels:  progress, progressbar
Theglowingloader
TheGlowingLoader is the highly configurable library to indicate progress and is natively created for Android Platform. It is an implementation of a design composed by Shashank Sahay.
Stars: ✭ 379 (+2815.38%)
Mutual labels:  progress, progressbar
React Nprogress
⌛️ A React primitive for building slim progress bars.
Stars: ✭ 173 (+1230.77%)
Mutual labels:  progress, progressbar
Alive Progress
A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!
Stars: ✭ 2,940 (+22515.38%)
Mutual labels:  progress, progressbar
Progress dialog
A light weight library to easily manage a progress dialog with simple steps whenever you need to do it. You can easily show and hide it.
Stars: ✭ 196 (+1407.69%)
Mutual labels:  progress, progressbar
Python Progressbar
Progressbar 2 - A progress bar for Python 2 and Python 3 - "pip install progressbar2"
Stars: ✭ 682 (+5146.15%)
Mutual labels:  progress, progressbar
React Sweet Progress
A way to quickly add a progress bar to react app 🌈
Stars: ✭ 239 (+1738.46%)
Mutual labels:  progress, progressbar
Spincounterview
🎡 一个类似于码表变化的旋转计数器动画控件
Stars: ✭ 47 (+261.54%)
Mutual labels:  progress, progressbar
Multiprogressview
📊 An animatable view that depicts multiple progresses over time. Modeled after UIProgressView
Stars: ✭ 614 (+4623.08%)
Mutual labels:  progress, progressbar
Delayedprogress
ProgressDialog that waits a minimum time to be dismissed before showing. Once visible, the ProgressDialog will be visible for a minimum amount of time to avoid "flashes" in the UI.
Stars: ✭ 95 (+630.77%)
Mutual labels:  progress, progressbar
Circleprogressview
🎡 CircleProgressView是一个圆形渐变的进度动画控件(支持外环显示刻度,内环随之变化,配置参数完全可配),动画效果纵享丝滑。
Stars: ✭ 314 (+2315.38%)
Mutual labels:  progress, progressbar
Tqdm
A Fast, Extensible Progress Bar for Python and CLI
Stars: ✭ 20,632 (+158607.69%)
Mutual labels:  progress, progressbar
Radialprogressbar
Radial ProgressBar inspired by Apple Watch OS. It is highly Customisable
Stars: ✭ 141 (+984.62%)
Mutual labels:  progress, progressbar
Mkmagneticprogress
A circular progress bar for iOS written in Swift
Stars: ✭ 214 (+1546.15%)
Mutual labels:  progress, progressbar

ProgressText

一个带动画效果的文字进度条 Download demo apk

Demo

引用

第一步

添加依赖到项目根目录的 build.gradle

allprojects {
	repositories {
		...
		maven { url 'https://www.jitpack.io' }
	}
}

第二步

包含此库到 app 级别的 build.gradle

dependencies {
	compile 'com.github.Turaiiao:ProgressText:0.0.4'
}

使用

XML

<cn.xyiio.progresstext.view.ProgressText
	android:id="@+id/progressText"
        android:layout_width="180dp"
        android:layout_height="wrap_content" />
注意
  • 这个 View 本身继承 RelativeLayout,需要设置 layout_width 才能显示
  • layout 里没有其他的属性,则需要在 Java 代码里设置

Java

ProgressText progressText = (ProgressText) findViewById(R.id.progressText);

progressText.setHeadText("已坚持");
progressText_a.startSetTextAnimation(12, 30);
progressText_a.setBottomText("天");
注意

  • 这串代码效果如上图,左边的文字为 HeadText,中间的12为 StartText,分割线为 LineText,右边结束的文字为 EndText,最后的文字为 BottomText,每一个都可以自定义颜色,字体大小。文字等
全部属性
HeadText 作用 StartText 作用 LineText 作用 EndText 作用 BottomText 作用
setHeadText 内容 setStartText 进度 setLineText 分割线 setEndText 进度 setBottomText 内容
setHeadTextColor 颜色 setStartTextColor 颜色 setLineTextColor 颜色 setEndTextColor 颜色 setBottomTextColor 颜色
setHeadTextSize 大小 setStartTextSize 大小 setLineTextSize 大小 setEndTextSize 大小 setBottomTextSize 大小
其他函数
  • setTextAll(String head_text, int start_progress, int end_progress, String line_text, String bottom_text)
    设置所有文字,注意,startText 和 EndText 是整形,表示进度
  • setTextColorAll(int head_color, int start_color, int end_color, int line_color, int bottom_color)
    设置所有文字颜色
  • setTextSizeAll(float head_size, float start_size, float end_size, float line_size, float bottom_size)
    设置所有文字大小
  • startSetTextAnimation(final int start_size, final int end_size)
    设置 StartText 文字动画,start_size 起始大小,end_size 结束大小,注意,这个属性仅仅是指 StartText
    默认:start_size 大于20动画为 1000,小于20为 2000
  • startSetTextAnimationWithDuration(final int start_size, final int end_size, final int duration)
    如上,duration 为动画时间,每个数字切换的时间
    默认:start_size 大于20动画为 1000,小于20为 2000
  • startSetTextAnimationWithNumber(final int start_size, final int end_size)
    起始文字从零起的动画函数
  • startSetTextAnimationWithNumberAndDuration(final int start_size, final int end_size, int duration)
    起始文字从零起的动画函数,自定义动画时间
  • setStartTextAddNumber(int start_size, int add_size, final int end_size, int duration)
    起始文字增加几位动画函数
可引用的静态常量
/* 默认文字颜色 */
public static int DEFAULT_TEXT_COLOR = Color.parseColor("#8A000000");

/* 默认进度文字颜色 */
public static int DEFAULT_START_COLOR = Color.parseColor("#E91E63");

/* 默认字体大小 */
public static int HEAD_TEXT_SIZE = 11;
public static int START_TEXT_SIZE = 25;
public static int END_TEXT_SIZE = 11;
public static int LINE_TEXT_SIZE = 11;
public static int BOTTOM_TEXT_SIZE = 11;

/* 默认分割线 */
public static String DEFAULT_LINE_TEXT = "/";
欢迎 Star,Fork,Issues !

License

Copyright 2018 Turaiiao

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].