dinuscxj / loadingdrawable Goto Github PK
View Code? Open in Web Editor NEWSome beautiful android loading drawable, can be combined with any view as the LoadingView or the ProgressBar. Besides, some Drawable can customize the loading progress too.
Some beautiful android loading drawable, can be combined with any view as the LoadingView or the ProgressBar. Besides, some Drawable can customize the loading progress too.
public void showLoadingDialog(String message) {
dismissDialog();
if (mProgressDialog == null) {
mProgressDialog = new ProgressDialog(this);
mProgressDialog.setIndeterminate(true);
mProgressDialog.setTitle("");
}
mProgressDialog.setMessage(message);
mProgressDialog.show();
}
Like standard android ProgressDialog as above code.
Thanks.
SwapLoadingRenderer使用的是这款动画
把注释加上就好了。。。
WhorlLoadingRenderer
MaterialLoadingRenderer
GearLoadingRenderer
这几个圆形loading都会
Can you add gradle dependency for this please. Thanks
How to set the progress?
error: non-static method setLoadingRenderer(LoadingRenderer) cannot be referenced from a static context
As kotlin become official to android.
should we consider switch to it, because it is painless for java developer.
@dinuscxj
当我打开一个Activity时,我想要先显示loading动画,后台线程执行网络请求逻辑
当请求结束时,loading动画消失,显示正常的layout.
请问如何实现这样的效果?
目前我的方案是使用自定义ProgressDialog,
或许还可以通过FrameLayout嵌套progressBar和其他view,通过visibility属性来控制.
是否存在更好的解决方案?
新手问题,见笑了.
😂
3q for your wonderful code,I spend some spare time in analysising the Fish Animator。As a newcomer in Android,I hope I did not make mistakes in my blog。http://blog.csdn.net/XSF50717/article/details/51494266,Waiting for your suggestion。
android5.0以上正常,5.0一下动画效果不显示,测试的手机是小米4(4.4.4)和华为荣耀6(4.4.2)
我是放在dialog里面使用,dialog.show()实际上执行了,但是显示就是灰度的,没有动画。
download zip or compile in gradle
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
在调用BalloonLoadingRenderer 的时候直接会空指针,而且还有我在Recycleview 配合Glide PlaceHolder调用的时候 只能显示静止的 不会动。
建议添加支持通过工厂模式创建 Drawable
LoadingDrawable + Fresco + RecyclerView
场景:RecyclerView 加载两列,每个Item使用Fresco自带的View;
setProgressImage(LoadingDrawable);
目标:使用LoadingDrawable,实现Fresco加载过程的动画,即:LoadingDrawable一直播放,指导Fresco加载完成,加载完图片
问题:LoadingDrawable变形了。 分析可能原因:Fresco因为RecyclerView导致,给定LoadingDrawable的高度和宽度,比例变成了,2:1;导致LoadingDrawable变形了
跳转Activity的跳转方式,是这样的。
AnimalActivity.startActivity(this);
public class AnimalActivity extends AppCompatActivity {
public static void startActivity(Context context) {
Intent intent = new Intent(context, AnimalActivity.class);
context.startActivity(intent);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......
}
}
这种跳转方式跟普通的直接跳转有什么区别吗?
Intent intent = new Intent(this, AnimalActivity.class);
this.startActivity(intent);
onVisibilityChanged这个方法是父布局变化时都会分发到的, 传进来的visibility是指父布局的情况, 所以在开始停止动画时要根据LoadingView自身的可见情况决定
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.