All Projects → maoruibin → FlowerLoading

maoruibin / FlowerLoading

Licence: other
🌻 Android loading or progress view, just like iOS IndicatorView.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to FlowerLoading

blur-up
A tool that creates preview images.
Stars: ✭ 28 (-9.68%)
Mutual labels:  loading
react-loading-placeholder
Loading placeholer, inspired by Facebook
Stars: ✭ 17 (-45.16%)
Mutual labels:  loading
SSSwiftUISpinnerButton
SSSwiftUISpinnerButton is a collection of various spinning animations for buttons in SwiftUI.
Stars: ✭ 37 (+19.35%)
Mutual labels:  loading
vue-loading-button
👇 Vue button with slideout loading indicator
Stars: ✭ 39 (+25.81%)
Mutual labels:  loading
GradientLoading
No description or website provided.
Stars: ✭ 12 (-61.29%)
Mutual labels:  loading
jh-weapp-demo
微信小程序项目- 实现一些常用效果、封装通用组件和工具类
Stars: ✭ 60 (+93.55%)
Mutual labels:  loading
flutter easyloading
✨A clean and lightweight loading/toast widget for Flutter, easy to use without context, support iOS、Android and Web
Stars: ✭ 1,021 (+3193.55%)
Mutual labels:  loading
Android-Resource-File-Provider
A simple library to easily provide and share files from app resources
Stars: ✭ 15 (-51.61%)
Mutual labels:  drawable
shitload
The appropriate bullgit loading animation
Stars: ✭ 15 (-51.61%)
Mutual labels:  loading
XLDotLoading
iOS 新浪微博红包加载动画
Stars: ✭ 30 (-3.23%)
Mutual labels:  loading
spinners-angular
Lightweight SVG/CSS spinners for Angular
Stars: ✭ 21 (-32.26%)
Mutual labels:  loading
ViewColorGenerator
A library to generate color palette for view, imageview and image from URL.
Stars: ✭ 29 (-6.45%)
Mutual labels:  drawable
TipDialog
flutter tip dialog
Stars: ✭ 78 (+151.61%)
Mutual labels:  loading
LottieDemo
This Demo contains a reference to use Lottie Library by Airbnb in an Android Project. An animation JSON file can be played using LottieAnimationView.
Stars: ✭ 33 (+6.45%)
Mutual labels:  loading
RxPagingLoading
Easy handling of the Paging or Loading screens states
Stars: ✭ 45 (+45.16%)
Mutual labels:  loading
resource-loader
Getting files out of a JAR or loading a shared library is difficult. We made it easy.
Stars: ✭ 15 (-51.61%)
Mutual labels:  loading
CustomProgress
一款常见的进度条加载框架
Stars: ✭ 32 (+3.23%)
Mutual labels:  loading
react-data-fetching-components
♻️ Asynchronously load data for your React components with SSR
Stars: ✭ 13 (-58.06%)
Mutual labels:  loading
blazor-lazy-loading
Automatic Lazy Loading support for Blazor (Server and WebAssembly)
Stars: ✭ 89 (+187.1%)
Mutual labels:  loading
dlib
Dynamic loading library for C/C++
Stars: ✭ 19 (-38.71%)
Mutual labels:  loading

FlowerLoading Download License Open Source Love

一个常见的转菊花动画效果 | English

demo

原理

对一张原始的菊花图片不停的做固定角度的旋转,从而产生视觉上的的转菊花动画效果。

使用

    compile "name.gudong:loading:1.1.1"

通过布局引入 LoadingView,如下所示

    <name.gudong.loading.LoadingView
        android:id="@+id/lv_loading"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

FlowerLoading 默认提供一个灰色的菊花资源,转一圈默认时长 1200ms.

为了提供更加独立的绘制特性,FlowerLoading 还提供了对应 LoadingDrawable, 以便在其他 View 上通过background 设置转菊花效果,如 ActionButton 这个项目,通过引入该库,灵活的实现了加载效果。

LoadingDrawable 使用方法如下所示:

    //init target view
    tvLoading = (TextView) findViewById(R.id.tv_loading);
    
    //init loading drawable
    LoadingDrawable loadingDrawable = new LoadingDrawable(this);
    
    //set loading drawable as view's background 
    tvLoading.setBackground(loadingDrawable);
    
    // start loading anim
    loadingDrawable.start();

方法介绍

共有方法

LoadingView 跟 LoadingDrawable 的大多数方法一致,只是 LoadingView 会有少数几个特殊的方法。

方法名 介绍
setLoadingDrawable 设置旋转图片资源
setDuration 设置旋转一圈的时长
setDivideCount 设置一次动画被切割成多少份
start 播放动画
stop 停止动画
isRunning 动画是否在执行

LoadingView 特有方法

方法名 介绍
enableAutoPlayAnim 设置是否启用自动播放动画的功能
setMax 设置旋转最大进度
setProgress 设置当前旋转进度

enableAutoPlayAnim 介绍

默认只要 LoadingView 处于显示状态,动画就会执行,隐藏则动画自动停止。如果不想使用该特性,可以通过 enableAutoPlayAnim 方法进行关闭。

更多细节,请查看源码

Author

License

Copyright 2017 GuDong

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].